Hello programming colleagues,
you might have seen the post on Open MP flag changing the results
even for the non-OpenMP code.
Now I am trying to track down all the issues in this code, I find that the code owners (“developers”) use the array dimension as a form of conditional.
e.g : their typical usage:
parameter (ni=11,nj=12,nk=34,np=0,ns=13) real a(ni,nj,nk,np,ns) do ip = 1, np C work on P stuff in "a" end do
Some versions have NP as a real useful value. In this case the loop is not done when np = 0 (or so they intend).
I do not like this kind of programming but it would take a lot of effort to rip it out or program around it so I have to allow for it. However, what I would like to know is how the PGI compiler is dealing with the actual array?
Especially as NP is not the outer dimension.