Issue with Compile and debug with NVIDIA pgfortran

------------Source File test_args.F90--------------------
module test_args
contains
subroutine args(a,b,c,d,e,f,g,h)
implicit none
integer :: a,b,c,d,e,f,g,h
write(,) ‘<<<<<<<<<<<<<<<<>>>>>>>>>>>>>’
end subroutine
end module test_args

program test_debugger
use test_args
implicit none
integer :: a=10,b=20,c=30,d=40,e=50,f=60,g=70,h=80
call args(a,b,c,d,e,f,g,h)
end program test_debugger

$nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/pgfortran -g test_args.F90 -o test_args_pgfortran
$nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/cuda-gdb --args test_args_pgfortran

(cuda-gdb) break “test_args.F90:6”
(cuda-gdb) run
Starting program: /home/mrahman/dev/SOLVER-UDI/test/test_args_pgfortran
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.

Breakpoint 2, test_args::args (a=10, b=20, c=30, d=40, e=50, f=60, g=4210840, h=4210844) at test_args.F90:6
6	    write(*,*) '<<<<<<<<<<<<<<<<<Here is the hell>>>>>>>>>>>>>>'
(cuda-gdb) 

!!!Clearly the values for g and h in the arguments are garbage!!!
Can anyone help me ?

Hi,

Welcome to the NVIDIA Developer forums. This looks to be a question for the Linux category.
I will move this over for you.

Thank you so much

1 Like

Hi Tom
Any progress with that issue?

Thanks
Mazder

Hi @MdMazder,

Unfortunately I am not a technical resource. Let me see if I can find someone to jump in.

Best,
Tom K

I guess the correct forum to find some answers would be those:
https://forums.developer.nvidia.com/c/accelerated-computing/hpc-compilers/299

@TomK any reason there’s a second driver forum?
https://forums.developer.nvidia.com/c/gaming-and-visualization-technologies/general-topics/drivers/175
rather looks like a sink hole, the macos driver is dead and had it’s own forum, the windows people have geforce.com and for linux, it’s a duplicate.

You are right, I’ll move it

It’s a known compiler DWARF generation issue which was reported a few months ago (filed as TPR #30998) where garbage values are shown in the debug output for variables past the 6 argument in a function call. I’ll add this post to the report and will notify once a fix is available.

Thanks Mat, I will keep watching for solutions.

Hi Mat

is there any previous version that does not have such issue? I tested with the followings nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/pgfortran
nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/pgfortran

Thanks

Not that I’m aware of, though I only went back a few year when testing the original report.