Question: i want the output of this code using three process void Trace ( ) int a = 2 , b = 4 , c =

i want the output of this code using three process void Trace ()
int a =2, b =4, c =0, d =0;
int comm_sZ;
int mY_rank;
MPI_Init (NULL, NULL) ;
MPI Comm_size
(MPI_COMM_WORLD,
&Comm_sz) ;
MPI Comm_rank
(MPI_COMM_WORLD,
&my_rank) ;
MPI Reduce (&a, &C,1, MPI_INT, MPI_SUM, 0, MPI_COMN WORLD)=
MPI _Reduce (&b, &d,1, MPI_INT, MPI_SUN, 2, MPI_COMM WIORLD)
printf ("Process $d: c=$d and d=ad", my_rank, C, d)
MPI_Finalize ();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!