Skip to content

Commit 698af01

Browse files
authored
Merge pull request ICESEE-project#46 from ICESEE-project/develop
runscript for jobs with spack controlling the environment
2 parents f80d213 + a82273e commit 698af01

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
#SBATCH -t25:00:00
3+
#SBATCH -JISMIP
4+
#SBATCH -N 4
5+
#SBATCH -n 96
6+
#SBATCH --ntasks-per-node=24
7+
#SBATCH -p cpu-large # pick ONE partition; or switch to: -p inferno
8+
#SBATCH --mem=256G # ensure this is allowed per node on that partition
9+
#SBATCH -A gts-arobel3-atlas
10+
#SBATCH -ostrong_scaling-%j.out
11+
#SBATCH --mail-type=BEGIN,END,FAIL
12+
#SBATCH --mail-user=bkyanjo3@gatech.edu
13+
14+
# set -euo pipefail
15+
cd $SLURM_SUBMIT_DIR
16+
17+
# Spack env (numpy, mpi4py, h5py, etc.)
18+
module purge || true
19+
source /storage/home/hcoda1/8/bkyanjo3/r-arobel3-0/ICESEE-Spack/scripts/activate.sh
20+
MPI_DIR="$(spack -e /storage/home/hcoda1/8/bkyanjo3/r-arobel3-0/ICESEE-Spack/.spack-env/icesee location -i openmpi)"
21+
export PATH="$MPI_DIR/bin:$PATH"
22+
export LD_LIBRARY_PATH="$MPI_DIR/lib:$LD_LIBRARY_PATH"
23+
24+
# --- Test Matrix ------------------------------------------------------
25+
np = 8
26+
NENS=40
27+
MODEL_NPROCS=2
28+
29+
run_case () {
30+
local np="$1"
31+
local tag="np${np}_Nens${NENS}_mp${MODEL_NPROCS}"
32+
33+
/usr/bin/time -v \
34+
srun --mpi=pmix -n "$np" \
35+
python run_da_issm.py \
36+
--Nens=${NENS} \
37+
--model_nprocs=${MODEL_NPROCS} \
38+
--verbose
39+
40+
echo "=== Finished: $tag ==="
41+
}
42+
43+
# call the function with the specified number of processes
44+
run_case "$np"
45+

0 commit comments

Comments
 (0)