Skip to content

Instantly share code, notes, and snippets.

@jacquerie
Created November 19, 2013 14:59
Show Gist options
  • Save jacquerie/7546604 to your computer and use it in GitHub Desktop.
Save jacquerie/7546604 to your computer and use it in GitHub Desktop.
#include <mpi.h>
#include <stdio.h>
int main (int argc, char** argv) {
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
printf("Hello world, I am proc %d of total %d\n", rank, size);
MPI_Finalize();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment