如何调试MPI程序? [英] How do I debug an MPI program?
问题描述
有更好的方法吗?如何调试MPI程序?
正如其他人所说, TotalView 是此的标准。但是它会花费你一个胳膊和腿。
OpenMPI网站有一个很好的 MPI调试常见问题解答。 FAQ中的第6项描述了如何将GDB连接到MPI进程。阅读整个事情,有一些很棒的提示。
如果你发现你有太多的进程跟踪,但是,请查看堆栈跟踪分析工具(STAT)。我们利用这一点在利弗莫尔从潜在的成千上万的运行进程中收集堆栈跟踪,并向用户智能地表示它们。这不是一个功能齐全的调试器(全功能调试器不会扩展到208k内核),但它会告诉您哪些进程组正在做同样的事情。然后,您可以在标准调试器中逐个通过每个组的代表。
I have an MPI program which compiles and runs, but I would like to step through it to make sure nothing bizarre is happening. Ideally, I would like a simple way to attach GDB to any particular process, but I'm not really sure whether that's possible or how to do it. An alternative would be having each process write debug output to a separate log file, but this doesn't really give the same freedom as a debugger.
Are there better approaches? How do you debug MPI programs?
As someone else said, TotalView is the standard for this. But it will cost you an arm and a leg.
The OpenMPI site has a great FAQ on MPI debugging. Item #6 in the FAQ describes how to attach GDB to MPI processes. Read the whole thing, there are some great tips.
If you find that you have far too many processes to keep track of, though, check out Stack Trace Analysis Tool (STAT). We use this at Livermore to collect stack traces from potentially hundreds of thousands of running processes and to represent them intelligently to users. It's not a full-featured debugger (a full-featured debugger would never scale to 208k cores), but it will tell you which groups of processes are doing the same thing. You can then step through a representative from each group in a standard debugger.
这篇关于如何调试MPI程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!