Last active
August 29, 2015 14:00
-
-
Save Gateswong/7df64e7df9ec3f2e7bc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ### Send and Receive | |
| int MPI_Send(void *buf, int count, MPI_Datatype datatype, | |
| int dest, int tag, MPI_Comm comm); | |
| int MPI_Recv(void *buf, int count, MPI_Datatype datatype, | |
| int source, int tag, MPI_Comm comm, MPI_Status *status); | |
| // ### Size and Rank | |
| int MPI_Comm_size(MPI_Comm comm, int *size); | |
| int MPI_Comm_rank(MPI_Comm comm, int *rank); | |
| // usage: | |
| int myrank, nproc; | |
| MPI_Comm_size(MPI_COMM_WORLD, &nproc); | |
| MPI_Comm_rank(MPI_COMM_WORLD, &myrank); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment