Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

We have to use 3 MPI communications: Plz the code in C++  
 
1.  MPI_Scatter

2.  MPI_Alltoall

3.  MPI_Gather
 
  **The length of the array will be determined by the user First we create an array in the master processors and fill it by random numbers.
  
  Then we divide the the length of the array by the number of the slave processors.
 
In each slave processor we create  to buckets(arrays).

The first one is n/p (n= length of big array, p= number of processor) and the second array is n length.

Then we use MPI_Scatter to send each part of the big array to each first bucket of slave processor.

Then we use any sort functions to sort the the buckets.

Then we divide the small buckets by number of slave processors.

After that we use MPI_Alltoall   to send all the first parts of small buckets to array 2 in processor 1 and so on for all second parts to array 2 in processor 2.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9523943

Have any Question?


Related Questions in Computer Engineering

Question 1 emergency operations- a major hurricane has

Question 1: Emergency operations - A major hurricane has struck the area where your company has its central data center. There are offsite backups and hardware at three other centers around the country. - Assume that the ...

Scenarioyour algorithm will keep track of a customers

Scenario Your algorithm will keep track of a customer's purchases at the local fireworks stand. Customers will not know exactly how many items they will purchase, so using a For loop on this lab is not allowed. Let's kee ...

What are the critical issues we must think about while

What are the Critical Issues we must think about while designing a Lexical Scanner? The results of that development, e.g., discuss both process and product.

The power of the market - 1990watch and discuss the video

The Power of the Market - 1990 Watch and discuss the video - The Power of the Market http://www.freetochoose.tv/program.php?id=ftc1990_1&series=ftc90 Links to an external site. By  discuss  I mean: Overall, what did you ...

Whats your answer about the equilibrium change from an

What's your answer about the equilibrium change from an event which decreases both demand and supply? You don't need to provide graph here. Just describe the curve shifts and how the equilibrium price and equilibrium qua ...

The following table records the number of days the stock

The following table records the number of days the stock market recorded the following outcomes: # of Days NASDAQ Up NASDAQ Down NASDAQ Unchanged DJIA Up 30 15 4 DJIA Down 10 40 3 DJIA Unchanged 3 5 2 What is the probabi ...

Sql statement neededcreate a table compatable with oracle

SQL STATEMENT NEEDED: Create a table (compatable with Oracle) to store the names of your friends' pets: -Any name -Mostly any structure -You must include a column that uniquely identifies each pet's owner -Add five+ pets ...

Find minimal dfas for the following languages in each case

Find minimal dfa's for the following languages. In each case prove that the result is minimal. (1) L = {a n bm> :n≥2,m≥1}. (2)L = {a n :n ≥ 0,n ≠ 3} (3) L = {a n :n mod 3 = 0}∪{a n : n mod 5 = 1}

Systems analysis project personal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

Xl cos dividends are expected to grow at a 20 rate for the

XL Co.'s dividends are expected to grow at a 20% rate for the next 3 years, with the growth rate falling off to a constant 6% thereafter. If the required return is 14% and the company just paid a $3.10 dividend, what is ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As