RPN_COMM |
(RPN_COMM_bloc) |
integer function RPN_COMM_bloc(nblocx,nblocy)
nblocx,nblocy | Number of blocks in X and Y direction | integer | I |
RPN_COMM_bloc | 0 if ok, -1 if error | integer | O |
Using the "BLOC" communicator would make all communications relative to a single block, with its own relative ranks as shown on the upper-right grey block.
Using the "BLOCMASTER" communicator would make all communications relative to all blocmasters, i.e. all red processes in the picture. The numbering is as shown, starting at 0 for the lower-left master and going rigth, then up.
As one can conclude, a single PE can have different ranks, one for each communicator. Let see an example with 2 domains of 6 and 4 processes (3x2 and 2x2), divided in 3 and 1 blocks respectively. That would give:
ALL | DOMM | BLOC | BLOCMASTER |
0 | 0 | 0 | 0 |
1 | 1 | 1 | MPI_UNDEFINED |
2 | 2 | 2 | MPI_UNDEFINED |
3 | 3 | 3 | MPI_UNDEFINED |
4 | 0 | 0 | 0 |
5 | 1 | 0 | 1 |
6 | 2 | 0 | 2 |
7 | 3 | 1 | MPI_UNDEFINED |
8 | 4 | 1 | MPI_UNDEFINED |
9 | 5 | 1 | MPI_UNDEFINED |