Skip to content

Commit 750da4b

Browse files
authored
Merge pull request #57 from aisclark91/polaris_enh
Updating new ALCF job running settings
2 parents 7973a76 + 80aa02a commit 750da4b

File tree

3 files changed

+34
-21
lines changed

3 files changed

+34
-21
lines changed

job_scripts/polaris/polaris.submit

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
#!/bin/sh
22
#PBS -l select=2:system=polaris
3+
#PBS -l filesystems=home:eagle:grand
34
#PBS -l place=scatter
4-
#PBS -l walltime=6:00:00
5+
#PBS -l walltime=06:00:00
56
#PBS -q prod
67
#PBS -A AstroExplosions
7-
#PBS -j eo
88

99
EXEC=./Castro2d.gnu.MPI.CUDA.SMPLSDC.ex
1010
INPUTS=inputs_2d.N14.coarse
1111

12-
module swap PrgEnv-nvhpc PrgEnv-gnu
13-
module load nvhpc-mixed
14-
1512
# Enable GPU-MPI (if supported by application)
16-
##export MPICH_GPU_SUPPORT_ENABLED=1
13+
14+
module use /soft/modulefiles
15+
module load PrgEnv-gnu
16+
module load cudatoolkit-standalone
17+
module load cpe-cuda
18+
module load gcc-native/12.3
19+
CRAY_ACCEL_TARGET=nvidia80
1720

1821
# Change to working directory
1922
cd ${PBS_O_WORKDIR}
2023

21-
# MPI and OpenMP settings
24+
# MPI and OpenMP settings. A total of 64 logical cores are available or 32 physical.
2225
NNODES=`wc -l < $PBS_NODEFILE`
23-
NRANKS_PER_NODE=4
24-
NDEPTH=8
25-
NTHREADS=1
26+
NRANKS_PER_NODE=$(nvidia-smi -L | wc -l) # We set this up For GPU simulations (4 GPUS thus 4 NRANKS_PER_NODE).
27+
NDEPTH=8 # Number of CPU logical cores tied to each MPI-process.
28+
NTHREADS=1 # Number of OpenMP processes tied to each MPI process.
2629

2730
NTOTRANKS=$(( NNODES * NRANKS_PER_NODE ))
2831

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
#!/bin/sh
22
#PBS -l select=2:system=polaris
3+
#PBS -l filesystems=home:eagle:grand
34
#PBS -l place=scatter
4-
#PBS -l walltime=0:30:00
5+
#PBS -l walltime=00:30:00
56
#PBS -q debug
67
#PBS -A AstroExplosions
78

89
EXEC=./Castro2d.gnu.MPI.CUDA.SMPLSDC.ex
910
INPUTS=inputs_2d.N14.coarse
1011

1112
# Enable GPU-MPI (if supported by application)
12-
##export MPICH_GPU_SUPPORT_ENABLED=1
13+
14+
module use /soft/modulefiles
15+
module load PrgEnv-gnu
16+
module load cudatoolkit-standalone
17+
module load cpe-cuda
18+
module load gcc-native/12.3
19+
CRAY_ACCEL_TARGET=nvidia80
1320

1421
# Change to working directory
1522
cd ${PBS_O_WORKDIR}
1623

17-
# MPI and OpenMP settings
24+
# MPI and OpenMP settings. A total of 64 logical cores are available or 32 physical.
1825
NNODES=`wc -l < $PBS_NODEFILE`
19-
NRANKS_PER_NODE=4
20-
NDEPTH=8
21-
NTHREADS=1
26+
NRANKS_PER_NODE=$(nvidia-smi -L | wc -l) # We set this up For GPU simulations (4 GPUS thus 4 NRANKS_PER_NODE).
27+
NDEPTH=8 # Number of CPU logical cores tied to each MPI-process.
28+
NTHREADS=1 # Number of OpenMP processes tied to each MPI process.
2229

2330
NTOTRANKS=$(( NNODES * NRANKS_PER_NODE ))
2431

25-
# For applications that need mpiexec to bind MPI ranks to GPUs
32+
# For applications that need mpiexec to bind MPI ranks to GPUs. This is done by the script set_affinity_gpu_polaris.sh
2633
mpiexec -n ${NTOTRANKS} --ppn ${NRANKS_PER_NODE} --depth=${NDEPTH} --cpu-bind depth --env OMP_NUM_THREADS=${NTHREADS} -env OMP_PLACES=threads ./set_affinity_gpu_polaris.sh ${EXEC} ${INPUTS}

sphinx_docs/source/alcf.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ there. This is read at the end of ``/etc/bash.bashrc``
2323
Compiling
2424
=========
2525

26-
Load the modules:
26+
Load the modules and set the `CRAY_ACCEL_TARGET` environment variable as follows:
2727

2828
.. prompt:: bash
2929

3030
module use /soft/modulefiles
3131
module load PrgEnv-gnu
32-
module load nvhpc-mixed
32+
module load cudatoolkit-standalone
33+
module load cpe-cuda
34+
module load gcc-native/12.3
35+
CRAY_ACCEL_TARGET=nvidia80
3336

3437
Then you can compile via:
3538

@@ -125,7 +128,7 @@ To create the virtual environment:
125128
.. prompt:: bash
126129

127130
module use /soft/modulefiles
128-
module load conda
131+
module load conda
129132
conda activate
130133
VENV_DIR="venvs/polaris"
131134
mkdir -p "${VENV_DIR}"
@@ -137,7 +140,7 @@ is loaded:
137140

138141
.. prompt:: bash
139142

140-
module load conda
143+
module load conda
141144
conda activate
142145
VENV_DIR="venvs/polaris"
143146
source "${VENV_DIR}/bin/activate"

0 commit comments

Comments
 (0)