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