It was only a warning and I believe that it was okay (though I am not an Intel compiler expert). If you look at Section 2.5.1 Loop Construct (in the version 3.0 spec - though the restriction is also in the previous specs), you will see listed under restrictions:
• The values of the loop control expressions of the loops associated with the loop directive must be the same for all the threads in the team.
The warning is most likely being generated because the end condition ( < TestScan.getThetaPoints) can not be verified at compile time to be the same for all threads. You can verify this by changing the program to something like:
- Code: Select all
endCond = TestScan.getThetaPoints();
#pragma omp parallel for
for(int testcol = 0; testcol < endCond; testcol++)
If you are not seeing the remark about the OpenMP defined loop being parallelized, then there is a good chance it wasn't. That is a problem.