fork download
  1. #include "mpi.h"
  2. #include <stdio.h>
  3. int main( argc, argv )
  4. int argc;
  5. char *argv[];
  6. {
  7. int rank, size;
  8. MPI_Init( &argc, &argv );
  9. MPI_Comm_rank( MPI_COMM_WORLD, &rank );
  10. MPI_Comm_size( MPI_COMM_WORLD, &size );
  11. printf( "I am %d of %d\n", rank, size );
  12. MPI_Finalize();
  13. return 0;
  14. })
  15.  
  16.  
Success #stdin #stdout #stderr 0.31s 40764KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: unexpected symbol in "int main"
Execution halted