Skip to content

Commit

Permalink
add helper scripts for queuing model jobs on jasmin
Browse files Browse the repository at this point in the history
  • Loading branch information
henryaddison committed Aug 9, 2024
1 parent 30733b1 commit 869127c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bin/jasmin/lotus-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Wrapper script around commands for interacting with a model to queue on LOTUS on JASMIN

module load gcc

source ~/.bashrc
mamba activate mv-mlde

set -euo pipefail

cd /home/users/vf20964/code/mlde

export DERIVED_DATA=/gws/nopw/j04/bris_climdyn/henrya/bp-backups/
export KK_SLACK_WH_URL=https://hooks.slack.com
export WANDB_EXPERIMENT_NAME="ml-downscaling-emulator"

nvidia-smi

$@
30 changes: 30 additions & 0 deletions bin/jasmin/queue-mlde
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Script for queueing a model job on LOTUS on JASMIN via lotus-wrapper script

set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

smem=128G
stime=1-00:00:00

while getopts ":m:t:" opt; do
case ${opt} in
m)
smem=${OPTARG}
;;
t)
stime=${OPTARG}
;;
\? )
# echo "Invalid option: -${OPTARG}" 1>&2
;;
: )
echo "Invalid option: $OPTARG requires an argument" 1>&2
exit 1
;;
esac
done
shift "$((OPTIND -1))"

sbatch --parsable --gres=gpu:1 --partition=orchid --account=orchid --time=${stime} --mem=${smem} -- ${SCRIPT_DIR}/lotus-wrapper $@

0 comments on commit 869127c

Please sign in to comment.