Created
June 15, 2022 08:04
Monitor script for cedar
This file contains hidden or 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 | |
#SBATCH --account=def-jklymak | |
#SBATCH --mail-user=jklymak@gmail.com | |
#SBATCH --mail-type=ALL | |
#SBATCH --ntasks-per-node=1 | |
#SBATCH --time=0-00:15 | |
#SBATCH --mem=64G | |
cd ${SLURM_SUBMIT_DIR} | |
top=${SLURM_JOB_NAME} | |
source /home/jklymak/venvs/butewind/bin/activate | |
runagain=false | |
# plot_snap.py finds the latest data file and plots that... | |
if python plot_snap.py ${top}; then | |
runagain=true | |
fi | |
ssh boo.uvic.ca 'chmod a+rx Sites/ButeWinds/${SLURM_JOB_NAME}/Snaps;chmod a+rx Sites/ButeWinds/${SLURM_JOB_NAME}/Snaps/*.png' | |
if ${runagain}; then | |
sbatch --job-name=${SLURM_JOB_NAME} --exclude=cdr2098 --begin=now+1hour runMonitor.sh | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment