Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Data Race for Private Variable

hentall_maccuish__ja
New Contributor II
120 Views

Hello,

I have a local allocatable array in a subroutine inside the dynamic but not lexical scope of an omp parallel region. My understanding is this array should be private to it's thread by default  as it is not declared with the saved attribute, but the Intel Inspector detects a data race when I edit this array. It only affects one array out of a whole group similarly defined and always on the same statement that writes to this array not any of the other statements that also write to the same array. Since I don't know why it happens to this one array and not others I don't know how to generate a minimal replicating example but I the relevant code snippets below.

 

    RECURSIVE subroutine solvePeriodRI(params, grids, ixy, ixA, ixAIME ,ixt,ixType,spa,  EV1, policy, v)
    implicit none
...
    real(kind=rk), allocatable :: const(:,:,:)
...
 allocate(maxA(labourChoices),const(labourChoices,numPointsA,grids%supportSPA(ixt)))
...
const=exp(const)

 

The data race being detected on the last line of code.

Thanks,

 

0 Kudos
0 Replies
Reply