2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > IB驱动及IB交换机模式切换

IB驱动及IB交换机模式切换

时间:2021-10-20 12:37:22

相关推荐

IB驱动及IB交换机模式切换

IB驱动及IB交换机模式切换

1、GPU驱动安装

步骤如下:

参考之前安装GPU 驱动:[链接]

注意:A100 等nvlink版本的GPU需要安装额外的驱动包cuda-drivers-fabricmanager,否者无法调用GPU

[root@gpu-a100-2 ~]# yum-config-manager --add-repo https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repoLoaded plugins: fastestmirror, nvidiaadding repo from: https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repograbbing file https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo to /etc/yum.repos.d/cuda-rhel7.repoCould not fetch/save url https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo to file /etc/yum.repos.d/cuda-rhel7.repo: [Errno 14] curl#7 - "Failed connect to developer.:443; Connection refused"[root@gpu-a100-2 ~]# source /etc/profile[root@gpu-a100-2 ~]# yum-config-manager --add-repo https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repoLoaded plugins: fastestmirror, nvidiaadding repo from: https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repograbbing file https://developer./compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo to /etc/yum.repos.d/cuda-rhel7.reporepo saved to /etc/yum.repos.d/cuda-rhel7.repo[root@gpu-a100-2 ~]# yum install cuda-drivers-fabricmanager-460.106.00-1 -yLoaded plugins: fastestmirror, nvidiaLoading mirror speeds from cached hostfilecuda-rhel7-x86_64| 3.0 kB 00:00:00cuda-rhel7-x86_64/primary_db| 1.2 MB 00:00:07Resolving Dependencies--> Running transaction check---> Package cuda-drivers-fabricmanager.x86_64 0:460.106.00-1 will be installed--> Processing Dependency: cuda-drivers-fabricmanager-460 = 460.106.00 for package: cuda-drivers-fabricmanager-460.106.00-1.x86_64--> Running transaction check---> Package cuda-drivers-fabricmanager-460.x86_64 0:460.106.00-1 will be installed--> Processing Dependency: nvidia-fabric-manager = 460.106.00 for package: cuda-drivers-fabricmanager-460-460.106.00-1.x86_64--> Running transaction check---> Package nvidia-fabric-manager.x86_64 0:460.106.00-1 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================================================================================================================Package Arch Version Repository Size================================================================================================================================================================================Installing:cuda-drivers-fabricmanagerx86_64460.106.00-1cuda-rhel7-x86_643.1 kInstalling for dependencies:cuda-drivers-fabricmanager-460x86_64460.106.00-1cuda-rhel7-x86_643.3 knvidia-fabric-managerx86_64460.106.00-1cuda-rhel7-x86_641.1 MTransaction Summary================================================================================================================================================================================Install 1 Package (+2 Dependent packages)Total download size: 1.1 MInstalled size: 4.9 MDownloading packages:(1/3): cuda-drivers-fabricmanager-460-460.106.00-1.x86_64.rpm | 3.3 kB 00:00:02(2/3): cuda-drivers-fabricmanager-460.106.00-1.x86_64.rpm| 3.1 kB 00:00:02(3/3): nvidia-fabric-manager-460.106.00-1.x86_64.rpm | 1.1 MB 00:00:03--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total 193 kB/s | 1.1 MB 00:00:05Running transaction checkRunning transaction testTransaction test succeededRunning transactionInstalling : nvidia-fabric-manager-460.106.00-1.x86_641/3 Installing : cuda-drivers-fabricmanager-460-460.106.00-1.x86_64 2/3 Installing : cuda-drivers-fabricmanager-460.106.00-1.x86_64 3/3 Verifying : nvidia-fabric-manager-460.106.00-1.x86_641/3 Verifying : cuda-drivers-fabricmanager-460.106.00-1.x86_64 2/3 Verifying : cuda-drivers-fabricmanager-460-460.106.00-1.x86_64 3/3 Installed:cuda-drivers-fabricmanager.x86_64 0:460.106.00-1Dependency Installed:cuda-drivers-fabricmanager-460.x86_64 0:460.106.00-1nvidia-fabric-manager.x86_64 0:460.106.00-1 Complete![root@gpu-a100-2 ~]# systemctl daemon-reload[root@gpu-a100-2 ~]# systemctl start nvidia-fabricmanager[root@gpu-a100-2 ~]# systemctl enable nvidia-fabricmanager

