forked from yang-song/score_sde_pytorch
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add helper scripts for queuing model jobs on jasmin
- Loading branch information
1 parent
30733b1
commit 869127c
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
|
||
$@ |
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
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 $@ |