Assignment 1 OpenMP
Use OpenMP to parallelize the deqn code
The overall objective is to achieve good speedup by inserting OpenMP directives in the deqn code
Speed up is the ratio of the execution time of the sequential version of a program to the execution time of the parallel version of the program
You also need to
benchmark the runtime of each relevant loop and the runtime of the
whole parallel program against the number ofthreads
benchmark the overhead of OpenMP
1
Assignment 1 OpenMP Write a report
Explain in detail what you did with the sequentialcode
benchmark the runtime of each relevant loop and the runtime of the whole parallel program against the number of threads; present the runtimes in graph or table; analyze the results
Discuss the iteration scheduling in your program
Analyze the overhead of OpenMP
Presentation skills, spelling, punctuation and grammar
Up to four A4 pages
2
Submission
Put all the codes and the report (pdf file) in a zip package and submit the zip package through Tabula
Deadline: 12 noon, Feb 9th, 2021
deqn
Model the transfer of heat through a material
Expressed as a partial differential equation, where u is the temperature, which is the function over coordinates x and y, and time t
Use the numerical method to solve the equation, i.e, obtain the values of u at coordinates (x, y) and at time points t
Discretize the space and the time
Discretize the time
Discretize the space
4
deqn
Model the transfer of heat through a material
Expressed as a partial differential equation, where u is the temperature , x and y are coordinates
Use the numerical method to solve the equation, i.e, obtain the values of u at the coordinates (x, y) and at the time point t
Discretize the space and the time
Convert partial differential equation to linear equation
5
Convert partial differential equation to linear equation
Data Dependency
ux-h,y
ux,y-h
ux,y
ux,y+h
ux+h,y
t
ux-h,y
ux,y
ux+h,y
ux,y+h
t+k
Question: How to parallelize the computation?
time
Given the initial temperature of the material, we can calculate the temperature of the material at any time point and space location
7
Parallelism
Thread 1 Thread 2
Ux,y-1
Ux-1,y
Ux,y
Ux+1,y
Ux,y+1
Each thread calculates the temperature at any time and at its local space in parallel
Thread communication
8
Reviews
There are no reviews yet.