Closed Zhonglu closed 1 year ago
This should work. Did you run autoibamr with --enable-debugging
?
Thanks for the prompt reply!
Yes, I believe this installation is the debug version with --enable-debugging
. When I use gdb in the VS code, I can trace back to source code at tmp/build/petsc-lite-3.17.2/src
, and tmp/unpack/SAMRAI-2.4.4
, but I can not trace back to the IBAMR relevant source code like example.cpp
.
Perhaps I should reinstall a newer version of IBAMR? Or is that due to some mechanisms with CMake? I used to install manually by the “configure” method, which allows me to trace back to every piece source code. Or is that because I should use flag of "-o0" everywhere?
I just start to wonder, as a non-CS background person, should I learn more about the relevant CS-knowledge to better use this library?
Appreciate any comment.
Hi,
Sorry for the question. I just reinstall by autoibamr and the debugging goes well. Probabaly accidentally changed something previously.
Many thanks for having a look.
Mike
I'm not sure exactly what caused the problem but it sounds like you fixed it. One possibility for trying to debug a similar issue in the future, when using CMake, is to build your project with
make VERBOSE=1
to have the generated Makefile print out the commands it runs. You should see -g
or -ggdb
(and not O2
or O3
) in the call to the C++ compiler.
Hi,
When I try to debug examples by GDB, I found that I cannot trace back to many source codes.
Is there any fix for this or should I just install the traditional way by using the autoibamr-downloaded packages?
Autoibamr is very useful and I hope we can also debug by its build.
Appreciate any comment,
Mike