I have the following loop parallelized with openmp directives:
do jg = 1,ng
c$omp parallel shared (jg,nr,nt,in,out) private (c1,i)
c$omp do schedule(dynamic,1)
do i = 1, nr
c copying the column of the three-dimensional array to
c one-dimensional array c1 of the size nt
c1 = in(0:nt-1,i,jg)
c calling some function affecting c1
c copying the transformed array to output three-
c dimensional array
out(0:nt-1,i,jg) = c1
c$omp end do nowait
c$omp end parallel
While analyzing this code region with Thread Checker the read/write error is reported in this parallel region. But as I suppose there is no conflict in read/write access becuase each parallel thread deals with its own column of in and out arrays and c1 array is private to the threads.
How can I change this code to work properly? I can not exactly understand the nature of the error: whether it is impossible to declare the whole array c1 as private to the threads or the out array is treated as the instance i have to syncronyze access to.
If anyone dealed with parallelization in terms of openmp, would you please help me?