#!/bin/bash

# Command options:
#SBATCH -J saturn_20230322_41520_SDI
#SBATCH -o //dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/saturn_20230322_41520_SDI_rerun/%j.log
#SBATCH -e //dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/saturn_20230322_41520_SDI_rerun/%j.err
#SBATCH -A physics
#SBATCH --mem=500G
#SBATCH --mail-type=END,FAIL
#SBATCH --time=1200
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=64

# CPU divisions:
# Number of cells = 425 x 512 x 256 = 55,705,600
# Number of CPUs = 64
# Number of cells per cpu = 2048
# Number of nodes in x2 = 1
# Number of nodes in x3 = 1
# Number of cells per node in x2 = 512
# Number of cells per node in x3 = 256
# Number of CPUs per node in x2 = 8
# Number of CPUs per node in x3 = 8
# Number of cells per CPU in x2 = 64
# Number of cells per CPU in x3 = 32

# Commands to run
cd /dartfs-hpc/rc/lab/L/LynchK/gemini_test/aurora_gemini
matlab -batch "\
setenv('GEMINI_ROOT','/dartfs-hpc/rc/lab/L/LynchK/gemini_test/gemini3d');\
addpath('/dartfs-hpc/rc/lab/L/LynchK/gemini_test/aurora_gemini');\
addpath('/dartfs-hpc/rc/lab/L/LynchK/gemini_test/mat_gemini');\
addpath('/dartfs-hpc/rc/lab/L/LynchK/gemini_test/mat_gemini-scripts');\
aurogem.sim.process('//dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/saturn_20230322_41520_SDI_rerun');\
exit\
"
