Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following OpenMP eodc is executed by P threads on P processors where N >> P

ID: 3767322 • Letter: T

Question

The following OpenMP eodc is executed by P threads on P processors where N >> P Assume the same single processor must execute the "SlNGLE" and "CRITICAL" sections of the code, and assume that the time for all the OpenMP statements is negligible compared to the sections. Write an expression for the execution time of the program. What is the speedup and the efficiency over a single processor execution if N = 100000, P=32, to =25sec., t_1 = 800 sec., t_2= 15 sec., and t_3= 480 sec. !$OMP BARRIER SOMP SINGLE !$OMP END SINGLE '$OMP DO SCHEDULE(STATIC, 1) DO 10 1 = 1,N 10 CONTINUE !$OMP CRITICAL $SO MP END CRITICAL !$0MP DO SCI IEDULH(STATIC, 1) DO 20 I = 1, N 11 CONTINUE $0MP HND DO

Explanation / Answer

When there are P processors, time can be calculated using the expression:

T(P) = t0 + Pt1+ []

If N is very much larger than P ie N>>>P

The equation is

T(P) = t0 + Pt1+

If we assume that the critical part of the code be executed, the time taken by one processor can be specified by:

T(1)=t0+t1+t2