Question: Write an MPI program that does the following: a . Creates five communication groups with 6 processes in each group. b . Have the global

Write an MPI program that does the following:
a. Creates five communication groups with 6 processes in each group.
b. Have the global root process generate 10000 integers between 0 and 10000.
The root process should then divide the integers into five groups and sends
each of the groups of numbers to a single root process in each group
(remember the root process is also part of a group).
c. Have the receiving root process in each group divide the integers among it
and the other processes in the group.
d. Have the processes in each group compute partial sums which should be
gathered to the group root process that initially received the integers from the
global root process.
e. Have the receiving group root process compute another partial sum from the
partial sums it received from its group.
f. The partial sums should then in turn be gathered to the global root process
and the root process should compute the final sum and display it.
the programming language must be c++ and please make sure that the code is able to use 30 processes
N.B i will use visual studio as an IDE the run the code using command prompt
command line mpiexec -n 30...

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!