fork download
  1.  
  2. #include <mpi.h>
  3. #include <stdio.h>
  4.  
  5. int32_t my_rank;
  6.  
  7. int main(int argc, char** argv) {
  8.  
  9. MPI_Init(NULL, NULL);
  10.  
  11. MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
  12.  
  13. printf("Hello World! My rank is %d\n", my_rank);
  14.  
  15. MPI_Finalize();
  16. }
  17.  
Success #stdin #stdout #stderr 0.29s 40560KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: unexpected symbol in "int32_t my_rank"
Execution halted