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 is the cih, CIH, also known  as Chernobyl or Spacefiller, is a Microso...

CIH, also known  as Chernobyl or Spacefiller, is a Microsoft Windows computer virus which first emerged in 1998. It is one of the most damaging viruses, overwriting critical inform

Example multi-layer ann with sigmoid units, Example Multi-layer ANN with Si...

Example Multi-layer ANN with Sigmoid Units: However we will concern ourselves here that with ANNs containing only one hidden layer and as this makes describing the backpropaga

What do you mean by artificial intelligence, Q. What do you mean by artific...

Q. What do you mean by artificial intelligence? Show the artificial intelligence systems used widely in business. ANSWER: Artificial intelligence (AI) is the science of making

What are bags and sequences, What are bags and sequences? A bag is a co...

What are bags and sequences? A bag is a collection of elements with duplicates permitted.  A sequence is an ordered collection of elements with duplicates permitted.

Software engineering, how many errors will be left after defect amplificat...

how many errors will be left after defect amplification and removal method on the following data design=40 analysis=30 maintenance=20 testing 35 coding 25 take 75% removal efficie

The interface chip design, This is an embedded system that involves the int...

This is an embedded system that involves the integration of hardware and software design stages. It consists of the user interface (keypads and LCD display) and two Peripheral Inte

Resolution method, Resolution Method: For a minor miracle occurred in ...

Resolution Method: For a minor miracle occurred in 1965 where Alan Robinson published his resolution method as uses a method to generalised version of the resolution rule of i

Example calculation of entropy, Example Calculation: If we see an exam...

Example Calculation: If we see an example we are working with a set of examples like S = {s 1 ,s 2 ,s 3 ,s 4 } categorised with a binary categorisation of positives and negati

Explain the concept of generalization, Explain the concept of Generalizatio...

Explain the concept of Generalization Generalization and inheritance are powerful abstractions for sharing the structure and/or behaviour of more than one class.  Generalizati

Explain the functional units of a basic computer, Question 1 Explain th...

Question 1 Explain the functional units of a basic computer with a neat diagram 2 What do you mean by addressing modes? List the different types of addressing modes 3 Exp

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