Hello,
This is quite strange, the reference manual says that minloc and maxloc
are permitted in device subprograms, but when I try to compile this simple
piece of code:
MODULE CUDAMOD
CONTAINS
ATTRIBUTES(DEVICE) SUBROUTINE FINDMAX
real(KIND=4), DIMENSION(3) :: mu
INTEGER, DIMENSION(1) :: ef
mu(1)=1.
mu(2)=2.
mu(3)=3.
ef(1:1)=MINLOC(mu)
ef(1:1)=MAXLOC(mu)
END SUBROUTINE FINDMAX
END MODULE CUDAMOD
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM test
USE CUDAMOD
USE CUDAFOR
integer :: i
i=1
END PROGRAM
I get the following message:
/opt/pgi/linux86-64/11.1/bin/pgf90 -Mcuda=cc13 test.cuf
PGF90-S-0000-Internal compiler error. unsupported procedure 328 (test.cuf: 19)
PGF90-S-0000-Internal compiler error. unsupported procedure 328 (test.cuf: 19)
PGF90-S-0000-Internal compiler error. unsupported procedure 328 (test.cuf: 19)
PGF90-S-0000-Internal compiler error. unsupported procedure 316 (test.cuf: 19)
PGF90-S-0000-Internal compiler error. unsupported procedure 318 (test.cuf: 19)
0 inform, 0 warnings, 5 severes, 0 fatal for findmax
Could it be that those intrinsics were…forgoten???
Benoit.