다음을 통해 공유


CycleCloud Slurm 3.0

CycleCloud 8.4.0 릴리스의 일부로 Slurm 스케줄러 지원을 다시 작성합니다. 주요 기능은 다음과 같습니다.

  • 동적 노드 배열을 통한 동적 노드 및 동적 파티션 지원 이 기능은 단일 및 여러 VM(가상 머신) 크기를 모두 지원합니다.
  • 새 Slurm 버전 23.02 및 22.05.8.
  • azslurm CLI를 통한 비용 보고
  • azslurm CLI 기반 자동 크기 조정기입니다.
  • Ubuntu 20 지원.
  • 토폴로지 플러그 인 및 연결된 제출 플러그 인에 대한 필요성이 제거되었습니다.

8.4.0 이전의 CycleCloud 버전의 Slurm 클러스터

자세한 내용은 2.7에서 3.0으로의 전환을 참조하세요.

클러스터 변경

CycleCloud에 배포하는 Slurm 클러스터에는 클러스터를 변경하는 데 도움이 되는 CLI가 포함되어 azslurm 있습니다. 클러스터를 변경한 후 Slurm 스케줄러 노드에서 루트로 다음 명령을 실행하여 azure.conf 다시 빌드하고 클러스터의 노드를 업데이트합니다.

      $ sudo -i
      # azslurm scale

이 명령은 올바른 수의 노드를 사용하여 파티션을 생성하고, 적절한 gres.conf을(를) 설정하며, slurmctld을 다시 시작합니다.

노드가 더 이상 미리 생성되지 않음

CycleCloud 버전 3.0.0 Slurm 프로젝트부터 노드가 미리 생성되지 않습니다. CycleCloud에서 azslurm resume를 호출하거나 CLI를 사용하여 수동으로 만들 때 노드를 생성합니다.

추가 파티션 만들기

Azure CycleCloud와 함께 제공되는 기본 템플릿에는 3개의 파티션(hpchtcdynamic)이 있으며 Slurm 파티션에 직접 매핑되는 사용자 지정 노드 배열을 정의할 수 있습니다. 예를 들어 GPU 파티션을 만들려면 클러스터 템플릿에 다음 섹션을 추가합니다.

   [[nodearray gpu]]
   MachineType = $GPUMachineType
   ImageName = $GPUImageName
   MaxCoreCount = $MaxGPUExecuteCoreCount
   Interruptible = $GPUUseLowPrio
   AdditionalClusterInitSpecs = $ExecuteClusterInitSpecs

      [[[configuration]]]
      slurm.autoscale = true
      # Set to true if nodes are used for tightly-coupled multi-node jobs
      slurm.hpc = false

      [[[cluster-init cyclecloud/slurm:execute:3.0.1]]]
      [[[network-interface eth0]]]
      AssociatePublicIpAddress = $ExecuteNodesPublic

동적 파티션

CycleCloud 버전 3.0.1부터 솔루션은 동적 파티션을 지원합니다. 동적 파티션에 맵을 만들려면 다음 코드를 추가할 수 있습니다. 값은 myfeature 원하는 기능 설명 또는 둘 이상의 기능일 수 있으며 쉼표로 구분됩니다.

      [[[configuration]]]
      slurm.autoscale = true
      # Set to true if nodes are used for tightly-coupled multi-node jobs
      slurm.hpc = false
      # This is the minimum, but see slurmd --help and [slurm.conf](https://slurm.schedmd.com/slurm.conf.html) for more information.
      slurm.dynamic_config := "-Z --conf \"Feature=myfeature\""

공유 코드 조각은 다음 코드와 같은 동적 파티션을 생성합니다.

# Creating dynamic nodeset and partition using slurm.dynamic_config=-Z --conf "Feature=myfeature"
Nodeset=mydynamicns Feature=myfeature
PartitionName=mydynamicpart Nodes=mydynamicns

동적 파티션을 사용하여 자동 크기 조정

기본적으로 동적 파티션에는 노드가 포함되지 않습니다. CycleCloud를 통해 또는 수동으로 실행 azslurm resume 하여 노드를 시작할 수 있습니다. 노드는 선택한 이름을 사용하여 클러스터에 조인합니다. 그러나 Slurm은 이러한 노드를 미리 인식하지 못하므로 자동으로 크기를 조정할 수 없습니다.

대신 노드 레코드를 미리 만들 수 있으므로 Slurm에서 노드 레코드를 자동으로 크기 조정할 수 있습니다.

scontrol create nodename=f4-[1-10] Feature=myfeature State=CLOUD

동적 파티션의 또 다른 장점은 동일한 파티션에서 여러 VM 크기를 지원할 수 있다는 것입니다. VM 크기 이름을 기능으로 추가하기 azslurm 만 하면 사용할 VM 크기를 구분할 수 있습니다.

메모 VM 크기는 암시적으로 추가됩니다. slurm.dynamic_config에 추가할 필요가 없습니다.

scontrol create nodename=f4-[1-10] Feature=myfeature,Standard_F4 State=CLOUD
scontrol create nodename=f8-[1-10] Feature=myfeature,Standard_F8 State=CLOUD

어느 쪽이든, 이러한 노드를 State=Cloud 상태로 만들면 다른 노드와 마찬가지로 자동 크기 조정에 사용할 수 있습니다.

