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 Concept of Process Informally, a method is a program in execution, behind the program has been loaded in the main memory. However, a method is more than just a program code

Q. Future scope of the Internet? The future scope of the Internet, along with the World Wide Web (born in 1990), and the commercialization of the Internet are bound to grow exp

Q. Explain traditional computer clusters? Grid computing employs resources of a lot of separate computers linked by a network (generally internet) to resolve large-scale comput

List the major components of the keyboard/Display interface. a. Keyboard section b. CPU interface section c. Display section d. Scan section

Explain definition of fibonacci Where an input value gives a trivial result, it is returned directly, otherwise the function calls itself, passing a changed version of the inpu

Q. Describe about Remote-load Latency Problem? When one processor requires some remote loading of data from other nodes then processor has to wait for these two remote load ope

find area uder the curve y=f(x) between x=a and x=b Posted Date: 9/1/2012 1:50:09 AM

Ground substitution: Here the act of performing an instantiation is a function like there is only one possible outcome means we can write it as a function. And the notation Su

Currently microcontrollers are embedded within most products, typical uses are in Camera's for auto focus and display drivers, Laser printers to compute fonts and control printing.

Shifting a register content to left by one bit position is equivalent to ? Ans. Multiplication by two is equivalent while shifting register content to left by one bit position.