Jetson The call to cuMemHostRegister failed

Jetson The call to cuMemHostRegister(0xace67b80, 33792, 0) failed

Jetson 运行 mpi 报错:

--------------------------------------------------------------------------
The call to cuMemHostRegister(0xace67b80, 33792, 0) failed.
  Host:  tegra-ubuntu
  cuMemHostRegister return value:  801
  Memory Pool:  sm
--------------------------------------------------------------------------
[tegra-ubuntu:03031] 11 more processes have sent help message help-mpi-common-cuda.txt / cuMemHostRegister failed
[tegra-ubuntu:03031] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

这是因为 Jetson 不支持 cuMemHostRegister ,修改为 cuMemHostAlloc

修改 openmpi-4.1.2/opal/mca/common/cuda/common_cuda.c :

  • 方法1:将所有的 cuMemHostRegister 替换为 cuMemHostAlloc
  • 方法2:使用宏定义 __aarch64__ 区分是电脑还是 jetson,例如:
#ifdef __aarch64__ // cuMemHostRegister cannot be supported on Jetson
	OPAL_CUDA_DLSYM(libcuda_handle, cuMemHostAlloc);
#else
    OPAL_CUDA_DLSYM(libcuda_handle, cuMemHostRegister);
#endif

openmpi-4.1.2/opal/mca/common/cuda/common_cuda.c 内所有使用了 cuMemHostRegister 都做类似替换。

修改 "openmpi-4.1.2/opal/mca/common/cuda/help-mpi-common-cuda.txt ,将:

#
[cuMemHostRegister during init failed]
The call to cuMemHostRegister(%p, %d, 0) failed.
  Host:  %s
  cuMemHostRegister return value:  %d
  Registration cache:  %s
#
[cuMemHostRegister failed]
The call to cuMemHostRegister(%p, %d, 0) failed.
  Host:  %s
  cuMemHostRegister return value:  %d
  Registration cache:  %s

修改为:

#
[cuMemHostRegister during init failed]
The call to cuMemHostRegister(%p, %d, 0) failed.
  Host:  %s
  cuMemHostRegister return value:  %d
  Registration cache:  %s
#
[cuMemHostRegister failed]
The call to cuMemHostRegister(%p, %d, 0) failed.
  Host:  %s
  cuMemHostRegister return value:  %d
  Registration cache:  %s
#
[cuMemHostAlloc during init failed]
The call to cuMemHostAlloc(%p, %d, 0) failed.
  Host:  %s
  cuMemHostAlloc return value:  %d
  Registration cache:  %s
#
[cuMemHostAlloc failed]
The call to cuMemHostAlloc(%p, %d, 0) failed.
  Host:  %s
  cuMemHostAlloc return value:  %d
  Registration cache:  %s

参考链接: Cuda-aware OpenMPI fails on Jetson K1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值