2、IB驱动安装

下载链接/products/infiniband-drivers/linux/mlnx_ofed

注意:我们现在所有新机器的驱动都用了4.9-4.0.8.0的驱动,4.9的驱动要选择LTS才会有

驱动安装步骤

解压 MLNX_OFED_LINUX-4.9-4.0.8.0-rhel7.6-x86_64.tgz

安装依赖,如缺失会提示,建议使用本地或者相同版本的yum源,避免版本不匹配问题

yum install python-devel pciutils lsof redhat-rpm-config rpm-build libtool tcl gcc-gfortran fuse-libs tcsh tk yum install kernel-devel gcc gtk -y

[root@gpu-a100-4 ~]# cd driver/MLNX_OFED_LINUX-4.7-3.2.9.0-rhel7.6-x86_64[root@gpu-a100-4 MLNX_OFED_LINUX-4.7-3.2.9.0-rhel7.6-x86_64]# ./mlnxofedinstall Logs dir: /tmp/MLNX_OFED_LINUX.41492.logsGeneral log file: /tmp/MLNX_OFED_LINUX.41492.logs/general.logVerifying KMP rpms compatibility with target kernel...Error: One or more required packages for installing MLNX_OFED_LINUX are missing.Please install the missing packages using your Linux distribution Package Management tool.Run:yum install gtk2[root@gpu-a100-4 MLNX_OFED_LINUX-4.7-3.2.9.0-rhel7.6-x86_64]# yum install gtk2 -yLoaded plugins: fastestmirror, nvidiaLoading mirror speeds from cached hostfilelocal | 3.6 kB 00:00:00Resolving Dependencies--> Running transaction check---> Package gtk2.x86_64 0:2.24.31-1.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================================================================================================================Package Arch Version Repository Size================================================================================================================================================================================Installing:gtk2x86_642.24.31-1.el7local3.4 MTransaction Summary================================================================================================================================================================================Install 1 PackageTotal download size: 3.4 MInstalled size: 13 MDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transactionInstalling : gtk2-2.24.31-1.el7.x86_64 1/1 Verifying : gtk2-2.24.31-1.el7.x86_64 1/1 Installed:gtk2.x86_64 0:2.24.31-1.el7 Complete![root@gpu-a100-4 MLNX_OFED_LINUX-4.7-3.2.9.0-rhel7.6-x86_64]# ./mlnxofedinstall Logs dir: /tmp/MLNX_OFED_LINUX.43198.logsGeneral log file: /tmp/MLNX_OFED_LINUX.43198.logs/general.logVerifying KMP rpms compatibility with target kernel...This program will install the MLNX_OFED_LINUX package on your machine.Note that all other Mellanox, OEM, OFED, RDMA or Distribution IB packages will be removed.Those packages are removed due to conflicts with MLNX_OFED_LINUX, do not reinstall them.Do you want to continue?[y/N]:yUninstalling MLNX_EN driverUninstalling the previous version of MLNX_OFED_LINUXrpm --nosignature -e --allmatches --nodeps mftStarting MLNX_OFED_LINUX-4.7-3.2.9.0 installation ...Installing mlnx-ofa_kernel RPMPreparing...########################################Updating / installing...mlnx-ofa_kernel-4.7-OFED.4.7.3.2.9.1.g########################################Installing kmod-mlnx-ofa_kernel 4.7 RPMPreparing...########################################kmod-mlnx-ofa_kernel-4.7-OFED.4.7.3.2.########################################Installing mlnx-ofa_kernel-devel RPMPreparing...########################################Updating / installing...mlnx-ofa_kernel-devel-4.7-OFED.4.7.3.2########################################Installing kmod-kernel-mft-mlnx 4.13.3 RPMPreparing...########################################kmod-kernel-mft-mlnx-4.13.3-1.rhel7u6 ########################################Installing knem RPMPreparing...########################################Updating / installing...knem-1.1.3.90mlnx1-OFED.4.7.2.0.7.1.ge########################################Installing kmod-knem 1.1.3.90mlnx1 RPMPreparing...########################################kmod-knem-1.1.3.90mlnx1-OFED.4.7.2.0.7########################################Installing kmod-iser 4.7 RPMPreparing...########################################kmod-iser-4.7-OFED.4.7.3.2.9.1.g457f06########################################Installing kmod-srp 4.7 RPMPreparing...########################################kmod-srp-4.7-OFED.4.7.3.2.9.1.g457f064########################################Installing kmod-isert 4.7 RPMPreparing...########################################kmod-isert-4.7-OFED.4.7.3.2.9.1.g457f0########################################Installing kmod-rshim 1.16 RPMPreparing...########################################kmod-rshim-1.16-0.ga7ad4e6.rhel7u6 ########################################Installing mpi-selector RPMPreparing...########################################Updating / installing...mpi-selector-1.0.3-1.47329 ########################################Cleaning up / removing...mpi-selector-1.0.3-1.54303 ########################################Installing user level RPMs:Preparing...########################################ofed-scripts-4.7-OFED.4.7.3.2.9 ########################################Preparing...########################################libibverbs-41mlnx1-OFED.4.7.0.0.2.4732########################################Preparing...########################################libibverbs-devel-41mlnx1-OFED.4.7.0.0.########################################Preparing...########################################libibverbs-devel-static-41mlnx1-OFED.4########################################Preparing...########################################libibverbs-utils-41mlnx1-OFED.4.7.0.0.########################################Preparing...########################################libmlx4-41mlnx1-OFED.4.7.3.0.3.47329 ########################################Preparing...########################################libmlx4-devel-41mlnx1-OFED.4.7.3.0.3.4########################################Preparing...########################################libmlx5-41mlnx1-OFED.4.7.0.3.3.47329 ########################################Preparing...########################################libmlx5-devel-41mlnx1-OFED.4.7.0.3.3.4########################################Preparing...########################################librxe-41mlnx1-OFED.4.4.2.4.6.47329 ########################################Preparing...########################################librxe-devel-static-41mlnx1-OFED.4.4.2########################################Preparing...########################################libibcm-41mlnx1-OFED.4.1.0.1.0.47329 ########################################Preparing...########################################libibcm-devel-41mlnx1-OFED.4.1.0.1.0.4########################################Preparing...########################################libibumad-43.1.1.MLNX0905.1080879-########################################Preparing...########################################libibumad-devel-43.1.1.MLNX0905.10########################################Preparing...########################################libibumad-static-43.1.1.MLNX0905.1########################################Preparing...########################################libibmad-5.4.0.MLNX0423.1d917ae-0.########################################Preparing...########################################libibmad-devel-5.4.0.MLNX0423.1d91########################################Preparing...########################################libibmad-static-5.4.0.MLNX0423.1d9########################################Preparing...########################################ibsim-0.7mlnx1-0.11.g85c342b.47329 ########################################Preparing...########################################ibacm-41mlnx1-OFED.4.3.3.0.0.47329 ########################################Preparing...########################################librdmacm-41mlnx1-OFED.4.7.3.0.6.47329########################################Preparing...########################################librdmacm-utils-41mlnx1-OFED.4.7.3.0.6########################################Preparing...########################################librdmacm-devel-41mlnx1-OFED.4.7.3.0.6########################################Preparing...########################################opensm-libs-5.5.1.MLNX1120.0c8dde0########################################Preparing...########################################opensm-5.5.1.MLNX1120.0c8dde0-0.1.########################################Preparing...########################################opensm-devel-5.5.1.MLNX1120.0c8dde########################################Preparing...########################################opensm-static-5.5.1.MLNX1120.0c8dd########################################Preparing...########################################dapl-2.1.10mlnx-OFED.3.4.2.1.0.47329 ########################################Preparing...########################################dapl-devel-2.1.10mlnx-OFED.3.4.2.1.0.4########################################Preparing...########################################dapl-devel-static-2.1.10mlnx-OFED.3.4.########################################Preparing...########################################dapl-utils-2.1.10mlnx-OFED.3.4.2.1.0.4########################################Preparing...########################################perftest-4.4-0.11.gd240b65.47329########################################Preparing...########################################mstflint-4.13.0-1.41.g4e8819c.47329 ########################################Preparing...########################################mft-4.13.3-6########################################Preparing...########################################srptools-41mlnx1-5.47329 ########################################Preparing...########################################infiniband-diags-5.4.0.MLNX0908.5f########################################Preparing...########################################ibutils2-2.1.1-0.113.MLNX1121.g1c2########################################Preparing...########################################ibutils-1.5.7.1-0.12.gdcaeae2.47329 ########################################Preparing...########################################cc_mgr-1.0-0.46.MLNX1120.gf30d03a.########################################Preparing...########################################dump_pr-1.0-0.42.MLNX1120.gf30d03a########################################Preparing...########################################ar_mgr-1.0-0.47.MLNX1120.gf30d03a.########################################Preparing...########################################ibdump-5.0.0-3.47329 ########################################Preparing...########################################infiniband-diags-compat-5.4.0.MLNX########################################Preparing...########################################qperf-0.4.9-9.47329 ########################################Preparing...########################################mxm-3.7.3112-1.47329 ########################################Preparing...########################################ucx-1.7.0-1.47329 ########################################Preparing...########################################ucx-devel-1.7.0-1.47329########################################Preparing...########################################sharp-2.0.0.MLNX0922.a9ebf22-1.473########################################Preparing...########################################ucx-cma-1.7.0-1.47329 ########################################Preparing...########################################ucx-ib-1.7.0-1.47329 ########################################Preparing...########################################ucx-ib-cm-1.7.0-1.47329########################################Preparing...########################################ucx-rdmacm-1.7.0-1.47329 ########################################Preparing...########################################ucx-knem-1.7.0-1.47329########################################Preparing...########################################hcoll-4.4.2938-1.47329########################################Preparing...########################################openmpi-4.0.2rc3-1.47329 ########################################Preparing...########################################mlnx-ethtool-5.1-1.47329 ########################################Preparing...########################################mlnx-iproute2-5.2.0-1.47329 ########################################Preparing...########################################mlnxofed-docs-4.7-3.2.9.0 ########################################Preparing...########################################mpitests_openmpi-3.2.20-e1a0676.47329 ########################################Device (2e:00.0):2e:00.0 Infiniband controller: Mellanox Technologies MT28908 Family [ConnectX-6]Link Width: x16PCI Link Speed: 16GT/sDevice (a8:00.0):a8:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]Link Width: x8PCI Link Speed: 8GT/sDevice (a8:00.1):a8:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]Link Width: x8PCI Link Speed: 8GT/sDevice (ce:00.0):ce:00.0 Infiniband controller: Mellanox Technologies MT28908 Family [ConnectX-6]Link Width: x16PCI Link Speed: 16GT/sInstallation finished successfully.Preparing...################################# [100%]Updating / installing...1:mlnx-fw-updater-4.7-3.2.9.0################################# [100%]Added 'RUN_FW_UPDATER_ONBOOT=no to /etc/infiniband/openib.confAttempting to perform Firmware update...Querying Mellanox devices firmware ...Device #1:----------Device Type:ConnectX6Part Number:MCX653105A-HDA_AxDescription:ConnectX-6 VPI adapter card; HDR IB (200Gb/s) and 200GbE; single-port QSFP56; PCIe4.0 x16; tall bracket; ROHS R6PSID: MT_0000000223PCI Device Name: 2e:00.0Base GUID: b8cef60300025ca0Versions: Current AvailableFW 20.31.20.26.4012 PXE 3.6.0404 3.5.0805UEFI 14.24.001514.19.0017 Status: Up to dateLog File: /tmp/MLNX_OFED_LINUX.43198.logs/fw_update.logQuerying Mellanox devices firmware ...Device #1:----------Device Type:ConnectX4LXPart Number:MCX4121A-XCA_AxDescription:ConnectX-4 Lx EN network interface card; 10GbE dual-port SFP28; PCIe3.0 x8; ROHS R6PSID: MT_240004PCI Device Name: a8:00.0Base MAC: b8cef6d16caaVersions: Current AvailableFW 14.31.14.26.4012 PXE 3.6.0404 3.5.0805UEFI 14.24.001514.19.0017 Status: Up to dateLog File: /tmp/MLNX_OFED_LINUX.43198.logs/fw_update.logQuerying Mellanox devices firmware ...Device #1:----------Device Type:ConnectX6Part Number:MCX653105A-HDA_AxDescription:ConnectX-6 VPI adapter card; HDR IB (200Gb/s) and 200GbE; single-port QSFP56; PCIe4.0 x16; tall bracket; ROHS R6PSID: MT_0000000223PCI Device Name: ce:00.0Base GUID: b8cef60300025d00Versions: Current AvailableFW 20.31.20.26.4012 PXE 3.6.0404 3.5.0805UEFI 14.24.001514.19.0017 Status: Up to dateLog File: /tmp/MLNX_OFED_LINUX.43198.logs/fw_update.logWARNING: Original /etc/infiniband/openib.conf saved as /etc/infiniband/openib.conf.rpmsaveTo load the new driver, run:/etc/init.d/openibd restart[root@gpu-a100-4 MLNX_OFED_LINUX-4.7-3.2.9.0-rhel7.6-x86_64]# /etc/init.d/openibd restart

