Question: Create an MPI program that will calculate 4 statistical measures for a file of numbers. These are the total, the average, the largest positive number,
Create an MPI program that will calculate 4 statistical measures for a file of numbers. These are the total, the average, the largest positive number, and the largest negative number. The MPI program must read the numbers from the file in the Rank 0 process and send the appropriate share of numbers to the processes of other Ranks. These processes will then calculate the 4 statistical measures for the number that they have and then send those back to the Rank 0 process, which will consolidate all the values from all the Ranks into the final 4 values, and print them out. Your program must be able to work with a minimum of 2 processes and a maximum of 10 processes. The Rank 0 process should share the numbers between all the other Ranks as equally as possible.
Step by Step Solution
3.41 Rating (145 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
