From a321dcdb4304fe1b5b0f00eee18161b1936269e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Lilleeng=20S=C3=A6tra?= Date: Fri, 16 Oct 2020 22:30:14 +0200 Subject: [PATCH] Job script for Saga. --- saga-test.job | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 saga-test.job diff --git a/saga-test.job b/saga-test.job new file mode 100644 index 0000000..7d2b475 --- /dev/null +++ b/saga-test.job @@ -0,0 +1,50 @@ +#!/bin/bash +# Job name: +#SBATCH --job-name=saga-test +# +# Project: +#SBATCH --account=nn9550k +# +# Wall clock limit: +#SBATCH --time=00:10:00 +# +# Ask for 1 GPU (max is 2) +# Note: The environment variable CUDA_VISIBLE_DEVICES will show which GPU +# device(s) to use. It will have values '0', '1' or '0,1' corresponding to +# /dev/nvidia0, /dev/nvidia1 or both, respectively. +#SBATCH --partition=accel --gres=gpu:1 +# +# Max memory usage per task (core) - increasing this will cost more core hours: +#SBATCH --mem-per-cpu=4G +# +# Number of tasks: +#SBATCH --nodes=2 --ntasks-per-node=1 + +## Set up job environment: (this is done automatically behind the scenes) +## (make sure to comment '#' or remove the following line 'source ...') +# source /cluster/bin/jobsetup + +module restore system # instead of 'module purge' rather set module environment to the system default +module load CUDA/10.2.89 + +# It is also recommended to to list loaded modules, for easier debugging: +module list + +set -o errexit # exit on errors +set -o nounset # Treat unset variables as errors (added for more easily discovering issues in your batch script) + +## Copy input files to the work directory: +mkdir $SCRATCH/ShallowWaterGPU +cp -r . $SCRATCH/ShallowWaterGPU + +## Make sure the results are copied back to the submit directory (see Work Directory below): +# chkfile MyResultFile +# chkfile is replaced by 'savefile' on Saga +savefile "$SCRATCH/ShallowWaterGPU/*.log" +savefile "$SCRATCH/ShallowWaterGPU/*.nc" + +## Do some work: +cd $SCRATCH/ShallowWaterGPU +srun /cluster/home/$HOME/.conda/envs/ShallowWaterGPU_HPC/bin/python3 --version +srun /cluster/home/$HOME/.conda/envs/ShallowWaterGPU_HPC/bin/python3 mpiTesting.py +