开发者
资源
dsub作业提交,多GPU问题分析
dsub作业提交,多GPU问题分析
发表于2023/07/14
1281

问题1,多卡作业提交时,报错UCX ERROR process_vm_readv:Bad address:

提交脚本:dsub -p 9999 -A xxx  -o ""$current_path"/"$outputfile""  -l xxx --name "test"  -N 1 -R gpu=2  "source /path/to/run/getgpu.sh; mpiexec -n 2 ./ rhmcTest.param  >> log.txt

根因分析:getgpu.sh脚本中只配置了单卡设备export CUDA_VISIBLE_DEVICES=0,导致双卡运行时,操作另外一个张GPU卡设备报错。

修改方案:修改getgpu.sh脚本,遍历节点空闲GPU卡,并配置多卡GPU设备id,例如双GPU卡,使用设备01export CUDA_VISIBLE_DEVICES=0,1

问题2,双卡作业时,一轮迭代测试数据比单卡差距明显。

提交脚本:dsub -p 9999 -A xxx  -o ""$current_path"/"$outputfile""  -l xxx --name "test"  -N 1 -R gpu=2  "source /path/to/run/get2gpu.sh; mpiexec -n 2 ./ rhmcTest.param  >> log.txt

根因分析:dsub只指定了GPU=2的资源,默认只分配了1CPU资源。导致每个进程没有跑满核100%,只使用了50%

修改方案:测试双GPU卡时,dsub同时指定调用进程的CPU资源为2

dsub -p 9999 -A xxx  -o ""$current_path"/"$outputfile""  -l xxx --name "test"  -N 1 -R "cpu=2;gpu=2"  "source /path/to/run/get2gpu.sh; mpiexec -n 2 ./rhmcTest.param  >> log.txt

收藏举报
Level 1
0
帖子
0
粉丝
0
获赞