如何调试MPI程序? [英] How do I debug an MPI program?

查看:356
本文介绍了如何调试MPI程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MPI程序编译和运行,但我想通过它来确保没有什么奇怪的事情发生。理想情况下,我想要一个简单的方法来将GDB附加到任何特定的进程,但我不确定这是可能还是如何做到的。一个替代方案是让每个进程将调试输出写入到单独的日志文件中,但这并不能真正给出与调试器相同的自由。



有更好的方法吗?如何调试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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