Mpi communications, Computer Engineering

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.

Posted Date: 2/23/2013 2:37:46 AM | Location : United States







Related Discussions:- Mpi communications, Assignment Help, Ask Question on Mpi communications, Get Answer, Expert's Help, Mpi communications Discussions

Write discussion on Mpi communications
Your posts are moderated
Related Questions
What is a Manifest?  An assembly manifest contains all the metadata required to specify the assembly's version requirements and security identity, and all metadata required to

Q. Why do businesses need systems analysts? A computerized system allows an organization to provide accurate information and respond faster to queries, events etc. If a busines

What is event-driven control? Control resides within a dispatcher or monitors that language, subsystem or OS provider. Developers attach application process to events and dispa

Q. Combined Parallel Work-sharing Constructs? Combined parallel work sharing constructs are shortcuts for specifying a work sharing construct nested instantaneously in a parall

Write an application that prints the hundreds digit  in two integers read from the keyboard. For example if the data values are 1456 and 255 respectably, output should include the

What is the fundamental Digital Design? Digital design is distinct through analog design. In analog circuits we deal along with physical signals that are continuous in amplitud

A grammar for a programming language is a formal description of ? Structure is a formal description for a programming language.

What is 1 00 line exchange with one two-motion selector per subscriber. Design: In, Strowger switching system is designed by using one two-motion selector for all subscrib

Explain Binary number system. Ans. Binary Number System The number of system along with base or Radix two is termed as the Binary Number System. To show the number, 0 a

What is a digital multiplexer?  Ans: Multiplexer: Data selector or MUX is a logic circuit selects binary information from one of several input and directs this to a sing