Skip to content

Survey Question on the For loop in source file OpenMP/Exercise-2/codes/with-openmp/blockordermultiply.c line 87 #1

Open
@LChenGit

Description

Hello Sir/ Madam
We are from a research group at Iowa State University, USA. We want to do a survey on Github developers on the methods they used for paralleling their code. To do the survey, We want to ask three questions about this for loop:

  1. Can you briefly explain the purpose of using pragma for this case? If the pragma contained reduction and private clauses, can you briefly mention the purposes of variables in those clauses?

  2. How much confidence do you have about the correctness of this implementation? You can choose from 1-5 with 1 as the lowest confidence score and 5 as the highest confidence score.

  3. (Optional) Do you actually run (interpret the code with compilation and pass input/get output) the code and see the optimization of parallelization? Yes/No

  • If yes, can you provide the information of what are the input and expected output of this program (the input that caused the program to run through this for-loop).

The for loop is from line 87 of file https:/github.com/elixir-code/HPC-Lab/blob/master/OpenMP/Exercise-2/codes/with-openmp/blockordermultiply.c
Here is a part of the code:

omp parallel for default(none) shared(n_blocks, matrixA, matrixB, matrixC) private(i,j,k) num_threads(NUM_THREADS[num_threads_index]) collapse(2)
for (i = 0; i < n_blocks; ++i)
for (j = 0; j < n_blocks; ++j)
for (k = 0; k < n_blocks; ++k)
matrixMultiplication((((matrixA + i)) + k), (((matrixB + k)) + j), (((matrixC + i)) + j), ((i == (n_blocks - 1)) && ((2048 % ((int) floor(sqrt(16)))) != 0)) ? (2048 % ((int) floor(sqrt(16)))) : ((int) floor(sqrt(16))), ((k == (n_blocks - 1)) && ((2048 % ((int) floor(sqrt(16)))) != 0)) ? (2048 % ((int) floor(sqrt(16)))) : ((int) floor(sqrt(16))), ((j == (n_blocks - 1)) && ((2048 % ((int) floor

Sincerely thanks

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions