Repository navigation
Document comm and multi_sim_comm (#1443, part A) - #1482
Merged
Merged
Conversation
multi_sim_comm is valid only on process 0 of comm; on the other processes it is MPI_COMM_SELF, so it reports one replica and reaches no other replica. Nothing in the headers said so. Add Doxygen comments to the declarations in Action, PlumedMain and GREX, including the read-on-process-0-and-broadcast pattern. See plumed#1443.
Add a section to mdTemplate.md on how an MD code passes the replica and inter-replica communicators, and what each process sees inside PLUMED. Link it from Action::multi_sim_comm. See plumed#1443.
5 tasks done
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.
Description
Part A of #1443: document the replica communicators so their contract is visible to both action authors and MD-code authors. Documentation only; no code changes.
Action::comm: the ranks of this replica; valid on every rank.Action::multi_sim_comm: one rank per replica, valid only on rank 0 ofcomm. Elsewhere it isMPI_COMM_SELF, which reports one replica and reaches no other replica. Includes the read-on-rank-0-and-broadcast pattern.PlumedMain::comm/multi_sim_comm: a short note plus a pointer to theActioncomments.GREX::intracomm/intercomm: what each holds, and thatsetMPIIntercommalso setsPlumedMain::multi_sim_command is passed only on rank 0.developer-doc/mdTemplate.md: new section Dealing with multiple replicas next to Dealing with parallelism. It shows which calls an MD code makes on which processes (taken fromdriver) and what each process then sees inside PLUMED. It is linked fromAction::multi_sim_commwith\ref mpireplicas.When this is merged into
master, the comment can also point togetNumberOfReplicas()/getReplicaIndex()(#1481).Target release
I would like my code to appear in release v2.9
Type of contribution
Copyright
Tests