本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
示例
以下示例配置演示了使用SlurmTorque、和AWS Batch调度程序的AWS ParallelCluster配置。
注意
从 2.11.5 版本开始,AWS ParallelCluster不支持使用SGE或Torque调度程序。
目录
Slurm Workload Manager (slurm
)
以下示例使用 slurm
计划程序启动集群。示例配置启动包含 2 个任务队列的 1 个集群。第一个队列最初spot
有 2 个t3.micro
Spot 实例可用。它可以向上扩展到最多 10 个实例,在 10 分钟内没有运行任何任务时向下扩展到最少 1 个实例(可使用scaledown_idletime设置进行调整)。第二个队列开始时没有实例,最多可以扩展到 5 个t3.micro
按需实例。ondemand
[global] update_check = true sanity_check = true cluster_template = slurm [aws] aws_region_name =
<your AWS 区域>
[vpc public] master_subnet_id =<your subnet>
vpc_id =<your VPC>
[cluster slurm] key_name =<your EC2 keypair name>
base_os = alinux2 # optional, defaults to alinux2 scheduler = slurm master_instance_type = t3.micro # optional, defaults to t3.micro vpc_settings = public queue_settings = spot,ondemand [queue spot] compute_resource_settings = spot_i1 compute_type = spot # optional, defaults to ondemand [compute_resource spot_i1] instance_type = t3.micro min_count = 1 # optional, defaults to 0 initial_count = 2 # optional, defaults to 0 [queue ondemand] compute_resource_settings = ondemand_i1 [compute_resource ondemand_i1] instance_type = t3.micro max_count = 5 # optional, defaults to 10
Son of Grid Engine(sge
) 和Torque Resource Manager (torque
)
注意
此示例仅适用于AWS ParallelCluster 2.11.4 及以下版本。从 2.11.5 版本开始,AWS ParallelCluster不支持使用SGE或Torque调度程序。
以下示例使用torque
或sge
调度程序启动集群。要使用SGE,请更改scheduler =
torque
为scheduler = sge
。示例配置最多允许 5 个并发节点,并在 10 分钟内没有运行任何作业时向下扩展到两个。
[global] update_check = true sanity_check = true cluster_template = torque [aws] aws_region_name =
<your AWS 区域>
[vpc public] master_subnet_id =<your subnet>
vpc_id =<your VPC>
[cluster torque] key_name =<your EC2 keypair name>
but they aren't eligible for future updates base_os = alinux2 # optional, defaults to alinux2 scheduler = torque # optional, defaults to sge master_instance_type = t3.micro # optional, defaults to t3.micro vpc_settings = public initial_queue_size = 2 # optional, defaults to 0 maintain_initial_size = true # optional, defaults to false max_queue_size = 5 # optional, defaults to 10
注意
从 2.11.5 版本开始,AWS ParallelCluster不支持使用SGE或Torque调度程序。如果您使用这些版本,则可以继续使用它们,也可以从AWS服务和Support 团队那里获得故障排除AWS支持。
AWS Batch (awsbatch
)
以下示例使用 awsbatch
计划程序启动集群。它设置为根据您的任务资源需求选择更好的实例类型。
示例配置最多允许 40 个并发 vCPUs,并在 10 分钟内没有运行任何作业时向下扩展到零(可使用scaledown_idletime设置进行调整)。
[global] update_check = true sanity_check = true cluster_template = awsbatch [aws] aws_region_name =
<your AWS 区域>
[vpc public] master_subnet_id =<your subnet>
vpc_id =<your VPC>
[cluster awsbatch] scheduler = awsbatch compute_instance_type = optimal # optional, defaults to optimal min_vcpus = 0 # optional, defaults to 0 desired_vcpus = 0 # optional, defaults to 4 max_vcpus = 40 # optional, defaults to 20 base_os = alinux2 # optional, defaults to alinux2, controls the base_os of # the head node and the docker image for the compute fleet key_name =<your EC2 keypair name>
vpc_settings = public