Hi.
This works with old versions of the PGI fortran compiler, but not the latest…
module pgitest
interface foo
attributes(device) function foo( Eb ) result( a )
real*8, intent(in) :: Eb
real*8, intent(out) :: a(2)
end function
end interface
contains
attributes(device) function foo( Eb ) result( a )
implicit none
real*8, intent(in) :: Eb
real*8, intent(out) :: a(2)
! Local variables:
real*8 :: rmin(2)
a = log(rmin)
end function foo
end
I get the following error:
$ pgfortran -c pgitest.cuf
PGF90-S-0037-Contradictory data type specified for a (pgitest.cuf: 18)
PGF90-S-0095-Expression has wrong data type (pgitest.cuf: 24)
PGF90-S-0083-Vector expression used where scalar expression required (pgitest.cuf: 24)
0 inform, 0 warnings, 3 severes, 0 fatal for foo
Any suggestions as to why this is, and what I need to do to get my code compiled with the latest compiler?
Rob.