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

Find the largest and the smallest array values, Q. Find the Largest and the...

Q. Find the Largest and the Smallest Array Values? Write down a program to find the largest as well as the smallest numbers from a given array. This program uses JGE (jump grea

Example of calculate maximum access time & cost of switch, Calculate the ma...

Calculate the maximum access time that can be permitted for the data and control memories in a TSI switch with a single input and single output trunk multiplexing 2500 channels. Al

Advantages of random scan display, Advantages of random scan display ...

Advantages of random scan display Early computer displays: basically an oscilloscope. Control X, Y with vertical/horizontal plate voltage. Often used intensity as

Evaluate the damping coefficient, A certain car has suspension modes which ...

A certain car has suspension modes which are uncoupled front to back.  When a person with a mass of 60 kg sits in the rear of a car, in the centre of the seat which is directly ove

Diffrence between cd-r vs cd rw, Q. Diffrence between CD-R vs CD RW? A ...

Q. Diffrence between CD-R vs CD RW? A CD-R disc looks same as a CD. Though all pressed CDs are silver, CD-R discs are gold or silver on their label side and a deep cyan or gree

What is multiprogramming, What is multiprogramming or multitasking? The...

What is multiprogramming or multitasking? The operating system manages the concurrent implementation of several application programs to make the best possible uses of computer

Rational number expression evaluator, Develop a RPN rational number express...

Develop a RPN rational number expression evaluator (REEval). The learning objectives are: improved procedural programming skills improved confidence in designing and

m-files and the power point presentation, Power point presentation Arra...

Power point presentation Arrange a 20 minutes power point presentation showing the original and processed filters.  Discuss the methods used for processing and comment on each r

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