Slurm 设置#

  1. 更新 slogin 节点上的接口名称。

    1% device use slogin-01
    
    1. 如果 slogin-01 没有预期的接口名称,请更新接口名称。

      1% use networkdevicename
      2% set networkdevicename new-name
      
  2. 将 MAC 地址分配给 slogin 节点。

    1device use slogin-01
    2set mac <MAC address>
    
  3. 开启电源并安装 slogin 节点。

  4. 运行 bcm-install-slurm 脚本。

    使用以下参数

    1. –bcm-media 参数的安装源。它可以是 USB 或 .iso 文件的路径。

    2. 使用 -A 参数以气隙模式运行脚本。

    3. 如果 CMHA 已设置但存在故障转移 ping 错误,请附加 --ignore-ha-errors

    4. 如果只有一个 slogin 节点,请附加 --ignore-missing-login-node

      bcm-install-slurm -A --bcm-media <path to installer image or usb device to mount>
      
  5. 在配置 DGX 节点之前,确认 slurmd 文件是否存在于 DGX 镜像中,如果不存在则创建它。

    DGX A100 和 DGX H100 系统都需要相同的文件。此示例适用于 DGX H100 系统。据观察,使用 PMIX 的 NCCL 测试需要此文件。

    1cat /cm/images/dgx-os-6.3-h100-image/etc/sysconfig/slurmd
    2PMIX_MCA_ptl=^usock
    3PMIX_MCA_psec=none
    4PMIX_SYSTEM_TMPDIR=/var/empty
    5PMIX_MCA_gds=hash
    
  6. 重启 slogin 和计算节点。

    1cmsh
    2device
    3reboot -c slogin
    4reboot -c dgx-h100
    
  7. 为了简化配置,修改 slurmclient-gpu 角色以移除 slurm 客户端角色,并将 slurm client-gpu 转换为使用该名称。

    1cmsh
    2configurationoverlay
    3remove slurm-client
    4commit
    5use slurm-client-gpu
    6set name slurm-client
    7commit
    
  8. 对于 DGX A100 系统,清除 Type 值,并为每个 GPU 条目设置正确的核心关联,以获得最大性能。

     1cmsh
     2configurationoverlay
     3use slurm-client
     4roles
     5use slurmclient
     6genericresources
     7use gpu0
     8clear type
     9set cores 48-63,176-191
    10use gpu1
    11clear type
    12set cores 48-63,176-191
    13use gpu2
    14clear type
    15set cores 16-31,144-159
    16use gpu3
    17clear type
    18set cores 16-31,144-159
    19use gpu4
    20clear type
    21set cores 112-127,240-255
    22use gpu5
    23clear type
    24set cores 112-127,240-255
    25use gpu6
    26clear type
    27set cores 80-95,210-223
    28use gpu7
    29clear type
    30set cores 80-95,210-223
    31commit
    
  9. 对于 DGX H100 系统,通用资源设置为自动检测。

    使用此脚本。

     1cmsh
     2wlm
     3set gpuautodetect nvml
     4commit
     5configurationoverlay
     6use slurm-client
     7roles
     8use slurmclient
     9set gpuautodetect nvml
    10commit
    11genericresources
    12foreach * (remove)
    13commit
    14add autodetected-gpus
    15set name gpu
    16set count 8
    17set addtogresconfig yes
    18commit
    

    注意

    addtogresconfig 默认设置为 YES,无需显式设置。

    这应产生如下输出。

    1[vikingbcmhead-01->configurationoverlay*[slurm-client*]->roles*[slurmclient*]->genericresources*[autodetected-gpus]]% ls
    2Alias (key)        Name     Type     Count    File
    3------------------ -------- -------- -------- ----------------
    4autodetected-gpus  gpu      H100     8
    

    gres.conf 文件将由 BCM 自动更新——这些设置符合 NVIDIA 生态系统中各种脚本和工具的预期,并将最大程度地提高此环境与这些脚本和工具的兼容性。

  10. 如果 /home 目录未挂载在节点上,请增加重试次数。由于 bond0 接口启动和 /home 挂载之间的竞争条件,有时 /home 将不会被挂载。增加重试次数应能解决此问题。

    1category
    2use dgx-h100
    3fsmounts
    4use /home
    5set mountoptions "x-systemd.mount-timeout=150,defaults,_netdev,retry=5,vers=3"
    

Pod 设置可能会在气隙环境中留下过时的仓库。在这种情况下,需要在登录节点上手动删除以下文件。

cd /etc/apt/sources.list.d/

禁用以下仓库

1mv local.list local.list.disabled
2mv cm.disabled cm.list
3mv cm-ml.disabled cm-ml.list
4mv /etc/apt/sources.disabled /etc/apt/sources.list