Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <mpi.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( "I'm process %d\n", rank );
- if (rank == 0)
- printf("Number of processes %d\n", size);
- MPI_Finalize();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment