- changed status to open
- removed comment
provide support for multi-model runs in thorn MPI
The attached patch adds a very thin layer of code to ExternalLibraries/MPI to provide access to two communicators MPI_Comm_World
and MPI_Comm_Universe
which can be used for multi-model runs (or runs started via MPI_Comm_Spawn
).
The code does not itself split a communicator, it only provides routines to get and set the communicators.
It supports C and F90 calls (and C++ calls through external C and call from F77 files since Cactus compiles those with at a F90 compiler).
Documentation is provided in the tex file and in the grdoc comments.
Keyword: MPI
Comments (4)
-
reporter -
- removed comment
Carpet currently provides aliased functions for this. Presumably, all drivers that support multi-model runs could provide such an aliased function. What is the advantage of an explicit function definition in thorn MPI?
-
reporter - removed comment
I am no longer sure.
For C, the functionality is the identical between this and Carpet I think. The code would only collect the functionality on one spot rather than in each driver.
I think for Fortran, however, Carpet's aliased functions won't work since there is no way to dereference the returned CCTK_POINTER_TO_CONST. The returned pointer is a pointer to the C MPI communicator struct, which (as far as I know) does not have to be bit-identical to Fortran's MPI_Communicator type (which is INT).
Having said all of this, the original usage case I had for this no longer exists (I think it had to do with running PUGH under LoadLeveler or something similar, I have PUGH/Carpet patches that would make user of this code to provide the aliased functions). The implementation of the Reset functions is also somewhat ugly.
-
reporter - changed status to resolved
- removed comment
Come to think of it, unless there is need for it, I'd keep the complex code out the ET.
- Log in to comment