fork download
  1. int main(int argc, char *argv[])
  2. {
  3. ...
  4. MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  5. ...
  6. data = rank + 2;
  7. MPI_Reduce(&data, &globaldata, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
  8.  
  9. if(rank == 0)
  10. printf("%d\nā€, globaldata);
  11. ...
  12. }
Success #stdin #stdout #stderr 0.25s 38160KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: unexpected symbol in "int main"
Execution halted