Varythe number of threads for 4 8 12 16 20 24 and 32 you


Implement and test the OpenMP program for computing a matrix-matrix product(part of the code that computes the matrix-matrix product is given below). Varythe number of threads for 4, 8, 12, 16, 20, 24, and 32. You can also use theOMP_NUM_THREADS environment variable to control the number of threads. Run the code for varied number of threads and plot the performance with varyingnumbers of threads. Consider three cases in which

(i) only the outermost loop isparallelized;

(ii) the outer two loops are parallelized; and

(iii) all three loops areparallelized. What is the observed result from these three cases?

Analyze yourresult.You should submit your c code, your report that includes your plots and analysis.#pragma omp parallel default(private) shared (a, b, c, dim)num_threads(4)#pragma omp for schedule(static)for (i = 0; i < dim; i++) {for (j = 0; j < dim; j++) {c(i,j) = 0;for (k = 0; k < dim; k++) {c(i,j) += a(i, k) * b(k, j);}}}

Request for Solution File

Ask an Expert for Answer!!
Dissertation: Varythe number of threads for 4 8 12 16 20 24 and 32 you
Reference No:- TGS01365151

Expected delivery within 24 Hours