HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Functions to create and destroy MPI subcommunicators. More...
Go to the source code of this file.
Functions | |
int | MPICreateCommunicators (int ndims, void *m) |
int | MPIFreeCommunicators (int ndims, void *m) |
Functions to create and destroy MPI subcommunicators.
Definition in file MPICommunicators.c.
int MPICreateCommunicators | ( | int | ndims, |
void * | m | ||
) |
Create subcommunicators from MPI_WORLD, where each subcommunicator contains MPI ranks along a spatial dimension. Consider a two-dimensional problem, partitioned on 21 MPI ranks as follows:
This function will create 10 subcommunicators with the following ranks:
These subcommunicators are useful for parallel computations along grid lines. For example, a compact finite-difference scheme solves implicit systems along grid lines in every spatial dimension. Thus, the subcommunicator may be passed on to the parallel systems solver instead of MPI_WORLD.
ndims | Number of spatial dimensions |
m | MPI object of type MPIVariables |
Definition at line 35 of file MPICommunicators.c.
int MPIFreeCommunicators | ( | int | ndims, |
void * | m | ||
) |
Free the subcommunicators created in MPICreateCommunicators().
ndims | Number of spatial dimensions |
m | MPI object of type MPIVariables |
Definition at line 75 of file MPICommunicators.c.