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 questionnaries and observation of work site for banking system?

Step 1: Click on the icon in the object tool bar Or Insert -> Media -> Choose the media type to be inserted Step 2: Find and select the file required (browse) Step 3: C

Q. How many instructions in a Computer? A computer can have a vast number of instructions and addressing modes. Older computers with the growth of Integrated circuit technolog

Interconnection Network Introduction This unit discusses the types and properties of interconnection networks.  In multiprocessor systems, there are multiple I/O modules

What are the differences between a Database index and a match code? Match code can have fields from several tables whereas an index can have fields from only one table.

Given a four level hierarchical storage system consisting of: cache,  primary storage, secondary storage, and tertiary storage. Suppose the following:  programs may be executed on

The following is the required interface for the mouse and cheese problem. Your program is required to read its input from a file named 'maze.txt' In the maze.txt

Q. What are inertial and non-inertial frame of references? (i) Inertial (or) unaccelerated frames: Bodies in this frame follow Newton's law of intertia as well as othe

Direct or random access of elements is not possible in:- In Linked list direct or random access of elements is not possible

You have a file having sporting goods that are sold online. Every item record contains the item id, item name, item description, item category, item price, and the units in stock.