Peculiar behaviour when using HXT with 2 threads
We have encountered a very strange issue that when we use HXT with 2 threads to generate a 3D mesh, the timing of subsequent 2D mesh generation is affected. We thought we should let you know in case this is a symptom of resources not being fully deallocated by the 3D mesh generation or some settings being modified. In our case, the issue appears with python 3.8.18 on Windows and seems to be dependent on the numpy library (e.g. it appears if numpy is not installed).
Please find attached the code that produces the peculiar result along with the .ps1 script that creates a clean environment in a way that causes the issue to appear.
check_strange_behaviour_at_2_threads.py
The output we see is this:
2D mesh generation took 1.245 s
2D mesh generation took 5.981 s
2D mesh generation took 5.912 s
After the first 2D mesh generation there is a call to gmsh.model.mesh.generate(3), which seems to affect the behaviour of gmsh.model.mesh.generate(2) called afterwards.