Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hey please help with this lab2 I have answered the first Task I already. Please help with the remaining with the OUTPUT in C++ language

Hey please help with this lab2
I have answered the first Task I already.
Please help with the remaining with the OUTPUT in C++ language
Thanks. image text in transcribed
image text in transcribed
image text in transcribed
MPI Lab 2 Using MPIComm_Rank, MPI Comm_size, MPI_Send, MPI_Recv, MPI Bcast and MPI Reduce 1. Task I: serial program to find partial sums Write a serial c+ program, SerialPartialSum.cpp to print out the partial sum of 100 numbers at a time and also the total sum for 1000 integers 1,2, 3... 1000. Compile and run your program 10 times and find the average time for the job. This is the serial time,t, for the calculation of the Speedup Factor. 2. Task II: find partial sums, MPI program (1) Write an MPI program named PartialSum.cpp in which each process will compute and print out a partial sum of N-100 numbers of a total of NT-1000 numbers. In your program, define 10 processes; then process 0 will print out the partial sum of 1+2+ +100 (that is, , process 1 will print out the partial sum of 101+102+. +200(that is, ), , process 9 will print out the partial sum of 901+902+ +1000(that is, ). (Note: In this program, you can declare a constant NT-1000 or use -1 01 1000 -901 pre-processing statement #define NT 1000) (2) Compile and run your program with 10 cores. Run the code 10 times and find the average time for the job. (3) Revise your run script file and your program to apply for 20 nodes, and then run your program again and again, time your program for 10 repetitions and compare it to the time for 10 cores

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions

Question

2. Describe why we form relationships

Answered: 1 week ago

Question

5. Outline the predictable stages of most relationships

Answered: 1 week ago