我在调试 MPI 应用程序时遇到问题lldb
.从本质上讲,我通过以下方式将其附加到每个进程
mpirun_lldb() {
mpirun --mca orte_base_help_aggregate 0 --mca mpi_abort_print_stack 1 -np $1 xterm -hold -e lldb -f $2 -- "${@:3}"
}
但是在某些时候MPI_Abort
发生了,所有xterm
窗口都会立即关闭,我什至无法读取堆栈,更不用说调试和检查变量了:
MPI_ABORT was invoked on rank 2 in communicator MPI_COMM_WORLD
with errorcode 255.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
我尝试使用-hold
进行xterm
但这无济于事。
附言我无法访问像TotalView这样的许可调试器。这是我第一次遇到上述简单方法的问题。
很抱歉噪音,添加断点b MPI_Abort
解决了问题。