Question: For the second project about shared memory programming, you are going to experiment with OpenMP implementations of Trapezoidal Rule. 1 ) Download omp _ trap

For the second project about shared memory programming, you are going to experiment with OpenMP implementations of Trapezoidal Rule.
1) Download omp_trap1.c from GitLab, and delete the critical directive. Now compile and run the program with more and more threads and larger and larger values of n. How many threads and how many trapezoids does it take before the result is incorrect?
2) Please time the computation using OpenMP function omp_get_wtime(). The syntax is
double omp_get_wtime(void)
It returns the number of seconds that have passed since some time in the past.
Please run this code on your computer with onethreadandalargevalueofn,and
two threads and a the same value of n
Repeatituntilyoureachthecorecount. What happens? Please explain your observations.
3) Download the other Trapezoidal Rule implementations from GitLab. Please run the same experiment with these implementations as well. How do the performances compare? Explain your answers.
4) Please prepare a table with threads, problem size, trapezoidal rule implementations as its columns. Include the wall clock time, speedup, efficiency calculations as well. Prepare several plots with these results and discuss your observations.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!