During library initialization (or some other high-level object creation; i.e., the mesh) the MPI communicator should be passed in from the user/application and used for all calls to MPI associated with that instance/object.
There is a Fortran API here, but it isn't passed into the C++ layer:
|
void polympo_setMPICommunicator_f(MPI_Fint fcomm){ |
|
MPI_Comm comm = MPI_Comm_f2c(fcomm); |
|
int commSize; |
|
MPI_Comm_size(comm,&commSize); |
|
} |