Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To complete this assignment you will need the source code provided at the following URLs. https://moodlecurrent.gre.ac.uk/mod/resource/view.php?id=2095704§ion=2 https://moodlecurrent.gre.ac.uk/mod/resource/view.php?id=2095701§ion=2 You are provided with a two C

 imageimageimage

To complete this assignment you will need the source code provided at the following URLs. https://moodlecurrent.gre.ac.uk/mod/resource/view.php?id=2095704§ion=2 https://moodlecurrent.gre.ac.uk/mod/resource/view.php?id=2095701§ion=2 You are provided with a two C program codes (called jacobi2d.c and gauss2d.c) that solve a rectangular 2-dimensional heat conductivity problem using the Jacobi and Gauss-Seidel iterative methods. This code can be compiled and linked to produce a conventional executable file called jacobiSerial and gaussSerial by using the following commands: gcc jacobi2d.c-o jacobiSerial gcc gauss2d.c-o gaussSerial To run the executable type in the executable name: jacobiSerial or gaussSerial As you implement each of the following 4 steps make sure that you retain and do not overwrite previous versions of your solutions. You must submit 4 versions of each code one for each step. Compile and execute the codes using the University HPC. Note this is a shared resource with a queue may become busy near the hand in date so make sure you give plenty of time to run your code and don't leave it to the last minute. If you are unsure how to use the HPC please check the lab notes and the instructions on Moodle. Please ensure you follow these steps carefully and with the code provided, work based on other openmpcw22.pdf - Google Chrome *Adobe Acrobat: PDF edit, convert, sign tools | chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://moodlecurrent.gre.ac.uk/pluginfile.php/3251284/mod_resource/content/4/openmpcw22.pdf & Adobe Acrobat 12C Rain off and on openmpcw22 Step 1 (25 Marks) You are required to compute a temperature distribution for a rectangular 2D head conduction problem simulating a plate with boundary conditions set at top 80C, bottom 50C, left 30C and right 20C with a range of problem sizes. To do this you are required to modify the codes to: 1. reflect the boundary conditions described above 2. report the execution time Record the run-time of your code under a range of problem sizes using different levels of compiler optimization (e.g. -01). Document your changes to your code in your report. Though you submit your code, you do not receive marks for it so it is important you highlight changes in your report. Step 2 (30 Marks) O Search Tools Convert C. C Using these tools uploads your file to Adobe cloud storage. Edit PDF to Word PDF to JPG PDF to Excel PDF to PPT Tools 00 Compress a PDF I Convert to PDF Merge PDFs DOReorder pages Rotate pages Delete pages Split a PDF Sign & Protect IND X X 4:32 PM 11/15/2022 openmpcw22.pdf - Google Chrome * Adobe Acrobat: PDF edit, convert, sign tools | chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://moodlecurrent.gre.ac.uk/pluginfile.php/3251284/mod_resource/content/4/openmpcw22.pdf & Adobe Acrobat 12C Rain off and on openmpcw22 You are then required to modify the applications you created in step 1 to produce a basic parallel version of the codes using OpenMP. The following commands will compile your parallel version on a platform that has Open MP installed: gcc -fopenmp jacobi Openmp.c-o jacobiOpenmp gcc -fopenmp gaussOpenmp.c-o gaussOpenmp The parallel codes must include timers to report the parallel run-time of the code. This version must be tested to establish correct operation using 1, 2, 4, 8 and 16 threads, regardless of performance. Include in your report, the print out of the temperatures for a 20x20 problem size for 1,2,4, 8 and 16 threads to demonstrate the code works correctly. Document your changes to your code in your report. Though you submit your code, you do not receive marks for it so it is important you highlight changes in your report. Run the Gauss-Seidel code for only 1 iteration using 1 and 2 threads for a 20x20 problem size. Output the temperatures along with the timings, include this in your report. Discuss the reasons for the differences in the solutions. Step 3 (30 Marks) Using the university HPC are to run performance tests with the OpenMP implementation you created in step 2. This will require that you remove most of the print output from the code and increase the problem size to provide sufficient work to demonstrate useful speedup. You are expected to provide speedup results: O Search Tools Convert C. C Using these tools uploads your file to Adobe cloud storage. Edit PDF to Word PDF to JPG PDF to Excel PDF to PPT Tools 00 Compress a PDF I Convert to PDF Merge PDFs DOReorder pages Rotate pages Delete pages Split a PDF Sign & Protect IND X X 4:32 PM 11/15/2022 openmpcw22.pdf - Google Chrome * Adobe Acrobat: PDF edit, convert, sign tools | chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://moodlecurrent.gre.ac.uk/pluginfile.php/3251284/mod_resource/content/4/openmpcw22.pdf & Adobe Acrobat 12C Rain off and on openmpcw22 the differences in the solutions. Step 3 (30 Marks) Using the university HPC are to run performance tests with the OpenMP implementation you created in step 2. This will require that you remove most of the print output from the code and increase the problem size to provide sufficient work to demonstrate useful speedup. You are expected to provide speedup results: 1. for at least three problem sizes, you are unlikely to see much speedup for small domains, use at least a 100x100 grid and a consistent tolerance, maximum of 10-. 2. for a range of number of threads (from 2 up to 8 threads) In calculating the speedup of your parallel code you should use the optimized single processor version of your code you produced in step 1 and compare to this. You will need to apply similar compiler optimizations to your parallel code. Please list your runtimes in a suitable unit. Please report both tour timings and the speedup from the serial version. Comment on the speedup, how does it compare to the theoretical maximum. Step 4 (15 Marks) Using different OpenMP directives and clauses you are to further modify your OpenMP application to improve the parallel performance. You are expected to provide results that permit comparison with those you obtained in Step 3. Comment on the differences between optimising the Jacobi and Gauss-Seidel Methods. Make sure you document the changes made to the code and explain why you have done them. O Search Tools Convert C. C Using these tools uploads your file to Adobe cloud storage. Edit PDF to Word PDF to JPG PDF to Excel PDF to PPT Tools 00 Compress a PDF I Convert to PDF Merge PDFs DOReorder pages Rotate pages Delete pages Split a PDF Sign & Protect IND X X 4:33 PM 11/15/2022

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

Fundamental Managerial Accounting Concepts

Authors: Edmonds, Tsay, olds

6th Edition

71220720, 78110890, 9780071220729, 978-0078110894

More Books

Students also viewed these Computer Network questions

Question

What is the purpose of the statement of cash flows?

Answered: 1 week ago