Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Data Race for Private Variable

New Contributor II


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(:,:,:)


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



0 Kudos
0 Replies