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