-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexorad_submit_long2
More file actions
58 lines (51 loc) · 1.44 KB
/
exorad_submit_long2
File metadata and controls
58 lines (51 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash -l
#SBATCH --job-name=exorad # shows up in the output of 'squeue'
#SBATCH --time=5-00:00:00 # specify the requested wall-time
#SBATCH --partition=astro2_long # specify the partition to run on
#SBATCH --nodes=1 # number of nodes allocated for this job
#SBATCH --ntasks-per-node=48 # number of MPI ranks per node
#SBATCH --exclusive
#SBATCH --mem=40G
#SBATCH --cpus-per-task=1 # number of OpenMP threads per MPI rank
#SBATCH --mail-type=ALL
#SBATCH -o exorad-%j.out
#SBATCH -e exorad-%j.err
# activate anaconda environment
conda activate exorad
# current work directory for this simulation
cd $SLURM_SUBMIT_DIR
echo "$SLURM_SUBMIT_DIR"
# load the required modules
module purge
module load astro inteloneapi/compiler inteloneapi/mpi
continue=""
while getopts 'uc' OPTION; do
case "$OPTION" in
u)
update_last_iter
;;
c)
continue='1'
;;
?)
echo "script usage: $(basename \$0) [-u][-c]" >&2
exit 1
;;
esac
done
shift "$(($OPTIND -1))"
if [ -n "$continue" ]
then
telegram-send "$SLURM_SUBMIT_DIR: submitting followup"
sbatch --dependency=afterok:$SLURM_JOB_ID exorad_submit_long2 -u -c
fi
telegram-send "$SLURM_SUBMIT_DIR ready to run"
telegram_simulation_bot &
cd ./run
ln -s ../input/* .
cp ../build/mitgcmuv .
# run it
echo "Ready to run"
echo "$(date)"
mpirun -n 48 ./mitgcmuv
telegram-send "$SLURM_SUBMIT_DIR ended"