Line number information with pgif90

Hello,
I have set PGI_TERM to be trace on my tcsh. But when my pgf90 program crashes with a floating point error (division by zero) it does not tell me the line number where that problem occurred. How do I turn that on ?
pgif90 version is 17.4 and OS is Ubuntu 16.04 LTS.


pgf90 -O0 -c -g -traceback -Ktrap=inv,denorm,divz,ovf,unf ${tool}.f

This is how I compiled it. But when I run it I get something like -

rror: floating point exception, integer divide by zero
rax 00007fea082c16b0, rbx 00007fea082c12c8, rcx 00007fea00b4ce68
rdx 00007fea00b89ef0, rsp 00007ffdf3611220, rbp 00007ffdf3611480
rsi 00007fea029578f8, rdi 00007fea02957ce0, r8 00007fea04725ad0
r9 00007fea064f38c8, r10 00007fea08284620, r11 00007fea082fe740
r12 00007fea082c1a98, r13 0000000000000009, r14 000000000000004c
r15 00007fea082c1320
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fea0cf9a390]
/home/inv_cart() [0x40f886]
/home//inv_cart() [0x40e665]
/home/inv_cart() [0x40693e]
/home/nv_cart() [0x404664]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fea0c3eb830]
/home/inv_cart() [0x404549]

Any suggestions ?

MS.

https://forums.developer.nvidia.com/t/maximum-debug-flags-with-pgi-compiler/133601/1

I did take a look at this thread and I added the option -Meh_frame to the linker line which I presume is this

pgf90 -Meh_frame -o ${tool} ${tool}.o ${libs} ${ncdf_libs}

But this just gives the same information. No line number yet.

Hello,

We recreated the issue with this

ubuntu1604% more trap.f90
program mike
real(8) x,y, z

x = -1.0d0
z = 123456789.0d0
y = x * 10.d0 * log10(x)
z= exp(z)
y=1.0d0 /(x + 1.0d0)
print *,'x & y & z= ', x, y, z
stop
end program mike


ubuntu1604% pgfortran -g -Ktrap=fp trap.f90 -Meh_frame
ubuntu1604% setenv PGI_TERM trace,debug
ubuntu1604% a.out
Error: floating point exception, integer divide by zero
PGI Debugger 17.4-0 x86-64 (Cluster, 256 Process)
PGI Compilers and Tools
Copyright © 2017, NVIDIA CORPORATION. All rights reserved.
Loading symbols from /home/tull/xfer/tprs/uf/metstudent/jun2817/a.out …
ERROR: CANNOT ATTACH TO PID 3028.
Attach fails: ubuntu1604:3028 (/home/tull/xfer/tprs/uf/metstudent/jun2817/a.out)

We have filed two TPRs
24455 - about not knowing the line number of the fp trap event.
24456 - about not knowing where the f90 source file is.

Sorry to ask a noob question - I just have to wait for a new release when this gets fixed ? Or will there be a patch that I can install over the existing install ?

Releases come out 8-10 times a year. Next (17.7) is in July.
If you are using the Community Edition, the next version will not
be out until October.

Until it is fixed and in a release, the problem will remain.

Running the program in pgdbg, and setting break points, should
allow you to zero in on where the problem happens.

dave