Skip to content

Develop - #2046

Merged
stevenweaver merged 5 commits into
masterfrom
develop
Nov 6, 2026
Merged

Develop#2046
stevenweaver merged 5 commits into
masterfrom
develop

Conversation

@stevenweaver

Copy link
Copy Markdown
Member

No description provided.

spond and others added 5 commits November 4, 2026 18:29
GARD could write a complete JSON and then never exit: rank 0 spun in the
HBL interpreter and MPI workers waited forever for the shutdown message.
The hang is in GARD.bf, not in MPI shutdown, and does not depend on --rv
(GDD and None both hang when the alignment is in the affected size range).

Root cause: the multi-breakpoint GA feasibility guard added in #2025,
    (n + 2) * gard.minPartitionSize <= gard.numSites
sits inside 'namespace gard', where 'gard.minPartitionSize' resolves to
the undefined gard.gard.minPartitionSize (0), so the guard was always
true. When n+2 partitions of minPartitionSize (2*numSeqs-3) sites cannot
fit (e.g. 60-160 sequences, 300-830 sites), gard.GA.initializeModels
rejection-samples breakpoints in a do/while that never finds a valid
model, so the script never returns and GlobalShutdown never releases
the workers.

- Use the namespace-relative names (minPartitionSize, numSites) in the
  while guard so the GA stops when n+1 breakpoints cannot fit.
- Defense in depth: before rejection sampling, gard.GA.initializeModels
  now checks deterministically (no RNG draws, so feasible runs are
  unchanged) whether any valid model exists; it skips the seeded half if
  the seed cannot be extended, and returns no models if no placement is
  possible, in which case the GA loop reports it and stops.
- gard.GA.recombineModels returns no children when given fewer than two
  parents instead of looping forever looking for a distinct second parent.
tests/shell/mpi-gard-gdd-exit.sh runs GARD under mpirun with --rv GDD and
the --rv None control on a simulated 60 x 300 nt alignment (minimum
partition 117 sites: one breakpoint fits, two do not), each under
'timeout', and requires exit 0 plus a parseable JSON. Before the fix both
runs hang after writing the JSON; with it they finish in ~30 s at 8 ranks.
GARD: fix rank-0 hang when multi-breakpoint GA is infeasible (#2016)
@stevenweaver
stevenweaver merged commit 8756090 into master Nov 6, 2026
1 check passed
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants