本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
示例
以下示例配置展示:Amazon ParallelCluster使用配置Slurm、Torque, 和Amazon Batch计划程序。
从版本 2.11.5 开始,Amazon ParallelCluster不支持使用SGE要么Torque计划程序。
目录
Slurm Workload Manager (slurm
)
以下示例使用 slurm
计划程序启动集群。示例配置启动 1 个集群,其中包含 2 个作业队列。第一个队列,spot
,最初有 2t3.micro
可用竞价型实例。它最多可以扩展到 10 个实例,如果没有运行作业 10 分钟,则可以向下扩展至至少 1 个实例(使用scaledown_idletime设置)。第二个队列,ondemand
,从没有实例开始,最多可以扩展到 5 个t3.micro
按需实例。
[global] update_check = true sanity_check = true cluster_template = slurm [aws] aws_region_name =
<your Amazon Web Services 区域>
[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
)
此示例仅适用于Amazon ParallelCluster版本直到和包括版本 2.11.4。从版本 2.11.5 开始,Amazon 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 Amazon Web Services 区域>
[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 开始,Amazon ParallelCluster不支持使用SGE要么Torque计划程序。如果您使用这些版本,则可以继续使用它们,也可以从Amazon和服务AmazonSupport 团队。
Amazon Batch (awsbatch
)
以下示例使用 awsbatch
计划程序启动集群。它设置为根据您的作业资源需求来选择更好的实例类型。
该示例配置允许最多 40 个并发 vCPUs,且当 10 分钟没有作业运行时缩减到零(使用scaledown_idletime设置)。
[global] update_check = true sanity_check = true cluster_template = awsbatch [aws] aws_region_name =
<your Amazon Web Services 区域>
[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