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 page headers for secondary lists? On secondary lists, the system does not show a standard page header and it does not trigger the event. TOP-OF-PAGE.  To make page

Which TTL logic gate is used for wired ANDing ? Ans. Open collector output, TTL logic gate is used.

What is store program control (SPC)?  In  stored  program  control  systems,  a  set  of  instructions  or  program  to  the computer  is  stored  in  its  memory  and  instru

state and explain the advantages of having densely packed integrated Circuits in the computer

Explain the uses of Keyboards An alphanumeric keyboard for a graphics system is used primarily as a device for entering text strings. Keyboards can also be provided with featur

For what DMSP stands? DMSP stans here for Dist ributed Mai l system Protocol.

Difference between relocatable and self relocatable programs. A relocatable program is one which can be processed to relocate it to a selected area of memory. For illustratio

Q. PVM communication model? A nonblocking receive as soon as returns with either data or a flag that data hasn't arrived while a blocking receive returns only when data is in r

Discuss the life cycle of JSP. A JSP (JavaServer Pages) page services requests like a servlet. Therefore, the life cycle and many of the abilities of JSP pages (particular in t

How many types of size categories and data classes are there? There are five size categories (0-4) and 11 data classes only three of which are suitable for application tables: