[petsc-users] How to use PETSc in debug?

Song Gao song.gao2 at mail.mcgill.ca
Thu Apr 16 13:35:02 CDT 2015


Dear PETSc users,

I'm debugging my code but cannot see those line informations in gdb

I compiled PETSc with
--with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack
--download-mpich --with-debugging=yes

I modified my code from KSP ex1f.F and use that makefile.

Then compiled code
make PETSC_DIR=/home/cfd/sgao/bin/petsc-3.5.3 PETSC_ARCH=FEM_project_DEBUG
ex1f
The log is attached, I see the -g flag there. But when I run code with gdb,
I didn't see line information there.


$gdb ./ex1f
(gdb) b main
Breakpoint 1 at 0x4080e0: file ../../../gcc-4.3.0/libgfortran/fmain.c, line
11.
(gdb) r
Starting program: /home/cfd/sgao/FEM_in_CFD/code/ex1f
[Thread debugging using libthread_db enabled]

Breakpoint 1, main (argc=1, argv=0x7fffffffcc58) at
../../../gcc-4.3.0/libgfortran/fmain.c:11
11 ../../../gcc-4.3.0/libgfortran/fmain.c: No such file or directory.
in ../../../gcc-4.3.0/libgfortran/fmain.c
(gdb) l
6 in ../../../gcc-4.3.0/libgfortran/fmain.c
(gdb)


What did I miss here? Thank you in advance.

Song
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150416/646e01b5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: text/x-log
Size: 1909 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150416/646e01b5/attachment.bin>


More information about the petsc-users mailing list