Sale!

COMP 5426 Assignment 2 Solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (5 votes)

1. In Assignment 1 you were asked to write a parallel program to solve the Red/Blue computation
problem and the processes are organized as a one dimensional torus. In the first part of this
assignment you are asked to make some changes to the program you wrote for Assignment 1,
that is, to solve the Red/Blue computation problem by a set of processes which are organized as a
two dimensional torus.
§ The processes are organized as a p by q 2D torus, assuming the total number of processes is
p*q.
§ Each process will hold a block of size a*n/t by b*n/t for a and b being greater than or equal
to 0.
§ Your program must produce correct results for nprocs being greater than or equal to one.
2. In the second part of this assignment you are asked to use Pthreads to write a program to find all
prime numbers within a range from 2 to n using the Sieve of Eratosthenes.
§ Your program needs to ask for two parameters as the inputs: the largest integer in the range
and the number of thread used to solve the problem.
§ Your program needs to output all the prime numbers to a file.
§ Your parallel algorithm and implementation must consider the issue of load balancing.
Your submissions will be marked on accuracy of results, suitability of the parallelism applied, and
quality of your reports.
The format of the reports will be the same as that specified in Assignment 1.
You MUST attempt this assignment individually.
Submission Requirements
Your submission must be made by 11:59pm on Friday, 27 May.
1. Create a tar file which contains your reports, makefiles and any source files (e.g., .c and .h
files). DO NOT INCLUD ANY OBJECT OR BINARY FILES.
2. Submit only the .tar file.
NB: NO LATE SUMISSIONS WILL BE PERMITTED
Failure to follow these submission requirements can result in loss of marks.
Marking Scheme
Program for part 1 5
Program for part 2 8
Report Contents/Justification 4
Code Quality (algorithm efficiency, readability, portability, robustness, etc.) 3
Total 20