Repository navigation
Develop - #2046
Merged
Merged
Develop#2046
Conversation
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)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.