Skip to content

Instantly share code, notes, and snippets.

@benfasoli
Last active October 20, 2020 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benfasoli/624a869462c5524f08aa150ffbbe7a25 to your computer and use it in GitHub Desktop.
Save benfasoli/624a869462c5524f08aa150ffbbe7a25 to your computer and use it in GitHub Desktop.
CHPC SLURM convenience utilities
#!/bin/bash
set -e
if [[ "$HOSTNAME" == "notchpeak"* ]]; then
CLUSTER="np"
elif [[ "$HOSTNAME" == "kingspeak"* ]]; then
CLUSTER="kp"
else
echo "Unable to determine cluster from hostname: $HOSTNAME" > /dev/stderr
exit 1
fi
echo $CLUSTER
#!/bin/bash
set -e
CLUSTER=$(scluster)
squeue --account=lin-${CLUSTER}
#!/bin/bash
set -e
CLUSTER=$(scluster)
srun --time=24:00:00 --nodes=1 --account=lin-${CLUSTER} --partition=lin-${CLUSTER} -o stdout.log -e stderr.log $@ &
#!/bin/bash
set -e
CLUSTER=$(scluster)
srun --time=24:00:00 --nodes=1 --account=lin-${CLUSTER} --partition=lin-${CLUSTER} --pty bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment