问题
I have a Fortran program I am debuging. I have a list of varables and one of the expected variables is almost double its expected value. So I compiled the program, with debug flags, and commenced debugging: the program name is hfock
$gdb hfock
(gdb) break hfock
(gdb) run
Starting program: /home/e/Desktop/hfock hfock
Breakpoint 1, hfock () at hfock.f:16
16 ZETA1 = 2.173171
(gdb) s
17 ZETA2 = 1.188530
(gdb) s
18 WRITE (*, '( "Zeta1:", F7.4 / "Zeta2:", F7.4 )' ) ZETA1, ZETA2
(gdb) s
Zeta1: 2.1732
Zeta2: 1.1885
21 PLUS=ZETA1+ZETA2
(gdb) s
22 PROD=ZETA1*ZETA2
(gdb) s
23 DIFF=ZETA1-ZETA2
(gdb) s
24 S12=8.*PROD**1.5/PLUS**3
(gdb) s
__powf (x=2.58287883, y=1.5) at w_powf.c:26
26 w_powf.c: No such file or directory.
The corresponding (24,25,26) lines of code are:
S12=8.*PROD**1.5/PLUS**3
T11=0.5*ZETA1**2
T22=0.5*ZETA2**2
I think this might be a math library, or glibc related error, but I'm not sure what the error means, or how to fix it.This is fortran, why is it calling a C library? do I need to include a library? or install a missing dependency? full program source here: http://pastebin.com/waeEFSBZ
回答1:
**
is in Fortran exponential operator. Exponentiation is implemented in glibc w_powf.c. Gdb can't find this file in your sources. This is not an error, rather diagnostic.
回答2:
The error means that the source file w_powf.c is not available on your system. It's not related to your program apparently. You can safely ignore that error.
Note that the lines you mention have the operator **
which I suppose is implemented in that file, so it's just telling you that there is no access to the source code of the implementation of that operator.
来源:https://stackoverflow.com/questions/34667964/gfortran-debugging-with-gdb-w-powf-c-no-such-file-or-directory