Last active
August 29, 2015 14:14
-
-
Save afrachioni/4fe74b21d7e475fb1151 to your computer and use it in GitHub Desktop.
Simple MPI program which prints rank from each process.
This file contains 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
#include<stdio.h> | |
#include<mpi.h> | |
int main (char **args, int nargs) { | |
MPI_Init (&nargs, &args); | |
int rank; | |
MPI_Comm_rank (MPI_COMM_WORLD, &rank); | |
fprintf (stdout, "Greetings from process of rank %d.\n", rank); | |
MPI_Finalize(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment