meshing/cartesian.py builds the cache path as
uw_filename = f"{mesh_file_dir()}/uw_structuredQuadBox_minC{minCoords}_maxC{maxCoords}.msh"
so elementRes is not part of the name. Every StructuredQuadBox on the same
box writes and reads one file, whatever its resolution:
.meshes/uw_structuredQuadBox_minC(0.0, 0.0)_maxC(1.0, 1.0).msh
The annulus does not have this problem — uw_annulus_ro1.0_ri0.5_csize0.05.msh
carries its cell size.
How it bites
Two processes on the same machine — a resolution sweep and a probe, say — race on
that one path. One writes a 16×16 mesh while the other is reading it for a 32×32
run. Nothing raises: you get a solve on the wrong mesh, or on a half-written file.
Observed as a marginal Nitsche free-slip solve on SolCx flipping between
converged and DIVERGED_LINE_SEARCH across otherwise identical runs, on two
different builds, for as long as concurrent res=16 probes were running against
the same box. It cost a round of re-measurement to notice, because a line-search
failure looks like a property of the method.
Suggested fix
Put the resolution in the name, as the annulus puts its cell size:
res = "x".join(str(int(n)) for n in elementRes)
uw_filename = f"{mesh_file_dir()}/uw_structuredQuadBox_minC{minCoords}_maxC{maxCoords}_res{res}.msh"
qdegree, simplex and any other geometry-changing argument deserve the same
treatment — the rule is that anything that changes the mesh belongs in the key.
Underworld development team with AI support from Claude Code
meshing/cartesian.pybuilds the cache path asso
elementResis not part of the name. EveryStructuredQuadBoxon the samebox writes and reads one file, whatever its resolution:
The annulus does not have this problem —
uw_annulus_ro1.0_ri0.5_csize0.05.mshcarries its cell size.
How it bites
Two processes on the same machine — a resolution sweep and a probe, say — race on
that one path. One writes a 16×16 mesh while the other is reading it for a 32×32
run. Nothing raises: you get a solve on the wrong mesh, or on a half-written file.
Observed as a marginal Nitsche free-slip solve on SolCx flipping between
converged and DIVERGED_LINE_SEARCH across otherwise identical runs, on two
different builds, for as long as concurrent res=16 probes were running against
the same box. It cost a round of re-measurement to notice, because a line-search
failure looks like a property of the method.
Suggested fix
Put the resolution in the name, as the annulus puts its cell size:
qdegree,simplexand any other geometry-changing argument deserve the sametreatment — the rule is that anything that changes the mesh belongs in the key.
Underworld development team with AI support from Claude Code