Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With MPI programs, do all processes get data from user input?

Tags:

c++

mpi

What I'm asking is if I have something like this:

int main(int argc, char *argv[]) //<---input from command line
{

Do I need to use MPI_Bcast in order to send that data to all of the processes, or do all of the processes get the command line input data anyway?

like image 886
Mechy Avatar asked Jan 22 '26 06:01

Mechy


1 Answers

If you use MPI_Init(&argc,&argv) this solves you problem :)

No need to BCast anything ;)

like image 198
Madsen Avatar answered Jan 24 '26 19:01

Madsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!