aboutsummaryrefslogtreecommitdiff
path: root/Examples/batchScripts/batch_cori.sh
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-08-27 13:50:26 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-08-27 13:50:26 -0700
commit0a5ae49781b43864d60fe8f6e91f6c1831930708 (patch)
treee81b21329d095d99e4016b0685eac91092a79ee1 /Examples/batchScripts/batch_cori.sh
parent7a5d2666a6a266f94e4acaa5710ffb0e453d6600 (diff)
parent17eefa31d683117b365c7c272f2e3631c64c71a3 (diff)
downloadWarpX-0a5ae49781b43864d60fe8f6e91f6c1831930708.tar.gz
WarpX-0a5ae49781b43864d60fe8f6e91f6c1831930708.tar.zst
WarpX-0a5ae49781b43864d60fe8f6e91f6c1831930708.zip
Merge branch 'dev' into RZgeometry
Diffstat (limited to 'Examples/batchScripts/batch_cori.sh')
-rw-r--r--Examples/batchScripts/batch_cori.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/Examples/batchScripts/batch_cori.sh b/Examples/batchScripts/batch_cori.sh
new file mode 100644
index 000000000..e6cd5e1ef
--- /dev/null
+++ b/Examples/batchScripts/batch_cori.sh
@@ -0,0 +1,33 @@
+#!/bin/bash -l
+
+#SBATCH -N 2
+#SBATCH -t 01:00:00
+#SBATCH -q regular
+#SBATCH -C knl
+#SBATCH -S 4
+#SBATCH -J <job name>
+#SBATCH -A <allocation ID>
+#SBATCH -e error.txt
+#SBATCH -o output.txt
+
+export OMP_PLACES=threads
+export OMP_PROC_BIND=spread
+
+# KNLs have 4 hyperthreads max
+export CORI_MAX_HYPETHREAD_LEVEL=4
+# We use 64 cores out of the 68 available on Cori KNL,
+# and leave 4 to the system (see "#SBATCH -S 4" above).
+export CORI_NCORES_PER_NODE=64
+
+# Typically use 8 MPI ranks per node without hyperthreading,
+# i.e., OMP_NUM_THREADS=8
+export WARPX_NMPI_PER_NODE=8
+export WARPX_HYPERTHREAD_LEVEL=1
+
+# Compute OMP_NUM_THREADS and the thread count (-c option)
+export CORI_NHYPERTHREADS_MAX=$(( ${CORI_MAX_HYPETHREAD_LEVEL} * ${CORI_NCORES_PER_NODE} ))
+export WARPX_NTHREADS_PER_NODE=$(( ${WARPX_HYPERTHREAD_LEVEL} * ${CORI_NCORES_PER_NODE} ))
+export OMP_NUM_THREADS=$(( ${WARPX_NTHREADS_PER_NODE} / ${WARPX_NMPI_PER_NODE} ))
+export WARPX_THREAD_COUNT=$(( ${CORI_NHYPERTHREADS_MAX} / ${WARPX_NMPI_PER_NODE} ))
+
+srun --cpu_bind=cores -n $(( ${SLURM_JOB_NUM_NODES} * ${WARPX_NMPI_PER_NODE} )) -c ${WARPX_THREAD_COUNT} <path/to/executable> <input file>