Question
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:
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.
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started