Now that you installed AWS ParallelCluster and set up the foundation, you can create a configuration file to build a simple HPC Cluster. This file is generated in your home directory.
Generate the cluster with the following settings:
/shared
. It is generally a good location to store applications or scripts. Keep in mind that the /home
directory is shared on NFS as well.DisableSimultaneousMultithreading: true
in the configuration file.For more details about the AWS ParallelCluster configuration options, see the AWS ParallelCluster User Guide.
For now, paste the following commands in your terminal:
This makes sure all the required environment vairables from the previous section are set.
source env_vars
echo ${AWS_REGION}
echo ${INSTANCES}
echo ${SSH_KEY_NAME}
echo ${VPC_ID}
echo ${SUBNET_ID}
echo ${CUSTOM_AMI}
An Amazon Machine Image (AMI) that contains a compiled version of WRF v4 has been built for this workshop. You will leverage this AMI to run WRF on a test case in the next section of this lab.
Your env_vars file already contains the AMI ID you need, you can see below - just for your convenience - how we did retrieve this AMI ID.
CUSTOM_AMI=`aws ec2 describe-images --owners 280472923663 \
--query 'Images[*].{ImageId:ImageId,CreationDate:CreationDate}' \
--filters "Name=name,Values=*-amzn2-parallelcluster-3.2.0-wrf-4.4.1-*" \
--region ${AWS_REGION} \
| jq -r 'sort_by(.CreationDate)[-1] | .ImageId'`
cat > my-cluster-config.yaml << EOF
HeadNode:
InstanceType: m5.2xlarge
Ssh:
KeyName: ${SSH_KEY_NAME}
Networking:
SubnetId: ${SUBNET_ID}
LocalStorage:
RootVolume:
Size: 50
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
Dcv:
Enabled: true
Imds:
Secured: true
Scheduling:
Scheduler: slurm
SlurmSettings:
ScaledownIdletime: 1
SlurmQueues:
- Name: queue0
ComputeResources:
- Name: c524xl
MinCount: 0
MaxCount: 2
InstanceType: c5.24xlarge
DisableSimultaneousMultithreading: true
Efa:
Enabled: false
- Name: c518xl
MinCount: 0
MaxCount: 2
InstanceType: c5.18xlarge
DisableSimultaneousMultithreading: true
Efa:
Enabled: false
Networking:
SubnetIds:
- ${SUBNET_ID}
PlacementGroup:
Enabled: true
ComputeSettings:
LocalStorage:
RootVolume:
Size: 50
Region: ${AWS_REGION}
Image:
Os: alinux2
CustomAmi: ${CUSTOM_AMI}
SharedStorage:
- Name: Ebs0
StorageType: Ebs
MountDir: /shared
EbsSettings:
VolumeType: gp3
DeletionPolicy: Delete
Size: '50'
EOF
Now, you are ready to launch a cluster! Proceed to the next section.