RPN_COMM |
(RPN_COMM_move) |
subroutine RPN_COMM_move( sendbuf, sendcount, type, dest, & recvbuf, recvcount,periodicity, ierr)
sendbuf | Send buffer | * | I |
sendcount | Number of items to be sent | integer | I |
type | Data type (see chart below) | character | I |
dest | Direction to the move (N,S,E,W) | character | I |
recvbuf | Receive buffer | * | O |
recvcount | Items to be received | integer | I |
periodicity | Periodicity along the direction of the move | logical | I |
ierr | error flag | integer | O |
Types supported | Operators supported | Communicators recognized |
"MPI_CHARACTER"* | "MPI_OP_NULL" | "EW" (east-west) |
"MPI_INTEGER" | "MPI_MAX" | "NS" (north-south) |
"MPI_INTEGER2" | "MPI_MIN" | "GRID" (full domain grid) |
"MPI_REAL" | "MPI_SUM" | "BLOC" (inside local block) |
"MPI_REAL8" | "MPI_PROD" | "BLOCMASTER" (between blocks master PEs) |
"MPI_REAL4" | "MPI_LAND" | "ALL" (every PE) |
"MPI_DOUBLE_PRECISION" | "MPI_BAND" | "DOMM", equivalent to "GRID" |
"MPI_COMPLEX" | "MPI_LOR" | "DEFO" default communicator |
"MPI_DOUBLE_COMPLEX" | "MPI_BOR" | |
"MPI_LOGICAL" | "MPI_LXOR" | |
"MPI_BXOR" | ||
"MPI_MAXLOC" | ||
"MPI_MINLOC" | ||
To move to the upper processor in my domain an array of 8 integers, it would give
call RPN_COMM_move(send_array,8,"mpi_integer","N",recv_array,8,.false.,ierr)To move to the left processor in my domain an array of 10 reals in a periodical domain, it would give
call RPN_COMM_move(send_array,10,"mpi_real","W",recv_array,10,.true.,ierr)To move from a given process sendproc to his right neighbor process recvproc, we can use the following:
sendcnt=0 recvcnt=0 if(myproc.eq.sendproc) then sendcnt=20 endif if(myproc.eq.recvproc) then recvcnt=20 endif call RPN_COMM_move(send_array,sendcnt,"mpi_real","E",recv_array,sendcnt,.true.,ierr)