Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MPI program to do selection sort of an array. NOTE: If you simply copy paste answers i will report against you.. You should do it

MPI program to do selection sort of an array.

NOTE: If you simply copy paste answers i will report against you.. You should do it yourself and explain each step.

Implement the following concept in MPI program to sort. (ONLY USE MPI_SEND AND MPI_RECV)

SEE BEOW CAREFULLY:

image text in transcribed

The master processode would give the data to the dummy master processode which will further divide it to rest of the nodes. The last line of nodes can sort the sub set of data and return the sorted subsets to their parents.

image text in transcribed

DONOT COPY OTHER ANSWERS OTHERWISE I WILL REPORT.

WRITE THE MPI PROGRAM AND EXPLAIN EACH STEP

Master Process/Node o {n elements to be sorted} Submitting sorting Job MPI Send) Dummy master Process/Node 1 {n elements to be sorted} MPI Send() MPI Sendo Process/Node {n/2 elements to be sorted} Process/Node {n/2 elements to be sorted} MPI Sendo MPI Send() MPI Send() MPI Send() Process/Node {n/4 elements to be sorted} Process/Node {n/4 elements to be sorted} Process/Node Process/Node {n/4 elements to be sorted} {n/4 elements to be sorted} Master Process/Node o {n elements to be sorted} Gathering sorted jobs MPI Send() Dummy master Process/Node 1 {last sort for 2 sets of n/2 elements} MPI Send) MPI Send Process/Node {sort 2 sets of n/4 elements} MPI Send Process/Node {sort 2 sets of n/4 elements} MPI Send MPI Send() MPI Send) Process/Node {sort n/4 elements} Process/Node {sort n/4 elements) Process/Node {sort n/4 elements} Process/Node {sort n/4 elements} Master Process/Node o {n elements to be sorted} Submitting sorting Job MPI Send) Dummy master Process/Node 1 {n elements to be sorted} MPI Send() MPI Sendo Process/Node {n/2 elements to be sorted} Process/Node {n/2 elements to be sorted} MPI Sendo MPI Send() MPI Send() MPI Send() Process/Node {n/4 elements to be sorted} Process/Node {n/4 elements to be sorted} Process/Node Process/Node {n/4 elements to be sorted} {n/4 elements to be sorted} Master Process/Node o {n elements to be sorted} Gathering sorted jobs MPI Send() Dummy master Process/Node 1 {last sort for 2 sets of n/2 elements} MPI Send) MPI Send Process/Node {sort 2 sets of n/4 elements} MPI Send Process/Node {sort 2 sets of n/4 elements} MPI Send MPI Send() MPI Send) Process/Node {sort n/4 elements} Process/Node {sort n/4 elements) Process/Node {sort n/4 elements} Process/Node {sort n/4 elements}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago