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