Skip to content

Commit e5fdb03

Browse files
committed
Set mesh threading default to 1, possibly resolve race conditions
1 parent 4de803c commit e5fdb03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/solidmodels/solidmodels.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ struct SolidModel{T <: SolidModelKernel}
162162
set_gmsh_option("Geometry.OCCTargetUnit", "UM")
163163
# Use threads in open cascade
164164
set_gmsh_option("Geometry.OCCParallel", 1)
165-
set_gmsh_option("General.NumThreads", 0)
165+
# Default to no threads, as there appear to be race conditions within gmsh.
166+
# If set to zero, Gmsh will look for OMP_NUM_THREADS environment variables;
167+
# this needs to be >1 for HXT algorithm to use parallelism.
168+
set_gmsh_option("General.NumThreads", 1)
166169

167170
# Reasonable defaults for meshing.
168171
set_gmsh_option("Mesh.MeshSizeFromPoints", 0)

0 commit comments

Comments
 (0)