Moldex3D AWS-Connect之AWS ParallelCluster-3

三.AWS ParallelCluster

4. Workflow to create Linux cluster on AWS

(4) Modify AWS ParallelCluster configuration file for creating Linux cluster

Go to console of EC2 instance: amazonlinux

Edit cluster configuration file

-Enter: nano -w ~/cluster-config.yaml

Moldex3D AWS-Connect之AWS ParallelCluster-3的图1

Please modify the yaml file as the figure below.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图2

Recall the "output" of the database stack

Value of DatabaseClientSecurityGroup from the output -> AdditionalSecurityGroups of the yaml file

Moldex3D AWS-Connect之AWS ParallelCluster-3的图3

Recall the "output" of the database stack

Value of DatabaseHost & DatabasePort -> Uri

-This URI must be formatted as host:port

Moldex3D AWS-Connect之AWS ParallelCluster-3的图4

Recall the "output" of the database stack

Value of DatabaseAdminUser -> Username

Value of DatabaseSecretArn -> PasswordSecretArn

Moldex3D AWS-Connect之AWS ParallelCluster-3的图5

After the modification of yaml file, the contents should be:

Moldex3D AWS-Connect之AWS ParallelCluster-3的图6

(5) Create Linux cluster via AWS ParallelCluster

Run the command to deploy cluster via AWS CloudFormation

Enter:  pcluster create-cluster --cluster-name MDXCluster --cluster-configuration cluster-config.yaml

Moldex3D AWS-Connect之AWS ParallelCluster-3的图7

Go to AWS console -> CloudFormation -> Check stack named "MDXCluster"

Please wait until the status becomes "CREATE_COMPLETE", and then you may stop EC2 instance "amazonlinux" which runs AWS ParallelCluster.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图8

After the status of stack "MDXCluster" is CREATE_COMPLETE, click "HeadNode" under "Resources"

Moldex3D AWS-Connect之AWS ParallelCluster-3的图9

Get the public IP of head node

Moldex3D AWS-Connect之AWS ParallelCluster-3的图10

(6) Upload Moldex3D Linux package to AWS S3

Go to AWS console -> S3

You may have several buckets. Please find the bucket with name: parallelcluster-XXXX

Click to enter the bucket

Moldex3D AWS-Connect之AWS ParallelCluster-3的图11

Click "Upload"

Moldex3D AWS-Connect之AWS ParallelCluster-3的图12

Click "Add Files" and select Moldex3D Portable Linux package file for CentOS 7

Moldex3D AWS-Connect之AWS ParallelCluster-3的图13

Permissions -> Predefined ACLs ->

Select Grant public-read access ->

-Check I understand the risk of granting public-read access to the specified objects.

Click "Upload"

Moldex3D AWS-Connect之AWS ParallelCluster-3的图14

After the upload is done, click "Copy URL" to get the URL of Moldex3D Portable Linux package file.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图15

(7) Setup Moldex3D at head node of Linux cluster on AWS

Open PuTTY -> Enter Public IP of head node

Moldex3D AWS-Connect之AWS ParallelCluster-3的图16

Please remember to set the SSH private key: awsparallelcluster.ppk

Go back to ?Session??and press ?Open??/text>

Moldex3D AWS-Connect之AWS ParallelCluster-3的图17

Login as -> centos

Enter passphrase for private key: awsparallelcluster.ppk

Moldex3D AWS-Connect之AWS ParallelCluster-3的图18

Download Moldex3D Portable Linux package file from AWS S3

Enter: wget [URL for the file]

Moldex3D AWS-Connect之AWS ParallelCluster-3的图19

Extract Moldex3D Portable Linux package file

Enter: tar zxvf Moldex3DLinux_2023R1_el7_64Bit_Portable.tar.gz

Moldex3D AWS-Connect之AWS ParallelCluster-3的图20

Set environment variable :

Enter: echo "export MDX_2023_BIN=/home/centos/Moldex3D/2023/x64/Bin/" >> /home/centos/.bashrc

Moldex3D AWS-Connect之AWS ParallelCluster-3的图21

(8) Check the connection between head node of Linux cluster on AWS and LM server on-premises

Run Moldex3D LM Utility for Linux at HeadNode

Enter: ~/Moldex3D/2023/x64/Bin/MDX3DLMUtil -licstatxml -host 192.168.130.52 -port 2556

If the site-to-site VPN connection is ok, you will see the output as below.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图22

(9) Submit Moldex3D job to Linux cluster on AWS

At your computer on-premises, open Moldex3D Computing Manager -> Add new server

Scheduler -> SLURM

IP/Hostname -> Public IP of HeadNode

Port -> 22

Account -> centos

Logon Type -> Private Key

Private Key -> awsparallelcluster.pem

Specified by -> Core Per Node

Core Per Node -> 4

-Because the instance type used for Compute node is t3a.xlarge (vCPU=4) in this slide.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图23

You may see that the max task. is 40

Because the cluster configuration defines that instance type of compute node is t3a.xlarge (vCPU=4) and Maximum instance count is 10.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图24

Submit a job with 16 tasks

Moldex3D AWS-Connect之AWS ParallelCluster-3的图25

After the job submission, you may see in AWS console that there are 4 compute nodes launched. After the compute nodes are ready, the Moldex3D analysis will start.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图26

When Moldex3D analysis is done, 4 compute nodes will be terminated after a period of time (about 10 minutes) defined by SLURM.

Moldex3D AWS-Connect之AWS ParallelCluster-3的图27

(10) Delete the Linux cluster on AWS

Go to AWS console -> CloudFormation -> Delete Stack by the following sequence

MDXCluster -> pcluster-slurm-db -> parallelclsuternetworking-xxxxxxxx

Moldex3D AWS-Connect之AWS ParallelCluster-3的图28

Go to AWS console -> S3 -> select the bucket named parallelcluster-xxxxxxx

Empty the bucket

Delete the bucket

Moldex3D AWS-Connect之AWS ParallelCluster-3的图29

Go to AWS console -> VPC -> Select the VPC named ParalleclusterVPC-xxxxx

Delete VPN connection

Delete Virtual Network gateway

Delete Customer gateway

Delete VPC

Moldex3D AWS-Connect之AWS ParallelCluster-3的图30

默认 最新
当前暂无评论,小编等你评论哦!
点赞 评论 收藏
关注