3、修改IB网络模式

查询 PCIEID,对应 200G 的

lspci | grep -i mellanox

切换为 IB 模式

mlxconfig -d PCIEID set LINK_TYPE_P1=1

重启,刷新配置

[root@gpu-a100-4 MLNX_OFED_LINUX-5.4-3.0.3.0-rhel7.6-x86_64]# lspci | grep -i mellanox2e:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]a8:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]a8:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]ce:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6][root@gpu-a100-4 MLNX_OFED_LINUX-5.4-3.0.3.0-rhel7.6-x86_64]# mlxconfig -d 2e:00.0 set LINK_TYPE_P1=1Device #1:----------Device type: ConnectX6 mlxconfig -d ce:00.0 set LINK_TYPE_P1=1Name: MCX653105A-HDA_AxDescription: ConnectX-6 VPI adapter card; HDR IB (200Gb/s) and 200GbE; single-port QSFP56; PCIe4.0 x16; tall bracket; ROHS R6Device: 2e:00.0 Configurations:Next Boot NewLINK_TYPE_P1 ETH(2)IB(1) Apply new Configuration? (y/n) [n] : y-E- Aborted by user. [root@gpu-a100-4 MLNX_OFED_LINUX-5.4-3.0.3.0-rhel7.6-x86_64]# mlxconfig -d ce:00.0 set LINK_TYPE_P1=1Device #1:----------Device type: ConnectX6 Name: MCX653105A-HDA_AxDescription: ConnectX-6 VPI adapter card; HDR IB (200Gb/s) and 200GbE; single-port QSFP56; PCIe4.0 x16; tall bracket; ROHS R6Device: ce:00.0 Configurations:Next Boot NewLINK_TYPE_P1 ETH(2)IB(1) Apply new Configuration? (y/n) [n] : yApplying... Done!-I- Please reboot machine to load new configurations.[root@gpu-a100-4 MLNX_OFED_LINUX-5.4-3.0.3.0-rhel7.6-x86_64]# lspci | grep -i mellanox2e:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]a8:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]a8:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]ce:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6][root@gpu-a100-4 MLNX_OFED_LINUX-5.4-3.0.3.0-rhel7.6-x86_64]# mlxconfig -d 2e:00.0 set LINK_TYPE_P1=1Device #1:----------Device type: ConnectX6 Name: MCX653105A-HDA_AxDescription: ConnectX-6 VPI adapter card; HDR IB (200Gb/s) and 200GbE; single-port QSFP56; PCIe4.0 x16; tall bracket; ROHS R6Device: 2e:00.0 Configurations:Next Boot NewLINK_TYPE_P1 ETH(2)IB(1) Apply new Configuration? (y/n) [n] : yApplying... Done!-I- Please reboot machine to load new configurations.

4、测试

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。