reset password
Author Message
malamma
Posts: 25
Posted 20:31 Nov 04, 2011 |

 

...
cin >> value;
 
MPI_Status status;
MPI_Init(&argc, &argv);
 
...
 
MPI_Finalize();
...
 
 
Makes the user enter in a value for every processor in the mpirun N program command.
 
How can I ensure a command is run only once and the variable is still copied to all three processes without send or recv?
rpamula
Posts: 225
Posted 11:00 Nov 05, 2011 |

As they are all asunchronous and independent processes, one of processes has to broadcast.

malamma
Posts: 25
Posted 14:09 Nov 05, 2011 |

Ah I see. It's very different from how MARS handles code before the processes are forked.