Created
October 15, 2016 10:49
-
-
Save astrcomp/584bd32e6adabdbadb403359fbf72268 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
#include <stdio.h> | |
#include <mpi.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) | |
{ | |
int rank=0, size=0; | |
MPI_Init(&argc, &argv); /* starts MPI */ | |
MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* get current process id */ | |
MPI_Comm_size(MPI_COMM_WORLD, &size); | |
printf("hello from proccess rank %d from size %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