CycleCloud 노드 배열에서 여러 VM 크기를 지원하려면 템플릿을 변경하여 여러 VM 크기를 추가할 Config.Mutiselect = true수 있습니다.

        [[[parameter DynamicMachineType]]]
        Label = Dyn VM Type
        Description = The VM type for Dynamic nodes
        ParameterType = Cloud.MachineType
        DefaultValue = Standard_F2s_v2
        Config.Multiselect = true

동적 스케일 다운

기본적으로 동적 파티션의 모든 노드는 다른 파티션과 마찬가지로 축소됩니다. 동적 파티션을 사용하지 않도록 설정하려면 SuspendExcParts를 참조하세요.

수동 크기 조정

cyclecloud_slurm 자동 크기 조정이 사용하지 않도록 설정되어 있음을 감지하는 경우(SuspendTime=-1) FUTURE 상태를 사용하여 Slurm의 전원 상태에 의존하는 대신 전원이 꺼진 노드를 나타냅니다. 자동 크기 조정을 사용하도록 설정 sinfo 하면 노드가 다음과 같이 idle~표시됩니다. 자동 크기 조정을 사용하지 않도록 설정하면 sinfo 비활성 노드가 표시되지 않습니다. 여전히 scontrol show nodes --future을 사용하여 그 정의를 볼 수 있습니다.

새 노드를 시작하려면 실행 /opt/azurehpc/slurm/resume_program.sh node_list 합니다(예: htc-[1-10]).

노드를 종료하려면 실행 /opt/azurehpc/slurm/suspend_program.sh node_list 합니다(예: htc-[1-10]).

이 모드에서 클러스터를 시작하려면 템플릿의 추가적인 Slurm 구성에 SuspendTime=-1를 추가합니다.

클러스터를 이 모드로 전환하려면 SuspendTime=-1을(를) slurm.conf 파일에 추가한 후 scontrol reconfigure을(를) 실행합니다. 그런 다음 실행 azslurm remove_nodes 및 .azslurm scale

문제 해결

2.7에서 3.0으로 전환

  1. 설치 폴더가 이전 위치에서 변경되었습니다. /opt/cycle/slurm/opt/azurehpc/slurm로 변경되었습니다.

  2. 자동 크기 조정 로그는 이제 /opt/azurehpc/slurm/logs대신 /var/log/slurmctld에 있습니다. 파일이 slurmctld.log 이 폴더에 있습니다.

  3. cyclecloud_slurm.sh 스크립트를 더 이상 사용할 수 없습니다. 새 CLI 도구인 azslurmcyclecloud_slurm.sh을(를) 대체합니다. 루트로 실행 azslurm 하면 자동 완성이 지원됩니다.

    [root@scheduler ~]# azslurm
    usage: 
    accounting_info      - 
    buckets              - Prints out autoscale bucket information, like limits etc
    config               - Writes the effective autoscale config, after any preprocessing, to stdout
    connect              - Tests connection to CycleCloud
    cost                 - Cost analysis and reporting tool that maps Azure costs to Slurm Job Accounting data. This is an experimental feature.
    default_output_columns - Output what are the default output columns for an optional command.
    generate_topology    - Generates topology plugin configuration
    initconfig           - Creates an initial autoscale config. Writes to stdout
    keep_alive           - Add, remove or set which nodes should be prevented from being shutdown.
    limits               - 
    nodes                - Query nodes
    partitions           - Generates partition configuration
    refresh_autocomplete - Refreshes local autocomplete information for cluster specific resources and nodes.
    remove_nodes         - Removes the node from the scheduler without terminating the actual instance.
    resume               - Equivalent to ResumeProgram, starts and waits for a set of nodes.
    resume_fail          - Equivalent to SuspendFailProgram, shuts down nodes
    retry_failed_nodes   - Retries all nodes in a failed state.
    scale                - 
    shell                - Interactive python shell with relevant objects in local scope. Use the --script to run python scripts
    suspend              - Equivalent to SuspendProgram, shuts down nodes
    wait_for_resume      - Wait for a set of nodes to converge.
    
  4. CycleCloud는 노드를 미리 만들지 않습니다. 필요한 경우에만 노드를 만듭니다.

  5. 모든 Slurm 바이너리 파일은 azure-slurm-install-pkg*.tar.gz 파일의 slurm-pkgs 내부에 있습니다. 이는 특정 이진 릴리스에서 끌어온 것입니다. 현재 이진 릴리스는 4.0.0입니다.

  6. MPI 작업의 경우 유일한 기본 네트워크 경계는 파티션입니다. 버전 2.x와 달리 각 파티션에는 여러 "배치 그룹"이 포함되지 않습니다. 따라서 파티션당 하나의 코로케이션된 가상 머신 확장 집합만 있습니다. 더 이상 토폴로지 플러그 인이 필요하지 않으므로 작업 제출 플러그 인도 필요하지 않습니다. 대신 여러 파티션에 제출하는 것이 여러 배치 그룹에 작업을 제출해야 하는 사용 사례에 권장되는 옵션입니다.

CycleCloud는 스케줄러에서 표준 자동 중지 특성 집합을 지원합니다.

특성 설명
사이클클라우드 클러스터 자동 확장 중지 활성화 이 노드에서 자동 스탑을 사용하도록 설정합니다. [참/거짓]
cyclecloud.cluster.autoscale.idle_time_after_jobs 노드가 작업을 완료한 후 자동으로 멈출 때까지 유휴 상태로 앉을 시간(초)입니다.
cyclecloud.cluster.autoscale.idle_time_before_jobs 노드가 자동 멈출 때까지 작업을 완료하기 전에 유휴 상태로 앉을 시간(초)입니다.