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
The Throughput graph represents the amount of data in bytes that the Vusers received from the server in a second. When we evaluate this with the transaction response time, we will

create a BCD adder combinational ckt. that adds 2 digit BCD inputs

how Hierarchical Routing implement in c or cpp

What is a system call? A  system  call  is  a  request  made  through  any  program  to  the  operating  system  for performing tasks, picked by a predefined set, that the said

How and what data is collected - Weather simulation -  Sensors measure pressure, relative humidity, temperature and wind speed and wind direction -  Sensors are placed in w


Yet another type of input is HIDDEN input. A HIDDEN input is a value/name pair which is returned to you but doesn

What are the advantages of a Smart Card? Advantages of Smart Card as given below: a. This provides convenience and assists for multiple currencies over borders. b. Us

The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?

How are instructions sent between memory and the processor? Both the instruction pointer (IP) and program counter (PC) utilized to holds the memory address of the next inst