#!/bin/bash # #SBATCH --job-name=indus_runoff #SBATCH --ntasks=1 #SBATCH --cpus-per-task=32 # 64 #SBATCH --time=10:00:00 #72 #SBATCH --mail-user=lilian.schuster@uibk.ac.at #SBATCH --qos=normal # Abort whenever a single step fails. Without this, bash will just continue on errors. set -e # Current RGI region OGGM_GLACIER_JOB=$SLURM_ARRAY_TASK_ID export OGGM_GLACIER_JOB echo "OGGM_GLACIER_JOB number : $OGGM_GLACIER_JOB" # On every node, when slurm starts a job, it will make sure the directory # /work/username exists and is writable by the jobs user. # We create a sub-directory there for this job to store its runtime data at. OGGM_WORKDIR="/work/$SLURM_JOB_USER/$SLURM_JOB_ID/wd" mkdir -p "$OGGM_WORKDIR" export OGGM_WORKDIR echo "Workdir for this run: $OGGM_WORKDIR" # Use the local data download cache export OGGM_DOWNLOAD_CACHE=/home/data/download export OGGM_DOWNLOAD_CACHE_RO=1 export OGGM_EXTRACT_DIR="/work/$SLURM_JOB_USER/$SLURM_JOB_ID/oggm_tmp" export OGGM_USE_MULTIPROCESSING=1 # Try to make mp better # export OGGM_USE_MP_SPAWN=1 # Link www fmaussion data here to avoid useless downloads mkdir -p "$OGGM_WORKDIR/cache/cluster.klima.uni-bremen.de" ln -s /home/www/fmaussion "$OGGM_WORKDIR/cache/cluster.klima.uni-bremen.de/~fmaussion" ln -s /home/www/lschuster "$OGGM_WORKDIR/cache/cluster.klima.uni-bremen.de/~lschuster" # Add other useful defaults export LRU_MAXSIZE=1000 OGGM_OUTDIR="/work/$SLURM_JOB_USER/$SLURM_JOB_ID/out" export OGGM_OUTDIR echo "Output dir for this run: $OGGM_OUTDIR" # All commands in the EOF block run inside of the container # Adjust container version to your needs, they are guaranteed to never change after their respective day has passed. srun -n 1 -c "${SLURM_JOB_CPUS_PER_NODE}" singularity exec /home/users/lschuster/images/oggm_20230222.sif bash -s <