Repository navigation
MPI: drop a plain task's ref-id counter when the task is done - #793
Open
AnnaLena77 wants to merge 1 commit into
Open
AnnaLena77 wants to merge 1 commit into
AnnaLena77 wants to merge 1 commit into
Conversation
_MPIREF_TID holds one sub-counter per task id for the ref ids a task takes while it is moved and executed. It was reclaimed only at the end of a Datadeps region, so a program that only uses @Spawn grew it by one entry per task for the whole session. A task that is not part of a Datadeps region (no tag option) takes ids only during its own move and execute!, never during planning, so its counter is dead once execute! returns: delete it there. Tagged (Datadeps) tasks keep the later cleanup, since their planning shares the key with their execution and reclaiming in between would collide on sub-ids. Test (test/mpi/spawn.jl): 300 plain tasks (unscoped, pinned, and with a body that may throw) must leave the table within 20 entries, and task ids stay uniform afterwards. At 2 ranks x 2 threads (MPICH) the test fails on upstream master (the table grows) and passes with this change.
This branch has not been deployed
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.
_MPIREF_TIDholds one sub-counter per task id for the ref ids a task takes while it is moved and executed. It was reclaimed only at the end of a Datadeps region, so a program that only uses@spawngrew it by one entry per task for the whole session. A task that is not part of a Datadeps region (notagoption) takes ids only during its own move andexecute!, never during planning, so its counter is dead onceexecute!returns; it is deleted there. Tagged (Datadeps) tasks keep the later cleanup, since their planning shares the key with their execution and reclaiming in between would collide on sub-ids.Test in
test/mpi/spawn.jl: 300 plain tasks (unscoped, pinned, and with a body that may throw) must leave the table within 20 entries, and task ids stay uniform afterwards. At 2 ranks x 2 threads the test fails on current master (the table grows) and passes with this change.AI disclosure: I prepared this change with the help of Claude (Anthropic) and reviewed it myself.
🤖 Generated with Claude Code