Intel compiler V11 and OpenMP - problem

jimdempseyatthecove
Total Points:
34,847
Status Points:
34,847
Black Belt
November 22, 2008 5:06 PM PST
Rate
 
#6 Reply to #4

Tim and FDSUser,

I have an application here that (at least in the eariler versions of IVF) consistently exhibited problems in OpenMP where I have in a subroutine

    subroutine foo(x)
    real(8) :: x
    real(8) :: TOSVX1(3), TOSVX2(3), TOSVX3(3)
    ...

That these local arrays are created as if SAVE were on the declaration. That is, the code generates a static copy of the TOSVXn(3) arrays. When adding AUTOMATIC

    real(8), automatic :: TOSVX1(3), TOSVX2(3), TOSVX3(3)

This forces the arrays to be allocate on the stack

When used without the automatic, the multiple threads overwrite each others data in the temporary arrays.

Whether it is a compiler bug or an options conflict, I could not ascertain, I do know that by including automatic that there is no ambeguity in my intentions as to if the arrays must be local.

Jim Dempsey



Intel Software Network Forums Statistics

8289 users have contributed to 31235 threads and 99109 posts to date.
In the past 24 hours, we have 7 new thread(s) 24 new posts(s), and 30 new user(s).

In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing...  Escalated as

Please welcome our newest member Michael Johanson