Repository navigation
Integration-point variables on a rank with no cells - #1222
Conversation
Four cases on the empty-rank triangle: a direct IntegrationPointVariable (and a second one, through the clone path), a swarm variable with an integration-point proxy, the integration-point semi-Lagrangian history, and a material swarm's level sets. On development all four fail at np 2 and np 3: the rank without cells cannot build the element, and the job aborts. np 3 line in test.sh. Underworld development team with AI support from Claude Code
…reconciled isSimplex _create_petsc_fe asked the type of the rank's first local cell. A rank with no cells has none: PETSc returned DM_POLYTOPE_UNKNOWN, refused to build a reference cell on that rank alone, and the other ranks waited in the next collective. The polytope now comes from facts every rank agrees on, as the rule does. Underworld development team with AI support from Claude Code
|
Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)) Verdict on head 53a2f69: ready to merge on green from this review. The fix does what it should. An integration-point variable now builds the same element on every rank, a rank with no cells included. Before this PR it took the cell type from the rank's own first cell. The new polytope is the same as the old one wherever the old one was defined. The two findings below are small and do not block. Findings
Confirmed correct
Run and not run
Underworld development team with AI support from Claude Code |
…on and isSimplex The docstring still told callers to pass dm.getCellType(cStart), which is UNKNOWN on a rank with no cells; the integration-point variables stopped doing that in underworldcode#1222. Underworld development team with AI support from Claude Code
Integration-point variables on a rank with no cells
What changed and why
An integration-point variable (an
IntegrationPointVariable, a swarm variable withproxy_location="integration_points", the integration-point semi-Lagrangian history, or a material swarm's level sets) could not be created when any rank held no cells._BaseIntegrationPointVariable._create_petsc_febuilt the element's reference cell from the type of the rank's first local cell. A rank without cells has none, so PETSc returnedDM_POLYTOPE_UNKNOWNand refused to build a reference cell (error 62) on that rank alone. The ranks with cells went on into the next collective (DMCloneinsidecreateSubDM) and waited there. Either the job hung, or it aborted when the failing rank's exit met their allreduce.The parallel review desk found this on development 35ac139, on a 96-thread Linux workstation (single system image, Intel Xeon Gold 6240R, MPICH). Its fix brief is in the campaigns record. Proxies at nodes and at cells were not affected, because they build their element from
mesh.isSimplex.The reference cell now comes from facts every rank agrees on: the mesh dimension and the reconciled
mesh.isSimplex(#1189), from which the integration rule itself is already built. Every rank builds the same element and enters the same collectives. No rank-local branch is added.On a mesh where every rank has cells nothing changes: the map gives the same polytope as the local cell type on 2-D simplex and quadrilateral boxes and on 3-D simplex and hexahedral boxes (checked serially, by script).
What a user's run can now do
Create any of the four integration-point variables above on a mesh where some rank holds no cells. Before, it aborted or hung. On the empty rank the variable holds zero integration points and zero values, and its cell view is
(0, Nq, ncomp).Test
tests/parallel/test_1222_integration_point_variable_on_an_empty_rank_parallel.py,level_1,tier_b. It uses the empty-rank triangle ofempty_rank_fixtures; at np 2 the fixture keeps a rank empty only with a one-cell mesh. Each of its four cases checks every rank creates the variable and that the shapes ofintegration_points,dataandcell_datamatch the rank's own cell count.datais read on purpose, since the brief asks that it be zero-length on the empty rank. The cases:IntegrationPointVariablecreated directly, and a second one through the clone path;IntegrationPointSemiLagrangian's history;MaterialSwarm's level sets.scripts/test.shruns the file at np 2 with the other parallel files, and at np 3 always, for two populated ranks beside an empty one (cells per rank [8, 8, 0]).What was run (this machine, the same build, under
scripts/mpi_supervisor.py)Also on this branch:
tests/parallel/): all exit 0.test_0065,test_0066,test_0067,test_0072(serial files) launched undermpirunat np 2: all pass on every rank.mpirun, five cases oftest_0066andtest_0067fail on some ranks. The same five fail identically on development with this fix removed and rebuilt: they are serial tests whose exact checks assume one rank, and this change does not touch them.rotated_bc.py:except-pass, which is not this PR's.Not run
Above np 4; 3-D or quadrilateral meshes with an empty rank (the fixture is a triangle mesh; the map for those cell types was checked serially); the full suite; macOS.
Reviewer: the parallel review desk.
Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8)maybe_/try_/do_) and no commented-out code (S3, S4).array/mesh.X.coords(S7): the test readsdataandcell_dataof integration-point variables, which is what is under testpixi.toml/pixi.lockor other dependency changes riding in an unrelated PRUnderworld development team with AI support from Claude Code