Write an MPI program that uses a pipeline to transform the elements of an array input...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an MPI program that uses a pipeline to transform the elements of an array input of double numbers by applying the following equations in the different stages of the pipeline. Stage 1: subtract 4 Stage 2: divide by 5. Stage 3: add 3 Stage 4: multiply by 7 Input Stage 1 14-4-10 Stage 2 10/5-2 Stage 3 2+3-5 stage 4 5*7-35 Output 35 Process 0 will send the numbers one by one through the pipeline (Assume the input array is already filled with data). After that, each process in the pipeline will receive the number from the previous process, apply its equation on the number and then send the value to the next process. Termination will occur once 500 elements are transformed, the size of the array. Write an MPI program that uses a pipeline to transform the elements of an array input of double numbers by applying the following equations in the different stages of the pipeline. Stage 1: subtract 4 Stage 2: divide by 5. Stage 3: add 3 Stage 4: multiply by 7 Input Stage 1 14-4-10 Stage 2 10/5-2 Stage 3 2+3-5 stage 4 5*7-35 Output 35 Process 0 will send the numbers one by one through the pipeline (Assume the input array is already filled with data). After that, each process in the pipeline will receive the number from the previous process, apply its equation on the number and then send the value to the next process. Termination will occur once 500 elements are transformed, the size of the array.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these computer network questions
-
Doede Corporation uses activity-based costing to compute product margins. In the first stage, the activity-based costing system allocates two overhead accounts--equipment depreciation and supervisory...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Program :1 FlashCard This program implements a flash card to teach multiplication. Write a program that uses a WidgetView object (the WidgetView class is available elsewhere in this Lesson). your...
-
The drawing shows a jet engine suspended beneath the wing of an airplane. The weight W of the engine is 10 200 N and acts as shown in the drawing. In flight the engine produces a thrust T of 62 300 N...
-
What are the differences between editing manually and editing digitally? What tools are used for each?
-
On June 1, 2015, bids were submitted for a construction project to build a new municipal building and fire station. The lowest bid was $5,000,000, submitted by the Shannon Construction Company....
-
The General Social Survey asked 1373 men and 993 women in the United States whether they agreed that they were generally optimistic about the future. The results are presented in the following table....
-
Horace and Lee CPAs (H&L) is a medium-sized CPA firm that performs review and audit engagements for mostly privately held companies. H&L also has a tax group. H&L is considering accepting...
-
3. Ally bases her price to act in a movie on the success of her last two movies. Movies may be a blockbuster (B), average (A) or a dud (D). Below is her rate table: Last Two Movies Both Blockbusters...
-
Surkis Company acquires equipment at a cost of $42,000 on January 3, 2017. Management estimates the equipment will have a residual value of $6,000 at the end of its four-year useful life. Assume the...
-
Mr. Snoob is a famous rapper. On November 1, he signed a contract with Big City TV to perform on their big show on New Years Eve. Big City TV agreed to pay Snoob $100,000 for his performance....
-
what extent has secularization altered the role of religion in public life? Analyze the impact of secularization on moral values, social cohesion, and cultural identity.
-
Discuss the role of advanced traffic simulation models, such as microscopic traffic flow models and agent-based modeling, in evaluating the performance and reliability of transportation networks...
-
The radius of the earth's orbit around the sun (assumed to be circular) is 1.50 108 km, and the earth travels around this orbit in 365 days. (a) What is the magnitude of the orbital velocity of the...
-
Inflation affects many facets of the economy, from individual spending power to interest on the national debt. Pent-up demand, supply-chain issues, government spending, and the war in Ukraine pushed...
-
If an investment of $1171.00 earned interest of $208.00 at 7.8% compounded quarterly, for how many years and months was the money invested?
-
Luka, married to Karen, and living in Florida, recently passed away owning the following assets and property: Fort Myers home; Tenancy by the Entirety with Karen; Value = $500,000 Porsche; Solely...
-
What are the principal alloying elements in SAE 4340 steel?
-
In English, the statement I will not not speak means the same as I will speak. In C++, is !!x the same as x?
-
How could you use C++ to find out which character the code 88 represents? Come up with at least two ways.
-
Declare an array of char and initialize it to the string "cheeseburger".
-
Applying the criterion for equilibrium, derive the Clausius-Clapeyron equation.
-
A binary liquid mixture consists of \(60 \mathrm{~mol}\) per cent ethylene and \(40 \mathrm{~mol}\) per cent propylene. At \(423 \mathrm{~K}\), the vapour pressure of ethylene and propylene are...
-
The pure component vapour pressure of two organic liquids \(\mathrm{X}\) and \(\mathrm{Y}\) by Antoine equations are given by \[ \ln P_{1}^{\text {Sat }}=14.35-\frac{2942}{T+220} \] and \[...
Study smarter with the SolutionInn App