指定网卡名称错误,报错:network device '***' is not available
现象描述
提交MPI作业时指定的网卡名称错误导致mpirun命令运行失败。
运行失败示例如下:
mpirun -np 8 -N 1 --hostfile ~/hmpifile_2021/hostfile/hf8 -x UCX_NET_DEVICES=mlx5_0:2 ~/hmpifile_2021/allreduce/AllReduce
1 | [1632383945.549496] [arm-node132:2635376:0] ucp_context.c:732 UCX WARN network device 'mlx5_0:2' is not available, please use one or more of: 'enp189s0f0'(tcp), 'enp1s0'(tcp), 'mlx5_0:1'(ib) |
可能原因
运行mpirun命令时指定的网卡资源名称有误。
恢复步骤
- 使用PuTTY工具,以Hyper MPI普通用户(例如“hmpi_user”)登录至作业执行节点。
- 执行以下命令,查询当前作业执行节点所有可用的网卡名称。
ibdev2netdev
1
mlx5_0 port 1 ==> enp1s0 (Up)
- 执行以下命令,将网卡名称修改为当前可用网卡名称,如mlx5_0:1。
mpirun -np 16 -N 2 --hostfile ~/hmpifile_2021/hostfile/hf8 -x UCX_NET_DEVICES=mlx5_0:1 ~/hmpifile_2021/allreduce/AllReduce
- ~/hmpifile_2021/hostfile:表示指定作业运行节点的文件路径。
- hf8:表示指定作业运行节点的文件。
- ~/hmpifile_2021/allreduce:表示指定运行作业的路径。
- AllReduce:表示指定的运行作业。
- mlx5_0:1:表示2查询到的网卡名称。
父主题: FAQ