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 are the major systems of a telecommunication network? The main systems of any telecommunication network may contain the following main systems: a. Subscriber end instr

Q. What is Domain explain? Domain can be an apartment complex, a town or even a country. Sub-domains can correspond to organizations like expertsmind. United States comes under

Think about call of two intrinsic functions discussed above for a 32-Processor (4×8) Multicomputer:    The function call NUMBER_OF_PROCESORS () will return 32.

Calculate the number of trunks that can be supported on a time multiplexed space switch given that, 32 channels are multiplexed in each stream, while the control memory access time

Binary codes exist for any fundamental representation. Binary codes can be created for any set of discrete elements for example colors, spectrum, musical notes, chessboard position

Q. How to convert Binary to Octal and Hexadecimal? Rules for these conversions are simple. For converting binary to octal binary number is splitted in groups of three, that are

Explain difference between Security and Protection? Protection mechanism: The subsequent mechanisms are commonly utilized for protecting files having programs and data. (a

Optical disk becomes an attractive alternative for backing up information from hard disk drives and employs large text, audio and video data. Advent of CD-ROM-R and DVD-ROM-R has b

A two stage non-blocking network requires twice the number of switching elements as the single stage non-blocking network. It is true or false. Ans: It is true that a two st

Explain carry save addition (CSA) process. Ans: Instead of allowing the carries ripple along the rows, they can be saved and then introduced into the next roe at the right wei