Browse Source

initial commit

master
Alan 3 years ago
commit
d029d88435
  1. 15
      cancel_jobs.sh
  2. 15
      resume_jobs.sh
  3. 15
      suspend_jobs.sh
  4. 7
      undrain_node.sh

15
cancel_jobs.sh

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
#!/bin/bash
# written by Alan
if [[ $# -ne 2 ]]
then
echo 'This script requires two arguments being the first and last job numbers to cancel listed by squeue.'
exit 1
fi
for (( job_number=$1; job_number<=$2; job_number++ ))
do
echo "canceling $job_number"
scancel $job_number
done

15
resume_jobs.sh

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
#!/bin/bash
# written by Alan
if [[ $# -ne 2 ]]
then
echo 'This script requires two arguments being the first and last job numbers to resume listed by squeue.'
exit 1
fi
for (( job_number=$1; job_number<=$2; job_number++ ))
do
echo "resuming $job_number"
eval sudo scontrol resume $job_number
done

15
suspend_jobs.sh

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
#!/bin/bash
# written by Alan
if [[ $# -ne 2 ]]
then
echo 'This script requires two arguments being the first and last job numbers to suspend listed by squeue.'
exit 1
fi
for (( job_number=$1; job_number<=$2; job_number++ ))
do
echo "suspending $job_number"
eval sudo scontrol suspend $job_number
done

7
undrain_node.sh

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
#!/bin/bash
# written by Alan
eval sudo scontrol update NodeName=slurm-test State=DOWN Reason="undraining"
eval sudo scontrol update NodeName=slurm-test State=RESUME
Loading…
Cancel
Save