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
How does TCP achieve reliability? One of the most significant technologies is retransmission. While TCP stands data the sender compensates for packet loss through implementing

what is parsin? Source programmed statements are observed as tokens, recognizing, building block of language the task of scanning the source statement and classifying the diff

Q. Show the layout of Dvorak-Dealey keyboard? This was one keyboard layout designed to be a challenger to QWERTY layout. This was designed by August Dvorak and William Dealey a

What are threads? A thread, sometimes termed as a lightweight process (LWP), is a fundamental unit of CPU utilization; this comprises a thread ID a register set and a stack and

Define various system? Single job system: Only one program may be run at a time, and therefore only one person might be work on a machine at one time.  Multi job system:

How many bits must be decoded for chip select? What is the size of decoder when 128 × 8 RAM chips are required to provide a memory capacity of 2048 bytes? Ans. All higher order l

Can we define our own Match Code ID's for SAP Matchcodes? Yes, the number 0 to 9 are reserved for us to make our own Match Code Ids for a SAP described Matchcode object.

Using Information in Information System Information Systems can be thought of as being useful at three levels:  The detail level where information is used to carry out disc

a luminous jewel game c programming start with t and end with t the output will yes or no

After going through details of device interfaces next point to be discussed is how the interface can be used to support I/O from devices. Binary information received from an extern