Skip to content

Commit 14ff4fb

Browse files
committed
add slurm script
1 parent e3a3668 commit 14ff4fb

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
#SBATCH -t 00:05:00
3+
#SBATCH -A ast236
4+
#SBATCH -N 2
5+
#SBATCH -J frontier_gpu_aware_mpi_example
6+
#SBATCH -o logs/%x_%j.out
7+
#SBATCH -e logs/%x_%j.out
8+
#SBATCH --gpu-bind=closest
9+
10+
module load rocm/6.4.2
11+
module load cray-mpich-abi/9.0.1
12+
13+
## set Cray MPICH vars
14+
export MPICH_GPU_SUPPORT_ENABLED=1
15+
export MPICH_SMP_SINGLE_COPY_MODE=NONE # temporary workaround
16+
17+
## import shared libraries from host filesystem
18+
export APPTAINER_BINDPATH=/usr/share/libdrm,/var/spool/slurmd,/opt/cray,${PWD}
19+
export APPTAINERENV_LD_LIBRARY_PATH="$CRAY_MPICH_ROOTDIR/gtl/lib:/opt/rocm/lib:/opt/rocm/lib64:$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH:/opt/cray/pe/lib64"
20+
export APPTAINER_CONTAINLIBS="/usr/lib64/libcxi.so.1,/usr/lib64/libjson-c.so.5,/lib64/libtinfo.so.6,/usr/lib64/libnl-3.so.200,/usr/lib64/libgfortran.so.5,/usr/lib64/libjansson.so.4,/usr/lib64/libxpmem.so.0,/usr/lib64/libatomic.so.1"
21+
export APPTAINERENV_LD_PRELOAD=$CRAY_MPICH_ROOTDIR/gtl/lib/libmpi_gtl_hsa.so.0:
22+
23+
## Run the simulation
24+
# NOTE: The --rocm flag is required to support AMD GPUs inside the container.
25+
# NOTE: The SLURM arguments are required. It will fail without them.
26+
srun -N2 --tasks-per-node=8 --gpus-per-task=1 apptainer exec --workdir `pwd` --rocm quokka_rocm-diskgalaxy.sif DiskGalaxy AgoraGalaxy.in

0 commit comments

Comments
 (0)