Hello,
I have a weird error when compiling CUDA Fortran.
I receive
/tmp/pgcudafor6tecUW6Srfqs.gpu(29): error: expected an identifier
/tmp/pgcudafor6tecUW6Srfqs.gpu(138): error: expected a "("
/tmp/pgcudafor6tecUW6Srfqs.gpu(138): error: expression must have integral or enum type
/tmp/pgcudafor6tecUW6Srfqs.gpu(142): error: expected an expression
/tmp/pgcudafor6tecUW6Srfqs.gpu(142): error: expected an expression
5 errors detected in the compilation of "/tmp/pgnvdpuecTHvkmQAw.nv0".
PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code
all vars are of type float
when compiling the following code :
delta=psiroe*(abs(u)+abs(v)+c)
vl=qn
switch=(.5+sign(.5,abs(vl)-delta))
ambda1=switch*(abs(vl))+(1.-switch)* &
((vl**2+delta**2)/(2.*delta+cut0x))
or
delta=psiroe*(abs(u)+abs(v)+c)
vl=qn
switch = 1.
if(abs(vl) .lt. delta) switch = 0.
ambda1=switch*(abs(vl))+(1.-switch)* &
((vl**2+delta**2)/(2.*delta+cut0x))
but when go round the problems and doing
delta=psiroe*(abs(u)+abs(v)+c)
vl=qn
ambda1=(.5+sign(.5,abs(vl)-delta))*(abs(vl))+(1.-(.5+sign(.5,abs(vl)-delta)))* &
((vl**2+delta**2)/(2.*delta+cut0x))
it compiles without even a warning.
I looked at the generated .gpu and all seems ok in all cases.
Do someone know the reason of this ?