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
Difference between Vertical and Horizontal Organization Vertical Organizations  It is a usual approach which is typified by a functional approach to work in which departme

A Scanner is a device which allows you to capture photographs or drawings or text from tangible sources (paper or slides etc.) in electronic form. Scanners work by detecting differ

#question.constructors and destructors

Q. What is Stack Addressing? In this addressing technique operand is implied as top of stack. It isn't explicit however implied. It employs a CPU Register known as Stack Pointe

In a 10000 line exchange, 0000 to 2999 is allotted to x group of subscribers, out of which 40% are active during busy hour. The remaining numbers are domestic numbers out of which

Directed-Test Methodology Building a directed verification environment with a comprehensive set of directed tests is very time-consuming and difficult. As directed tests only c

Rhythm Rhythm in art refers to the way that your eye moves through a picture and can be thought of in a similar way to rhythm in music. Your eye will move through some picture

Eliminating hazards of pipeline -  computer architecture: We can delegate the work of eliminating data dependencies to the compiler, which can fill up in suitable number of NO

a. What are the benefits of hardwired and micro programmed control? b. Sketch neat diagram of single bus organization of CPU showing ALU, all types of registers and the data pat

What are the advantages and disadvantages of macro pre-processor? Advantages Any of existing conventional assembler can be improved in this way to incorporate macro proces