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
A computer system that allows multiple users to run programs at similar time   Multi tasking system

Write a program to display grade message according to the marks

What are the types of convergences? Three different types of convergences are: a. The convergence of wireless and e-commerce technology b. The Convergence of E-Commerce a

Description Variables show values that can be changed within a procedure or function. Local scope variables are placeholders that reside within a function- or a script-body.

Define system space.  Management routines are part of the operating system of the computer. It is suitable to assemble the OS routines into a virtual address space.

In the module on WSDL you were presented with the details of the WSDL service that receives a request for a stock market quote and returns the quote. The basic structure of a WSDL

Intuitively Simple - User Friendliness This is the degree to which the system operates in congruence with human operation, in effect the machine does what we naturally think i

Q. Sequential Execution of Instructions in RISC? Let's describe pipelining in RISC with an illustration program execution sample. Take the given program (R denotes register).

Q. What is Collective Message Passing? In collective message passing all the processes of a group take part in communication. MPI offers a number of functions to apply the coll

State briefly about the  Register Transfer A micro operation is a basic operation performed on information stored in one or more registers. The result of operation may replace