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 is dynpro?What are its components ? A dynpro (Dynamic Program) having of a screen and its flow logic and controls exactly single dialog steps. The dissimilar components

Explain about the organisations use in EDI. Organisations, which are use Electronic Data Interchange. Extensive users of Electronic Data Interchange (EDI) include: BHS:

INFORMATION DISTRIBUTION: The organization and management of any institution, be it an isolated lab or a large site with many labs, requires that information is managed. Methods o

Any function can be expressed in a truth table.A truth table lists all possible combinations ofinputs and gives the output produced in eachcase.Truth tables must include all combin

The objective of this practical assignment is to use the POSIX environment to write a program that simulates the supply and demand between three processes: warehouse, factory and r

Explain about the network security. Network security implies the protection of networks and their services through unauthorized access, destruction or disclosure, modificati

Q. Standards used for development of a system? Documentation standards: It must be an ongoing activity at the time of system development life cycle.  Quality Standards:

Identifying Constraints between Objects In a system, there are few boundaries to work on. Boundaries or Constraints are functional dependencies among objects which are not con

Differentiate between QA and testing. - Quality Assurance is more a stop thing, ensuring quality in the company and thus the product rather than just testing the product for so

Greedy Search - artificial intelligence: If we have a heuristic function for states, defined as above, so we can simply measure each state with respect to this measure and ord