Open jedwards4b opened 1 day ago
Hi Jim, the standard supports interfaces with both one and two arguments. This could be an Nvidia bug.
I think changing this atan2
might be a safe option.
@marshallward Thanks, I found a reference here. I'll try atan2 and also see if I can file an issue with nvidia.
Using atan2 appears to work. This was tested with nvhpc/24.3 and nvhpc/24.9 using test:
program test_atan2
real(4) :: x = 1.e0_4, y = 0.5e0_4
real(4) :: z
z = atan(y,x)
print *,'atan(',y,',',x,') =',z
z = atan2(y,x)
print *,'atan2(',y,',',x,') =',z
end program test_atan2
nvfortran testatan.F90 /usr/bin/ld: /glade/derecho/scratch/cesmrt/tmp/nvfortranYcyvwwAdBk4T.o: in function `MAIN': /glade/u/home/cesmrt/testatan.F90:4: undefined reference to `atan'
the intrinsic function atan has only one argument, but it is used with two here. This is causing an error in the nvhpc compiler. I'm not sure why the other compilers do not complain?