Last active
October 20, 2020 19:58
-
-
Save benfasoli/624a869462c5524f08aa150ffbbe7a25 to your computer and use it in GitHub Desktop.
CHPC SLURM convenience utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
CLUSTER=$(scluster) | |
squeue --account=lin-${CLUSTER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 $@ & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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