Hello,
There is a loop in my code which is structured as such:
!$acc parallel loop gang vector collapse(3) &
!$acc& private(prim_n,g_td,tau_wall_ewm,tau_xy,tau_yz,coeff1,coeff2,dyn_visc_nj,kin_visc_nj) default(present)
do b = 1,nblocks
do k = 1,nkmax
do i = 1,nimax
if ((i .le. (ni(b))) .and. (k .le. nk(b))) then
!$acc loop seq
do l = 1,10000000
............
The code runs fine, does not crash, and seems to give a pretty close answer to what I need, but when outputting one of the output variables of the loop, I see something weird. For comparison, I will attach what is outputted when running this loop only on the host: Imgur: The magic of the Internet
When parallelized, I get something like this: Imgur: The magic of the Internet
I am not sure why this is. I tried making a bunch of different variables needed in the loop private, but this did not seem to work. I am compiling the code with -minfo=accel and I do not see any alert telling me I need to privatize some other variable.
Does anyone know why this may be happening? My code is rather large so I would be happy to provide it over email for further inspection. Thanks in advance.