cuf directive problem

Hello,
I am trying to explore the cuf syntax directive for my code. Since, I had problems using do(2) directive I prepared this test case (the meaning of operations is not important) which does not work. Can anybody help me?

module storage
integer, parameter :: N=10
real :: a(N,N),b(N,N)
real, device ::  a_dev(N,N),b_dev(N,N)
end module storage

program cuf_fail
use storage

implicit none
integer i,j

a = 1. ;
a_dev = a ;
!$cuf kernel do(2) <<<*,*>>>
do i=2,N-1
do j=1,N
   b_dev(i,j) = a_dev(i+1,j) -2.*a_dev(i,j) + a_dev(i-1,j)
enddo
enddo
b = b_dev

print*,'b: ',b

end

The compiling error is

PGF90-S-0000-Internal compiler error. incompletely-translated array bound 1 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. incompletely-translated array bound 1 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. incompletely-translated array bound 1 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. load of zero symbol 0 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. incompletely-translated array bound 1 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. incompletely-translated array bound 1 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. incompletely-translated array bound 1 (cuf_fail.f90: 25)
PGF90-S-0000-Internal compiler error. load of zero symbol 0 (cuf_fail.f90: 25)
0 inform, 0 warnings, 8 severes, 0 fatal for cuf_fail

The error occurs only using variables stored in module structure. I am using 11.3 version of PGI.

thanks in advance
Francesco

Hi Francesco,

Thank you for the report. This is a compiler error and I have sent a report to our engineers (TPR#17753) detailing the issue. Hopefully, we can have it fixed shortly.

The work-around is to change the do clause to parallelize only the outer loop, i.e. change “do(2)” to “do(1)”.

Best Regards,
Mat

Francesco,

We believe TPR 17753 was fixed as of 11.7.

Thanks again for your report.


dave