DAPC Assignement 4
DAPC Assignement 4
Prepare your report as a google doc (make a copy of this template) and send a link to the
course email address: [email protected]
Report on task 4
Name: Sabyrbek Madiar
Group: IT-1902
E-mail: [email protected]
Main part:
Step 0:
We will be using the sequential ray tracing program from Task 2. Download and install
Mini-Rt library (https://github.com/georgy-schukin/mini-rt), if necessary.
1. Use omp_get_wtime() to measure the execution time for the main loop:
2. Select such a scene and rendering parameters (image size, number of samples,
depth of recursion, etc.), that the execution time of the program, when running on 1
thread, is more than several seconds.
3. Measure the execution time for the parallel program on 1, 2, 4, 8, 16 threads. For
accuracy you can do several runs (>5) on each number of threads and choose the
minimal time among runs for this number of threads.
4. Build plots (line plots or bar plots; see lecture slides) for:
a. the execution time (to demonstrate how it depends on the number of threads)
b. speedup
c. efficiency
You can also additionally present obtained values as tables.
Remember that you have to compare performance of the program with different parameters
of the schedule clause. So, you will have multiple lines on your plots for different versions of
parameters. For example:
Explain reasons for the (possible) difference in the performance of the program with different
schedule parameters (you may use other parameters than in the example here).
export OMP_NUM_THREADS=1
Static = 2.36839
Dynamic = 2.36717
Guided = 2.36703
export OMP_NUM_THREADS=2
Static = 1.56911
Dynamic = 1.19633
Guided = 1.56586
export OMP_NUM_THREADS=4
Static = 0.8665
Dynamic = 0.639667
Guided = 0.85846
export OMP_NUM_THREADS=8
Static = 0.571753
Dynamic = 0.382615
Guided = 0.49057
export OMP_NUM_THREADS=16
Static = 0.368069
Dynamic = 0.261348
Guided = 0.275038
Step 4: Commit and push your changes to the Gitlab server
Upload your source files (.cpp and .h) and scene files (.txt) in Task 4 directory to the Gitlab
server.
Conclusion:
During the task I worked with OPENMP for scheduling. I used static, dynamic and guided
schedules.