Add MPI_APPNUM support for MPMD setups#695
Open
maximilian-tech wants to merge 3 commits into
Open
Conversation
Collaborator
|
I don’t think this is strictly necessary — we already support multiple sessions. For coupling different codes, a dedicated coupling (driver) application can be used. This approach avoids relying on MPMD, which is not consistently supported across all systems. What are you trying to do? |
Author
|
I’m using this to couple NekRS to custom post-processing running on another node. It relies on simple MPI point-to-point communication over If not merged the two bug fixes should be merged though. |
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.
Add MPI_APPNUM support for MPMD setups.
In certain (albeit seldom) cases one likes to start nekRS in a MPMD setup (e.g.
mpirun -np 2 <nekRS> : -np 2 <other_exe>for e.g. coupling applications.While the actual coupling will probably happen via User Defined Function (UDF), the communicator passed to
UDF_Setup0is a copy ofMPI_COMM_WORLD, which spans both executables (<nekRS>&<other_exe>), which is too large/contains too many processes.This MR splits
MPI_COMM_WORLDbased on the colorMPI_APPNUM, an attribute ofMPI_COMM_WORLD, which returns the index of the program on the command line (e.g.0for<nekRS>and1for<other_exe>). After that split the communicator passed toUDF_Setup0is the actual "cut down" nekRS communicator.Hidden behind a CMake option, as there are probably funky launchers that do not set
MPI_APPNUM.This MR also fixes two bugs:
commGlobal