Question: Given the OpenMP code below with different possible schedule options, the code is executed on a 4 core machine to initialize an upper triangle of

Given the OpenMP code below with different possible schedule options, the code is executed on a 4 core machine to initialize an upper triangle of 100x100 matrix size with zeros.

#pragma openmp parallel for private(j) schedule( ... )

for (i = 0; i < 99; i++)

for (j = i+1; j < 100; 34-1-) {

a[i][j] = 0.0;

}

Describe each option of the schedule in relation to speed. In particular. since each iterate of the inner loop above does just one assignment. we can estimate the execution time by counting how many assignments each thread does (notice that all together, there are exactly 4,950 assignments). So for each schedule clause, estimate how long the parallel zed loop will run. Explain how you arrived at your estimates.

schedule(static)

schedule(static, 10)

schedule(static, 1)

schedule(dynamic, 1)

schedule(dynamic, 10)

schedule(dynamic, 20)

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!