1 | Display Fortran version (interchange row and column for C) |
2 | Integer nbrtop, nbrbottom, nbrleft, nbrright |
3 | # These are processor ranks of 4 nearest neighbors ( top, bottom, left and right respectively) -- find from MPI_CART_SHIFT (see later) |
4 | integer rowtype, coltype # The new derived types |
5 | call MPI_TYPE_CONTIGUOUS(nxblock, MPI_REAL, coltype, ierr) |
6 | call MPI_TYPE_COMMIT(coltype, ierr) |
7 | call MPI_TYPE_VECTOR(nyblock, 1, nxblock+2, MPI_REAL, rowtype, ierr) |
8 | call MPI_TYPE_COMMIT(rowtype, ierr) |
9 | # Now Transmit from internal edges rows to guard rings on neighbors |
10 | call MPI_SEND( u(1,1), 1, coltype, nbrleft, 0, comm, ierr) |
11 | call MPI_SEND( u(1,nyblock), 1, coltype, nbrright, 0, comm, ierr) |
12 | call MPI_SEND( u(1,1), 1, rowtype, nbtop, 0, comm, ierr) |
13 | call MPI_SEND( u(nxblock,1), 1, rowtype, nbtop, 0, comm, ierr) |
14 | |
15 |