Mpi communications, Computer Engineering

Assignment Help:

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.


Related Discussions:- Mpi communications

Explain the term internet, Explain the term Internet. Internet: ...

Explain the term Internet. Internet: The Internet, an umbrella term covering countless network and services that comprise a super-network, is a global network of compute

Statistical technique, Ask qa survey was conducted among the residents of p...

Ask qa survey was conducted among the residents of pune city,it suburbs and the pune cantonment area.the following three pie diagrams show their respective preferences for living i

What is drag, Move the mouse pointer over the object you wish to drag, and ...

Move the mouse pointer over the object you wish to drag, and then hold down the left mouse button. Whereas holding the mouse button, move the mouse pointer (and the object) to the

What do you meant by a multimedia authoring system, Problem : a) What d...

Problem : a) What do you meant by a Multimedia Authoring System? b) Compare the verbose syntax to the dot syntax in Lingo. c) Explain each of the following terms: i) L

What do you mean by removable drives, A disk drive with removable disks is ...

A disk drive with removable disks is known as removable drive. A removable disk can be replaced by other similar disk on same or different computer so providing huge data storage w

What is flash memory, Q. What is Flash Memory? This memory is other fo...

Q. What is Flash Memory? This memory is other form of semiconductor memory that was first introduced in mid-1980.  These memories can be reprogrammed at high speed and therefo

Explain the process of theory driven discovery, Question 1 Explain brie...

Question 1 Explain briefly the process of matching production rules against working memory 2 Explain Simplification, Conjunction and Transportation in propositional logic by

How can we use ordered lists, Q. How can we use Ordered Lists? Lists ha...

Q. How can we use Ordered Lists? Lists having numbered items are termed as ordered lists. They are used when items in the list have a natural order. They can also be used when

Instruction pipelines, Instruction Pipelines As discussed previous, the...

Instruction Pipelines As discussed previous, the stream of instructions in the instruction implementation cycle, can be realized through a pipeline where overlapped implementat

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd