Skip to content

Commit

Permalink
add GPU accounting
Browse files Browse the repository at this point in the history
  • Loading branch information
KeitaW committed Oct 21, 2024
1 parent 5d28e92 commit d53d46f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ create_slurmdbd_config() {

# Append the accounting settings to accounting.conf, this file is empty by default and included into
# slurm.conf. This is required for Slurm to enable accounting.
# Note: GPU accounting requires GRES setup
# https://catalog.workshops.aws/sagemaker-hyperpod/en-US/05-advanced/08-gres
add_accounting_to_slurm_config() {
# `hostname -i` gave us "hostname: Name or service not known". So let's parse slurm.conf.
DBD_HOST=$(awk -F'[=(]' '/^SlurmctldHost=/ { print $NF }' /opt/slurm/etc/slurm.conf | tr -d ')')
Expand All @@ -99,6 +101,9 @@ JobAcctGatherFrequency=30
AccountingStorageType=accounting_storage/slurmdbd
AccountingStorageHost=$DBD_HOST
AccountingStoragePort=6819
AccountingStorageUser=slurm
AccountingStorageTRES=gres/gpu
GresTypes=gpu
EOL
}

Expand Down

0 comments on commit d53d46f

Please sign in to comment.