canmoumou 2024-04-25 15:21 采纳率: 50%
浏览 3
已采纳

nccl-test出现overrun怎么排查

nccl-test,overrun怎么排查。
具体描述,在运行的时候,ring算法能正常运行, 但是tree算法中小于1M的数据会overrun,也就是卡死。
报错如下:

[worker03:29830] 7 more processes have sent help message help-mpi-btl-openib.txt / no device params found
[worker03:29830] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
[worker03:29830] 7 more processes have sent help message help-mpi-btl-openib.txt / ib port not selected
[worker03:29830] 7 more processes have sent help message help-mpi-btl-openib.txt / error in device init
worker03: Test CUDA failure all_reduce.cu:36 'unknown error'
 .. worker03 pid 29866: Test failure common.cu:589
 .. worker03 pid 29866: Test failure common.cu:711
 .. worker03 pid 29866: Test failure all_reduce.cu:101
 .. worker03 pid 29866: Test failure common.cu:725
 .. worker03 pid 29866: Test failure common.cu:1166
 .. worker03 pid 29866: Test failure common.cu:964
worker03: Test CUDA failure all_reduce.cu:36 'unknown error'
 .. worker03 pid 29865: Test failure common.cu:589
 .. worker03 pid 29865: Test failure common.cu:711
 .. worker03 pid 29865: Test failure all_reduce.cu:101
 .. worker03 pid 29865: Test failure common.cu:725
 .. worker03 pid 29865: Test failure common.cu:1166
 .. worker03 pid 29865: Test failure common.cu:964
worker03: Test CUDA failure all_reduce.cu:36 'unknown error'
 .. worker03 pid 29864: Test failure common.cu:589
 .. worker03 pid 29864: Test failure common.cu:711
 .. worker03 pid 29864: Test failure all_reduce.cu:101
 .. worker03 pid 29864: Test failure common.cu:725
 .. worker03 pid 29864: Test failure common.cu:1166
 .. worker03 pid 29864: Test failure common.cu:964
worker03:29870:29870 [5] NCCL INFO ncclEnqueueCheck isAsync:0

不需要给出原因分析。请告诉我应该用哪些方式排查,例如在哪些文件里面添加注释和中断

  • 写回答

3条回答 默认 最新

  • 专家-赤兔[在线] 全栈领域优质创作者 2024-04-25 15:21
    关注

    引自免费微信小程序:皆我百晓生

    针对NCCL测试中的overrun问题,可以按照以下步骤进行排查:

    1. 检查网络配置:

      • 确保所有节点都正确配置了InfiniBand(IB)或RoCE(RDMA over Converged Ethernet)网络。
      • 检查交换机设置,确保端口速率、双工模式和其他参数匹配。
    2. 检查OpenIB库:

      • 更新到最新版本的OpenIB库,包括libibverbs、rdma-core、openib-utils等。
      • 验证安装是否正确,可以通过运行ompi_info | grep openib查看OpenIB支持情况。
    3. 调整内核参数:

      • 可能需要调整一些内核参数以优化IB性能,比如增加队列对(Queue Pairs, QPs)、队列深度(Queue Depth, QD)等。可以在 /etc/sysctl.conf/etc/modprobe.d/openib.conf 中进行调整。
      # 增加QPs数量
      kernel.shm_rmid_forced = 1
      kernel.shmmax = 2147483648
      kernel.shmall = 2147483648
      
      # 增加QD
      rds.max_xmit_frag = 65535
      
    4. 检查硬件资源:

      • 确保每个GPU有足够的内存用于NCCL通信。
      • 检查CPU负载,过高的CPU负载可能会影响网络性能。
    5. NCCL配置:

      • 在运行NCCL测试时,尝试指定不同的NCCL通信库选项,例如--use-gpu-device--verb=DEBUG等,以便获取更详细的日志信息。
      • 如果使用的是树状通信算法,尝试调整ncclCommSetAttribute(comm, NCCL_TREE_THRESHOLD, &threshold)中的阈值,看是否可以解决小数据量的overrun问题。
    6. 排查其他软件冲突:

      • 确认没有其他进程占用或干扰了网络连接。
    7. 日志分析:

      • 分析错误日志,特别是与mpi-btl-openib.txt相关的部分,这通常表示OpenIB通信的问题。
      • 打开调试级别,通过在运行nccl-test时加上--verb=DEBUG参数,获取更多关于错误发生时的上下文信息。
    8. 代码层面排查:

      • all_reduce.cu源码中加入打印语句,定位具体出错的位置。
      • 在关键点添加断点,使用GDB或其他调试工具单步执行程序,观察变量状态和调用堆栈。
    9. 社区求助:

      • 如果以上方法都无法解决问题,可以考虑在NVIDIA Developer论坛或GitHub上找到NCCL的官方仓库,提交一个详细的bug报告,包括环境信息、配置、错误日志以及你的尝试。

    由于这是一个文本交互平台,无法提供实际的代码插入和绘图服务。请根据上述建议自行操作,并密切关注输出的日志和系统资源监控,逐步排除问题。如果有进一步的疑问或需要更具体的指导,请随时提问。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 已采纳回答 4月29日
  • 创建了问题 4月25日

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题