Starting from:

$55

CSC4005 Homework 1- Parallel Odd-Even Transposition Sort Solution

Description:
In this homework, you are required to write a parallel odd-even transposition sort by using MPI. A parallel odd-even transposition sort is performed as follows:
Initially, m numbers are distributed to n processes, respectively.
1. Insides each process, compare the odd element with the posterior even element in odd iteration, or the even element with the posterior odd element in even iteration respectively. Swap the elements if the posterior element is smaller.
2. If the current process rank is P, and there some elements that are left over for comparison in step 1, Compare the boundary elements with process with rank P-1 and P+1. If the posterior element is smaller, swaps them.
3. Repeat 1-2 until the numbers are sorted.

You need to use MPI to design the program. The number of processors used to execute the program is n that is much less than m. The following gure is an example to design your MPI program:

Requirement
The array data should be randomly generated.
You need to implement two versions of the tasks including a MPI version and a Sequential version.
The implementations of both versions need to be submitted in separate files.
You need to print the following information that identies your name, student id, assignment id, implementation version, running time of the whole program. (see following as an example.)

submitted code.
You need to specify the command line that you compile and run your program in your report.
You need to compare the performance of different implementations or configurations in your report:
the number of cores used in the MPI program. (Only 1-20 cores comparison is enough) the size of the random generated array. (Small, Medium, Large)
MPI vs Sequential
More if you have
You need to include a figure describing the flow chart of your MPI program
The report should be in appropriate format, with a title page, introduction session to introduce the basic problem and task, method session to describe your parallel implementation, result session to compare performance under different configurations, and a conclusion session which concludes your experiment results.


Where and What to Turn in Your Homework
Please turn in below several material:
Report
Source codes for you program for both sequential and MPI implementation Zip all your material and submitted them to BlackBoard. And make sure to name it studentid.zip

Tips

More products