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
Multi-Layer Network Architectures: As we considered we saw in the previous lecture that perceptrons have limited scope in the type of concepts that they can learn - but they c

Association and classes betwnn student and university Association and classes are alike in the sense that classes describe objects, and association describe links. Figure shows

Static or Dynamic - artificial intelligence An environment is static if it doesn't change while an agent's program is making the decision about how to act. When programming ag

During the Persian Gulf crisis of 1991, U .S forces deployed a Dynamic Analysis and Re planning Tool, DART ( Cross and Walker, 1994) to do automated logistics planning and schedu

What is an algorithm The solution to any problem that is stated by an exact number of well-defined procedural steps is known as an algorithm.

Q. What do you mean by Prototype? A prototyping approach lay emphasis on the construction model of a system. Designing and building a scaled-down though functional version of a

Define Electronic Data Interchange. An EDI stand for Electronic Data Interchange is used by organizations for transactions which occur on regular basis to a pre-determined for

Q. Give the difference between Register and Counter. Q. Give the difference between Flip-flop and Latch. Q. Draw a set of waveforms for following signal on out-put line.

In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, t

Explain the number unobtainable tone in strowger telephony with waveforms and the timings. In the following figure illustrates the number unobtainable tone that is continuous