We can implement MPSHIFT directly in MPI as CALL MPI_SENDRECV(SOURCE,1,MPI_REAL, PROCNUM+1, sendtag, DEST,1,MPI_REAL, PROCNUM-1, recvtag,comm,status) |
Notes: |
MPI_REAL denotes that variable is real |
"sendtag/recvtag" are for this purpose, a largely irrelevant additional message tag |
"comm" is extra system message tag defining "scope" -- i.e. the set of processors involved -- here it is all of them |
"status" tells you about received data. You needn't look at it if you trust your code and hardware |