

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Slurm による複数のインスタンスタイプの割り当て
<a name="slurm-multiple-instance-allocation-v3"></a>

 AWS ParallelCluster バージョン 3.3.0 以降では、コンピューティングリソースの定義されたインスタンスタイプのセットから を割り当てるようにクラスターを設定できます。割り当ては、Amazon EC2 Fleet の低コスト戦略や最適容量戦略に基づいて行うことができます。

この定義済みのインスタンスタイプセットは、すべて同じ数の vCPU を備えているか、マルチスレッドが無効な場合は同じ数のコアを備えている必要があります。さらに、このインスタンスタイプセットには、同じ製造元の同じ数のアクセラレータが必要です。[`Efa`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Efa)/[`Enabled`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Efa-Enabled) が `true` に設定されている場合、インスタンスは EFA をサポートしている必要があります。要件の詳細については、「[`Scheduling`](Scheduling-v3.md)/[`SlurmQueues`](Scheduling-v3.md#Scheduling-v3-SlurmQueues)/[`AllocationStrategy`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-AllocationStrategy)」および「[`ComputeResources`](Scheduling-v3.md#Scheduling-v3-SlurmQueues-ComputeResources)/[`Instances`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances)」を参照してください。

[CapacityType](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-CapacityType) の設定に応じて、[`AllocationStrategy`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-AllocationStrategy) を `lowest-price` または `capacity-optimized` に設定できます。

[`Instances`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances) では、一連のインスタンスタイプを設定できます。

**注記**  
 AWS ParallelCluster バージョン 3.7.0 以降では、インスタンスで[複数のインスタンスタイプを設定すると、 ](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances)を有効に`EnableMemoryBasedScheduling`できます。  
 AWS ParallelCluster バージョン 3.2.0 から 3.6.*x* では、インスタンスで[複数のインスタンスタイプを設定した場合、 ](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances)を有効にする`EnableMemoryBasedScheduling`ことはできません。

以下の例では、vCPUs、EFA サポート、アーキテクチャのインスタンスタイプをクエリする方法を示しています。

96 個の vCPU と x86\$164 アーキテクチャで InstanceTypes をクエリする。

```
$ aws ec2 describe-instance-types --region region-id \
  --filters "Name=vcpu-info.default-vcpus,Values=96" "Name=processor-info.supported-architecture,Values=x86_64" \
  --query "sort_by(InstanceTypes[*].{InstanceType:InstanceType,MemoryMiB:MemoryInfo.SizeInMiB,CurrentGeneration:CurrentGeneration,VCpus:VCpuInfo.DefaultVCpus,Cores:VCpuInfo.DefaultCores,Architecture:ProcessorInfo.SupportedArchitectures[0],MaxNetworkCards:NetworkInfo.MaximumNetworkCards,EfaSupported:NetworkInfo.EfaSupported,GpuCount:GpuInfo.Gpus[0].Count,GpuManufacturer:GpuInfo.Gpus[0].Manufacturer}, &InstanceType)" \
  --output table
```

64 コア、EFA サポート、arm64 アーキテクチャで、InstanceTypes をクエリする。

```
$ aws ec2 describe-instance-types --region region-id \
  --filters "Name=vcpu-info.default-cores,Values=64" "Name=processor-info.supported-architecture,Values=arm64" "Name=network-info.efa-supported,Values=true" --query "sort_by(InstanceTypes[*].{InstanceType:InstanceType,MemoryMiB:MemoryInfo.SizeInMiB,CurrentGeneration:CurrentGeneration,VCpus:VCpuInfo.DefaultVCpus,Cores:VCpuInfo.DefaultCores,Architecture:ProcessorInfo.SupportedArchitectures[0],MaxNetworkCards:NetworkInfo.MaximumNetworkCards,EfaSupported:NetworkInfo.EfaSupported,GpuCount:GpuInfo.Gpus[0].Count,GpuManufacturer:GpuInfo.Gpus[0].Manufacturer}, &InstanceType)" \
  --output table
```

次のクラスター設定スニペット例は、これらの InstanceType および AllocationStrategy プロパティの使用方法を示しています。

```
...
 Scheduling:
  Scheduler: slurm
  SlurmQueues:
    - Name: queue-1
      CapacityType: ONDEMAND
      AllocationStrategy: lowest-price
      ...
      ComputeResources:
        - Name: computeresource1
          Instances:
            - InstanceType: r6g.2xlarge
            - InstanceType: m6g.2xlarge
            - InstanceType: c6g.2xlarge
          MinCount: 0
          MaxCount: 500
        - Name: computeresource2
          Instances:
            - InstanceType: m6g.12xlarge
            - InstanceType: x2gd.12xlarge
          MinCount: 0
          MaxCount: 500
...
```