Write an MPI program that efficiently compute the sum of array elements. Program 1: Tasks communicate with MPI_Scatter a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write an MPI program that efficiently compute the sum of array elements. Program 1: Tasks communicate with MPI_Scatter a

Post by answerhappygod »

Write an MPI program that efficiently compute the sum of array
elements.
Program 1: Tasks communicate with MPI_Scatter and MPI_Reduce.
1. The programs can assume that the number of processes is a power
of two.
2. The programs should add 2^15 = 65536 random doubles in the range
0 to 100.
Task 0 must generate the numbers, store them in array and
distribute them to the tasks.
3. Each task does a serial sum of the numbers it is assigned. The
local sums are then
added together using a tree structured parallel sum.
4. After the parallel sum is complete, task 0 should compute a
serial sum of the
same numbers (to verify the result).
5. Task 0 must print the parallel sum, the serial sum and the time
required for the
parallel sum (including data distribution).
Collect and tabulate timing data for both implementations. Collect
data using two nodes
nodes and 2^i tasks, where i = 2, 3, 4. Collect times for at least
three runs of each configuration.
Discuss your timing results.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply