2
0

More than 1 year has passed since last update.

運用中のAWS ParallelClusterのSlurm Partition (SlurmQueue)を変更する方法

Last updated at Posted at 2022-03-07

ParallelClusterのSlurmのQueueを変更する

概要

SlurmQueuesのupdateポリシーの確認

SlurmQueuesのupdateポリシーを確認すると、以下のように記載されている。

Update policy: The compute fleet must be stopped for this setting to be changed for an update.

設定変更の概要

Update Policyの内容から、以下の3ステップでSlurmQueues, つまりSlurmのPartitionを更新することができる。

  1. コンピュートフリートを停止:pcluster update-compute-fleetを使用
  2. アップデートの実施: pcluster update-clusterを使用
  3. 最後に新しいコンピュートフリートを作成: pcluster update-compute-fleet

具体的な操作方法

STEP0: 対象クラスタ名と使用するconfigファイルの明示

起動中のParallelClusterを確認します。

command
pcluster list-clusters

対象となるクラスタ名と使用するCONFIGをあらかじめ定義します。

command
CLUSTER_NAME=<'sample cluster'>
NEW_CONFIG=<'変更後のCONFIG名'>

STEP1 コンピュートフリートを停止する

command
pcluster update-compute-fleet --cluster-name ${CLUSTER_NAME} \
                              --status STOP_REQUESTED \
                              --debug

STEP2 アップデートの実施

command
pcluster update-cluster --cluster-name ${CLUSTER_NAME} \
                        --cluster-configuration ${NEW_CONFIG} \
                        --debug

Updateが完了したことを以下のコマンドを用いて確認します。
UPDATE_COMPLETE と表示されれば完了です。

command
pcluster describe-cluster --cluster-name ${CLUSTER_NAME} | jq -r .clusterStatus

STEP3 コンピュートフリートを開始する

command
pcluster update-compute-fleet --cluster-name ${CLUSTER_NAME} \
                              --status START_REQUESTED \
                              --debug

しばらく待って、RUNNINGと表示されればOKです。

command
pcluster describe-cluster --cluster-name ${CLUSTER_NAME} | jq -r .computeFleetStatus

注意点

Slurmdbdを一度止めて、Updateしたほうがよい。
もし、反応が無いときはkill でSlurmdbdを止めて、再度起動すること。

参考

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0