CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Softwares for debugging parallel CFD codes (https://www.cfd-online.com/Forums/main/234913-softwares-debugging-parallel-cfd-codes.html)

shalabhks March 23, 2021 19:23

Softwares for debugging parallel CFD codes
 
Hi All,
I am looking for softwares (preferably free/open source) that can be used for debugging large CFD codes in parallel (MPI) and Multi-thread environment.

Valgrind is one but I haven't found it very useful in MPI environment. I have mostly ended up using compiler debugging features. Is there anything beyond these that is powerful and easy to use?

aerosayan March 24, 2021 12:03

valgrind is generally used as a profiler, and not a debugger, unless you're aiming to solve memory leak issues. At least that's what I use it for. Of course you can use it as a debugger, but I personally don't enjoy using it as a debugger.

DEBUGGING:

For debugging, I would recommend GDB (GNU Debugger). Instead of using the CLI version of GDB, use something like qt-creator IDE. qt-creator can use the GDB debugger and allow you to debug your code very easily due to its rich GUI features.


EDIT : Here's how you can do it in CLI for MPI apps : https://stackoverflow.com/questions/...ebugger-in-mpi
However notice that to do it in GUI, you might have to configure qt-creator to call the mpi app if you're using mpirun, as it's normally configured to run single threaded or OpenMP apps.


PROFILING:

valgrind is not suitable for profiling numerical codes because valgrind is extremely slow.

I haven't worked with MPI, but for OpenMP and for serial codes, you can use linux-perf tool.

Some other profilers like tau, are also available, but I haven't personally used them.

aerosayan March 24, 2021 16:38

Also found a way to do it in valgrind : https://valgrind.org/docs/manual/mc-...manual.mpiwrap
Since I don't use valgrind for debugging, you'll have to see it for yourself.

shalabhks March 25, 2021 04:37

Thank you. Qt based GUI version looks pretty good. Thank you.


All times are GMT -4. The time now is 12:42.