-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
170 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cgyro_nl_fftw.o : cgyro_nl_fftw.gpu.F90 | ||
$(FC) $(FMATH) $(FFLAGS) -o cgyro_nl_fftw.o -c cgyro_nl_fftw.gpu.F90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#---------------------------------------------------------- | ||
# Cray (lumi.csc.fi) [GPU nodes] | ||
# | ||
# - 7*2*4 CPU cores (AMD Epyc) + 4x2 GPUs (MI250X) | ||
#---------------------------------------------------------- | ||
|
||
IDENTITY="LUMI" | ||
CORES_PER_NODE=56 | ||
NUMAS_PER_NODE=8 | ||
|
||
# Fortran 90/95 compiler | ||
FC = ftn -J ${GACODE_ROOT}/modules | ||
#FC = /opt/rocm/llvm/bin/flang -J ${GACODE_ROOT}/modules | ||
# Fortran 77 compiler | ||
F77 = ${FC} | ||
|
||
# Compiler options/flags | ||
ifneq ($(GACODE_OMPGPU),1) | ||
FACC =-hacc -DHIPGPU -DGACODE_GPU_AMD -I${HIPFORT_DIR}/include/hipfort/amdgcn -hacc_model=auto_async_none:no_fast_addr:no_deep_copy | ||
else | ||
FACC = -DOMPGPU -DHIPGPU -DGACODE_GPU_AMD -I${HIPFORT_DIR}/include/hipfort/amdgcn | ||
endif | ||
FOMP =-homp | ||
FMATH =-s real64 | ||
FOPT =-Ofast | ||
FDEBUG =-O0 -g | ||
F2PY = f2py --fcompiler=pg | ||
|
||
|
||
# System math libraries | ||
LMATH=-L${ROCM_PATH}/lib -L${HIPFORT_DIR}/lib -lhipfort-amdgcn -lhipfft -lamdhip64 | ||
|
||
# NetCDF | ||
#NETCDF=-L${NETCDF_DIR}/lib -lnetcdff -lnetcdf | ||
#NETCDF_INC = ${NETCDF_DIR}/include | ||
|
||
# Archive | ||
ARCH = ar cr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
if [ -n "$SSH_TTY" ] ; then | ||
echo "Setting up $GACODE_PLATFORM environment for gacode" | ||
fi | ||
|
||
if [ "x${GACODE_OMPGPU}" == "x" ]; then | ||
# default to OpenACC if not defined | ||
export GACODE_OMPGPU=0 | ||
fi | ||
|
||
if [ -n "$SSH_TTY" ] ; then | ||
if [ "x${GACODE_OMPGPU}" == "x1" ]; then | ||
echo "Using OMPGPU offload setup" | ||
else | ||
echo "Using OpenACC offload setup" | ||
fi | ||
fi | ||
|
||
module --force purge | ||
module load LUMI/23.09 partition/G | ||
module load PrgEnv-cray | ||
module load rocm | ||
module load cray-mpich | ||
module load cray-python | ||
|
||
#export MPICH_SMP_SINGLE_COPY_MODE=NONE | ||
export LD_LIBRARY_PATH="${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}" | ||
|
||
export MPICH_GPU_SUPPORT_ENABLED=1 | ||
export HIPFORT_DIR=/scratch/project_462000507/cce_16.0.1-rocm_5.6.0 | ||
#export HIPFORT_DIR=/opt/rocm/hipfort | ||
export ROCFFT_RTC_CACHE_PATH=/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#! /usr/bin/env bash | ||
# GACODE Parallel execution script | ||
|
||
simdir=${1} | ||
nmpi=${2} | ||
exec=${3} | ||
nomp=${4} | ||
numa=${5} | ||
mpinuma=${6} | ||
|
||
# nmpi = MPI tasks | ||
# nomp = OpenMP threads per MPI task | ||
# numa = NUMAs active per node | ||
# mpinuma = MPI tasks per active NUMA | ||
|
||
. $GACODE_ROOT/shared/bin/gacode_mpi_tool | ||
|
||
cd $simdir | ||
|
||
let proc_per_node=8 | ||
|
||
export MPICH_MAX_THREAD_SAFETY=funneled | ||
export OMP_NUM_THREADS=$nomp | ||
export OMP_STACKSIZE=400M | ||
export MPICH_GPU_SUPPORT_ENABLED=1 | ||
|
||
#export SLURM_CPU_BIND="cores" | ||
ulimit -c unlimited | ||
|
||
# | ||
# As recommended by | ||
# https://docs.lumi-supercomputer.eu/runjobs/scheduled-jobs/lumig-job/ | ||
# | ||
|
||
CPU_BIND="mask_cpu:fe000000000000,fe00000000000000" | ||
CPU_BIND="${CPU_BIND},fe0000,fe000000" | ||
CPU_BIND="${CPU_BIND},fe,fe00" | ||
CPU_BIND="${CPU_BIND},fe00000000,fe0000000000" | ||
|
||
#echo "> srun -n$nmpi -c$nomp --gpus-per-task=1 --partition=standard-g --account=project_462000507 --gpu-bind=closest $exec" | ||
#srun -n$nmpi -c$nomp --gpus-per-task=1 --account=project_462000507 --partition=standard-g --gres=gpu:4 --gpu-bind=closest $exec | ||
#$exec | ||
|
||
echo "> srun -n $nmpi --cpu-bind=${CPU_BIND} $GACODE_ROOT/platform/exec/wrap.${GACODE_PLATFORM} $exec" | ||
srun -n $nmpi --cpu-bind=${CPU_BIND} $GACODE_ROOT/platform/exec/wrap.${GACODE_PLATFORM} $exec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env bash | ||
# GACODE Parallel execution script (LUMI) | ||
|
||
# | ||
# As recommended by | ||
# https://docs.lumi-supercomputer.eu/runjobs/scheduled-jobs/lumig-job/ | ||
# | ||
|
||
export MPICH_GPU_SUPPORT_ENABLED=1 | ||
|
||
#env 1>&2 | ||
|
||
#echo $SLURM_LOCALID | ||
let ACC_DEVICE_NUM=$SLURM_LOCALID | ||
export ACC_DEVICE_NUM | ||
export OMP_DEFAULT_DEVICE=${ACC_DEVICE_NUM} | ||
export HIP_VISIBLE_DEVICES=${ACC_DEVICE_NUM} | ||
|
||
echo "`uname -n` $SLURM_PROCID $SLURM_LOCALID $ACC_DEVICE_NUM `taskset -pc $$`" | ||
#ecno "uname -n` $SLURM_LOCALID LL $LD_LIBRARY_PATH" | ||
|
||
# no MPS | ||
exec "$@" | ||
|