1 #include "mpi.h" 2 #include <stdio.h> 3 #include <unistd.h> 4 5 int main( argc, argv ) 6 int argc; 7 char **argv; 8 { 9 int rank, size; 10 MPI_Init( &argc, &argv ); 11 MPI_Comm_rank( MPI_COMM_WORLD, &rank ); 12 MPI_Comm_size( MPI_COMM_WORLD, &size ); 13 printf( "Hello world! I'm %d of %d\n", rank, size ); 14 sleep(10); 15 MPI_Finalize(); 16 return 0; 17 } |