Question: Sum = 4 ? ? ( - 1 ) i 2 i + 1 write a serial program in C to calculate sum of given

Sum =4??(-1)i
2i+1 write a serial program in C to calculate sum of given expression using point to point communication
9:08PM ??
In this assignment, you will write both serial and parallel programs to calculate the Sum using the following formula:
Sum =4i=0n(-1)i2i+1
You will write a serial C program (Sum_Serial.c) to calculate the sum Sum and validate the correctness of your serial implementation. You will modify the serial program into two parallel programs, namely Sum_MPI_v1.c and Sum_MPI_v2.c. In Sum_MPI_v1.c, utilize only MPI pointto-point communication functions (MPI_Send and MPI_-?bar(-) ecv) for message passing. In Sum_MPI_2.c, implement your parallel solution using collective communication functions. Compile and execute these programs on magnolia HPC cluster to obtain the results. The user can specify n when executing your programs.
Present your results in the following two tables. Table 1 should include a comparison of the Sum results obtained by three programs with respect to different n numbers. For the two parallel programs, you can set p=1 and p=8 where p is the number of processes. Ensure that the Sum results exhibit six digits to the right of the decimal point.
Table 1: Comparison of Sum results with respect to different n and p values.
\table[[Sum,Sum_Serial.c,Sum MPI v1.c,Sum MPI v2.c],[p=1,p=8,p=1,p=8

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 Databases Questions!