rose-compiler / rose

Developed at Lawrence Livermore National Laboratory (LLNL), ROSE is an open source compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C (C89 and C98), C++ (C++98 and C++11), UPC, Fortran (77/95/2003), OpenMP, Java, Python and PHP applications.
http://rosecompiler.org
Other
600 stars 132 forks source link

Survey Question on the For loop in source file tests/nonsmoke/functional/CompileTests/OpenMP_tests/jacobi-collapse.c line 247 #203

Closed pdhung3012 closed 2 years ago

pdhung3012 commented 2 years ago

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 247 of file https:/github.com/rose-compiler/rose/blob/master/tests/nonsmoke/functional/CompileTests/OpenMP_tests/jacobi-collapse.c Here is a part of the code:

omp parallel for private(xx,yy,temp,j,i) reduction(+:error) collapse(2) for (i = 0; i < n; i++) for (j = 0; j < m; j++) { xx = (-1.0) + (dx (i - 1)); yy = (-1.0) + (dy (j - 1)); temp = u[i][j] - ((1.0 - (xx xx)) (1.0 - (yy yy))); error = error + (temp temp); }

Sincerely thanks

chunhualiao commented 2 years ago

I think that you are asking the obvious. All information is in the code or you can run it.

I will try to answer one and close other similar issues.

  1. the pragam is used to parallel the loop followed.
  2. 5
  3. Yes
  4. the code is self contained for input.