程序代写 COMP328

University of Liverpool 2021-2022 COMP328
COMP328 (2021-2022): Assignment (20% of total marks)
For this assignment, you are asked to do the parallel implementation for the Gaussian Elimination. To finish this assignment, it requires knowledge of parallel programming and to run parallel codes on the compute nodes of the University HPC facility, Barkla.
Gaussian Elimination is a method used to solve a system of linear equations. It starts by presenting the linear system with 2D array, then performing a sequence of row reduction to convert the left-hand corner of the matrix to zero as much as possible. The obtained matrix will be in row echelon form. The next step is to convert the matrix to reduced row-echelon form by making all the leading coefficients equal 1, and every column containing a leading coefficient has zeros elsewhere.

Copyright By PowCoder代写 加微信 powcoder

Please read the following tutorials on Gaussian Elimination
• https://www.ucl.ac.uk/~ucahhwi/MATH6502/handout12.pdf
• https://www.macs.hw.ac.uk/~jim/112MH1/notes/gaussian.pdf
• https://sites.engineering.ucsb.edu/~hpscicom/projects/gauss/introge.pdf
For this assignment, you need to develop two versions of the algorithm (1) parallel version withOpenMP,and(2) parallelversionwithMPI.Furtherimportantdetails(&hints)aregiven below but your key tasks are to:
1. Parallelise the problem using OpenMP and MPI (i.e. you will write two parallel codes, one is parallelising via OpenMP and another parallelising via MPI). You should run on a number of cores, ensuring the program behaves correctly for any number of OpenMP threads or MPI processes.
2. Write a brief, formal report that discusses these implementations and their scaling of the parallel implementations. The report should clearly state the time taken by the fastest correct solution you obtained.
Note that whilst you have to provide the two parallel implementations MPI and OpenMP. The order in which you develop these is up to you.
Learning Outcomes
Learning Outcome (from Module Specification) Is the L.O. addressed by this assignment?
(LO1) to gain an appreciation of the needs for parallel computing and High Performance Computing (HPC)
Yes, in the report by discussing a serial Gaussian Elimination implantation and addresses the serial approach limitations and how it can be improved by parallelising the algorithm.
(LO2) to be able to read & understand parallel programmes written by others
Partially via an example solution provided after the assignment deadline; it is also addressed by learning materials throughout the lectures and by some sample solutions to labs
(LO3) to be able to design and implement parallel programmes, using a variety of paradigms, and to run them on a real-world HPC facility
Yes, as well as by practical lab sessions

University of Liverpool 2021-2022 COMP328
Requirements of Assignment
• You are required to use the Intel compiler, and you are required to run on the compute nodes of Barkla.
• You will lose marks if you use other compilers, do not run on Barkla or do not make use of the Barkla batch system.
• You are required to provide your codes, your batch scripts and your SLURM output files. You will lose marks if any of these are missing.
• Cross checking is done between all files submitted by all students to identify any suspected cases of collusion – whilst you can at a high level outline an approach to a friend, you are at risk of getting zero marks if you show them any of your code or scripts or outputs or any part of your report and they copy all (or even some) of it.
• You are also required to use the C programming language.
All execution runs should occur on the compute nodes of Barkla. In the labs you have seen which flags to pass “sbatch” for OpenMP and which to pass for MPI. You may use the “course” partition of SLURM to run your codes, noting that it has a default for a job’s maximum wall clock run time of 30 minutes. The “course” partition comprises a single compute node. For timing your production runs, please ensure you use the “–exclusive” flag for “sbatch” (and conversely, you should not use this if you are developing the code and checking for correctness rather than undergoing timing runs).
If you wish to use, say 2 compute nodes, then you should use the “nodes” partition and the “-N” flag of “sbatch”, along with a value to pass “-t” that relates to a realistic maximum wall clock run time for your batch script. The default for “nodes” partition is 8 hours so by explicitly naming a shorter time (e.g. “-t 20” for 20 minutes) you are more likely to have your job scheduled earlier.
Subject to meeting all the above conditions, you may additionally use any hand-coded optimisations or use of maths libraries you wish, as long as you obtain an efficient, accurate and parallel solution. You should recall what has been covered in lectures and labs as to obtaining appropriating timing data and discuss in the report how you have followed good practises for obtaining appropriate timing for each of OpenMP and of MPI.

University of Liverpool 2021-2022 COMP328
your report structure should be as follows,
1. background explanation of the Gaussian Elimination, and the limitations of using serial implementation of the method.
2. implementation
2.1 Gaussian Elimination OpenMP code explanation.
2.2 Gaussian Elimination MPI code explanation.
3. Analysis: this should include dissection to the parallel-versions results, include timing, comparison, efficiency of the used method, …etc.
4. conclusion.
The report should be up to 6 pages that includes:
• Discussion of your parallelisation strategy (see above) e.g. how did you decide to implement parallelism, and what data needs exchanging and how to do so
• Discussion of the OpenMP parallelisation including why you put parallel region/s where did, how you determined the scope for each variable within each parallel region, and what optimisations you implemented to ensure maximum OpenMP performance.
• Discussion of the MPI parallelism including how data is shared between MPI processes at different stages of the simulation. Have you implemented any optimisations to ensure maximum MPI performance.
• State how you obtain timing data for each parallel implementation, and ensure you upload each script that you discuss.
• State the time taken by fastest correct solution you obtained.
• Discussion of any limitations to your designs and what else would you try if you had
more time &/or more expertise? Is there anywhere you can identify as time being
• Discussion of accuracy your parallel runs.
• Include any problems you faced, what this meant to your implementation, how you
tried to overcome them, and what you think would have changed if you could have
overcome them.
• In your conclusions, state which of these approaches you would be most likely to use
in the future and explain why.
• You are required to follow the guidlined in academic citation.

University of Liverpool 2021-2022 COMP328
In the report You should not include a full listing of your code (since you are submitting the code itself). You should not include numerous screen shots of timings – these should be available within the SLURM output files you will submit but you can make use of an Appendix should you wish to give an expanded table of data.
Please take the time to read the “Academic Integrity Policy” tutorial as soon as possible, writing good reports, and how to use references. https://www.csc.liv.ac.uk/department/integrity.pdf
This assessment contributes 20% to the overall mark in the module. The scores from the above marking scheme will be scaled down to reflect that. Your assignment is two parts code and report,
CODING (45%)
good HPC programming practices/implementations OpenMP
Slurm out files
Bash script files
REPORT (55%)
background explanation of the algorithm and highlight the problem Gaussian Elimination OpenMP code explanation
Gaussian Elimination MPI code explanation
conclusion
Submission
Your submission must include:
(9%) (12%) (12%) (6%) (6%)
(11%) (12%) (12%) (10%) (10%)
• Zipfile uploaded to CANVAS assignment submission system that comprises your report, the working OpenMP and the working MPI implementations discussed in the report, and all batch scripts & all SLURM output files used to obtain data that you discuss in the report.
• Submissions will be submitted to automatic plagiarism/collusion detection systems, and those exceeding a threshold will be reported to the Academic Integrity Officer for investigation regarding adhesion to the university’s policy https://www.liverpool.ac.uk/media/livacuk/tqsd/code-of-practice- onassessment/appendix_L_cop_assess.pdf
DEADLINE & SUBMISSION
The deadline is 4:00 pm, Tuesday 10-May-2022. University rules, regarding penalties and exceptions for lateness/sickness & exceptional circumstances will apply, please see:

University of Liverpool 2021-2022 COMP328
https://www.liverpool.ac.uk/aqsd/academic-codes-of-practice/code-of-practice-on- assessment/.
If you wish to claim “exception from late penalties” or “exceptional circumstances” you should speak as soon as you can, ideally before any deadlines, with the Computer Science Student Experience Team and speak to your Academic Advisor.
—————————————————–End of the assignment ————————————————-

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com