docker内MPI调试技巧xterm -e gdb调试python

mpirun xterm -e gdb

 mpirun -np 2 -tag-output -output-filename .result -x CUDA_VISIBLE_DEVICES=2,3 -mca pml ob1 -mca btl ^openib -mca btl_tcp_if_include ib0 -x NCCL_MIN_NCHANNELS=8 -x NCCL_GRAPH_FILE=/tmp/gigabyte_graph.xml xterm -e gdb  ./main_test

https://blog.csdn.net/yszheda/article/details/26286885

docker中进行gdb

因为ptrace被Docker默认禁止的问题。考虑到应用分析的需要,可以有以下几种方法解决:
1、关闭seccomp
docker run --security-opt seccomp=unconfined
2、采用超级权限模式
docker run --privileged
3、仅开放ptrace限制
docker run --cap-add sys_ptrace

gdb调python:

# https://wiki.python.org/moin/DebuggingWithGdb
sudo apt-get install gdb python3.7-dbg
# https://blog.csdn.net/tanyjin/article/details/77997785
gdb -ex r --args python test.py

docker内X11

  • docker命令
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix 
  • 在docker内xclock发现wrong authorisation protocol attempted
    则把宿主机上/home/$USER/.Xauthority拷贝到docker内的/root/下面

gdb使用方法

https://blog.csdn.net/awm_kar98/article/details/82840811

你可能感兴趣的:(docker内MPI调试技巧xterm -e gdb调试python)