Dear all,

I have a problem when I run the following subroutine (reported in a simplified version for easy readability):

```
subroutine doMx1(n,dli,c,a,b)
implicit none
integer, intent(in), dimension(3) :: n
real(rp), intent(in), dimension(3) :: dli
real(rp), intent(in), dimension(0:,0:,0:) :: c
real(rp), intent(out), dimension(0:,0:,0:,1:) :: a,b
real(rp), dimension(8),device :: mx
real(rp) :: dli1,dli2,dli3
real(rp), dimension(3) :: dl
integer :: i,j,k,ii
!
#ifdef USE_CUDA
attributes(managed) :: nor,cur,vof, mx, my,mz,nx,ny,nz,dl
integer :: istat
#endif
dli1 = dli(1)
dli2 = dli(2)
dli3 = dli(3)
!$cuf kernel do(3) <<<*,*>>>
do k=1,n(3)
do j=1,n(2)
do i=1,n(1)
mx(1)=((c(i+1,j ,k )+c(i+1,j+1,k )+c(i+1,j ,k+1)+c(i+1,j+1,k+1))-&
(c(i ,j ,k )+c(i ,j+1,k )+c(i ,j ,k+1)+c(i ,j+1,k+1)))*dli1*0.25
if (mx(1).gt.0) then
print*, "here"
endif
enddo
enddo
enddo
```

In fact, the value of mx(1) remains zero even for punctual values of c for which it should be different than zero.

Do you have any idea what the issue could be?

Best,

Marcres