Intel compiler V11 and OpenMP - problem

jimdempseyatthecove
Total Points:
36,372
Status Points:
36,372
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


--------

Blog: The Parallel Void


www.quickthreadprogramming.com


Intel Software Network Forums Statistics

8458 users have contributed to 31571 threads and 100533 posts to date.
In the past 24 hours, we have 17 new thread(s) 131 new posts(s), and 152 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Quoting - rase if (k.eq.0

Please welcome our newest member soundmyth