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

What are desirable features of an electronic market place, What are the des...

What are the desirable features of an Electronic Market Place? Features of an Electronic Market Place: 1. Its electronic and business center is not a physical building qu

Project, write a programme to simulate a train station to automate

write a programme to simulate a train station to automate

Bi polar junction transistor, draw input and output charectoristics of BJT ...

draw input and output charectoristics of BJT and justify CE configuration provides large current amplification

What is co-operative process, What is co-operative process? A process i...

What is co-operative process? A process is co-operating if it can affect or be affected by the other processes implementing in the system. Any process that share data with othe

How are interrupt handled by the operating system, How are interrupt hand...

How are interrupt handled by the operating system? The fundamental interrupt mechanism works as follows: The CPU hardware has wire called the interrupt-request line which

What is insert module and goal seek functions there in vba, Visual basic ap...

Visual basic applications have very rich and flexible applications but there is single limitation when using pointer function. Windows API has limited support for function pointers

Engineering phyics, what is interference of light explain the nessicity of ...

what is interference of light explain the nessicity of coharent source for obtaining sustain interference pattern

What are condition code flags, What are condition code flags? The proce...

What are condition code flags? The processor keeps track of information about the results of several operations for use by subsequent conditional branch instructions. This is a

Explain the fixed logic versus programmable logic, Explain the Fixed Logic ...

Explain the Fixed Logic Versus Programmable Logic? The Logic devices can be classified into two broad categories - fixed and programmable. The same as the name suggests, the ci

What is an on"*-input filed" statement, What is an on"*-input filed" statem...

What is an on"*-input filed" statement? ON *-INPUT The ABAP/4 module is known as if the user has entered the "*" in the first character of the field, and the field has th

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