gpt4 book ai didi

azure - 如何: Azure OpenMPI with Infiniband - Linux

转载 作者:行者123 更新时间:2023-12-03 12:27:51 28 4
gpt4 key购买 nike

我刚开始使用 Microsoft Azure 进行科学计算,并且在设置时遇到了一些问题。

我有一个跳线盒设置,它充当我想要使用的软件的许可证服务器,还有一个通用驱动器来存储所有软件。还设置了 6 个计算节点(16 个核心/节点),我可以毫无问题地从跳线盒“ssh”到计算节点。跳转盒和计算节点使用 CentOS 和 OpenMPI 1.10.3

我创建了一个脚本,该脚本存储在已安装的跳线盒驱动器上,我通过“clusRun.sh”在每个计算节点上运行该脚本,该脚本设置特定于我运行的软件和 OpenMPI 的所有环境变量。希望到目前为止一切听起来都不错。

我过去经常在 Linux 集群上使用这个软件,没有出现任何问题。使用类似的命令提交作业,例如:

mpirun -np XXX -hostfile XXX {软件路径}

其中 XXX 是处理器数量和主机文件路径

我在跳转盒上运行此命令,主机文件有每个计算节点名称的列表,每个计算节点名称在主机文件中的出现次数与我想要在节点上使用的核心次数相同。希望这是有道理的!跳转盒节点上没有运行作业中的任何进程,它仅用于启 Action 业。

当我尝试以这种方式运行作业时,我收到了许多错误,其中大多数似乎与 Infiniband 相关。以下是主要错误的简短列表:

"The /dev/hfi1_0 device failed to appear after 15.0 seconds: Connection timed out"

"The OpenFabrics (openib) BTL failed to initialize while trying to create an internal queue"

"OMPI source: btl_openib.c:324
Function: ibv_create_srq()
Error: Function not implemented (errno=38)
Device: mlx4_0"

“至少一对 MPI 进程无法相互进行 MPI 通信。这意味着没有 Open MPI 设备表明它可用于在这些进程之间进行通信”

是否有任何特定于 OpenMPI 的环境变量需要设置来定义任何 Infiniband 设置?我已经定义了通常的 MPI_BIN、LD_LIBRARY_PATH、PATH 等。我知道 IntelMPI 需要额外的变量。

Infiniband 应该作为 A9 HPC 分配的一部分,但我不确定它是否需要任何特定设置。当我运行“ifconfig -a”时,没有 Infiniband 特定条目(我希望看到 ib0、ib1 等)。我只有 eth0、eth1 和 lo

我期待有人能够提供任何建议。

亲切的问候!

最佳答案

"Repository containing the Articles on azure.microsoft.com Documentation Center" by daltskin 中所述(从已删除/隐藏 Azure/azure-content-internal fork ),第 页 https://github.com/daltskin/azure-content/blob/master/articles/virtual-machines/virtual-machines-a8-a9-a10-a11-specs.md#access-to-the-rdma-network“关于A8、A9、A10和A11计算密集型实例”-“从Linux A8和A9虚拟机访问”

At this time, Azure Linux RDMA is supported only with Intel MPI Library 5.

因此,采用 OpenMPI 1.10.3 的 CentOS 可能无法使用 Azure 的虚拟化 RDMA,因为 OpenMPI 1.10.3 不是“Intel MPI Library 5”。

在官方文档中,Azure 也将 Intel MPI 列为支持 RDMA(使用 SLES 12 SP1 HPC VM): https://learn.microsoft.com/en-us/azure/virtual-machines/linux/classic/rdma-cluster “设置 Linux RDMA 集群来运行 MPI 应用程序” - 2017-3-14

Customize the VM

In a SLES 12 SP1 HPC VM, we recommend that you don't apply kernel updates, which can cause issues with the Linux RDMA drivers. Intel MPI: Complete the installation of Intel MPI on the SLES 12 SP1 HPC VM by running the following command:

 sudo rpm -v -i --nodeps /opt/intelMPI/intel_mpi_packages/*.rpm

If you want to set up a cluster based on one of the CentOS-based HPC images in the Azure Marketplace instead of SLES 12 for HPC, follow the general steps in the preceding section. Note the following differences when you provision and configure the VM: Intel MPI is already installed on a VM provisioned from a CentOS-based HPC image.

因此,有 Azure 虚拟 RDMA (Infiniband) 的专有内核驱动程序,预安装到 Azure 的 SLES 12 VM 镜像和 Azure 的 CentOS VM 镜像中,还有专有的用户空间驱动程序(因为 Infiniband 通常使用内核旁路和通话)仅在英特尔 MPI 中从用户空间到硬件进行数据移动操作。

尝试使用预装的英特尔 MPI 重新编译您的应用程序,并使用英特尔 MPI 的 mpirun/mpiexec 启动它。指令还是一样https://learn.microsoft.com/en-us/azure/virtual-machines/linux/classic/rdma-cluster :

Configure Intel MPI To run MPI applications on Azure Linux RDMA, you need to configure certain environment variables specific to Intel MPI. Here is a sample Bash script to configure the variables needed to run an application. Change the path to mpivars.sh as needed for your installation of Intel MPI.

#!/bin/bash -x

# For a SLES 12 SP1 HPC cluster

source /opt/intel/impi/5.0.3.048/bin64/mpivars.sh

# For a CentOS-based HPC cluster

# source /opt/intel/impi/5.1.3.181/bin64/mpivars.sh

export I_MPI_FABRICS=shm:dapl

# THIS IS A MANDATORY ENVIRONMENT VARIABLE AND MUST BE SET BEFORE RUNNING ANY JOB
# Setting the variable to shm:dapl gives best performance for some applications
# If your application doesn’t take advantage of shared memory and MPI together, then set only dapl

export I_MPI_DAPL_PROVIDER=ofa-v2-ib0

# THIS IS A MANDATORY ENVIRONMENT VARIABLE AND MUST BE SET BEFORE RUNNING ANY JOB

export I_MPI_DYNAMIC_CONNECTION=0

# THIS IS A MANDATORY ENVIRONMENT VARIABLE AND MUST BE SET BEFORE RUNNING ANY JOB

# Command line to run the job

mpirun -n <number-of-cores> -ppn <core-per-node> -hostfile <hostfilename> /path <path to the application exe> <arguments specific to the application>

#end

关于azure - 如何: Azure OpenMPI with Infiniband - Linux,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43669464/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com