diff --git a/Makefile b/Makefile index df453b4..4a71154 100644 --- a/Makefile +++ b/Makefile @@ -3,16 +3,28 @@ # # SPDX-License-Identifier: MIT -CC = cc -INC = -I/global/common/software/nersc9/nccl/2.19.4/include -CFLAGS = -std=c++11 -O2 -target-accel=nvidia80 --cuda-gpu-arch=sm_80 -DUSE_CUDA -DUSE_NCCL -LDFLAGS = -L/global/common/software/nersc9/nccl/2.19.4/lib -lnccl +CC = cc +# perlmutter flags +# INC = -I/global/common/software/nersc9/nccl/2.19.4/include +# CFLAGS = -std=c++11 -O2 -target-accel=nvidia80 --cuda-gpu-arch=sm_80 -DUSE_CUDA -DUSE_NCCL +# LDFLAGS = -L/global/common/software/nersc9/nccl/2.19.4/lib -lnccl -all: allgather.x +# frontier flags +# INC = -I${ROCM_PATH}/include +# CFLAGS = -std=c++11 -O2 -D__HIP_ROCclr__ -D__HIP_ARCH_GFX90A__=1 --rocm-path=${ROCM_PATH} --offload-arch=gfx90a -x hip -DUSE_ROCM -DUSE_RCCL +# LDFLAGS = -L${ROCM_PATH}/lib -lamdhip64 -lrccl -allgather.x: allgather.cu +all: allgather.x allreduce.x reduce_scatter.x + +allgather.x: allgather.cu ${CC} ${CFLAGS} ${INC} ${LDFLAGS} -o allgather.x allgather.cu +allreduce.x: allreduce.cu + ${CC} ${CFLAGS} ${INC} ${LDFLAGS} -o allreduce.x allreduce.cu + +reduce_scatter.x: reduce_scatter.cu + ${CC} ${CFLAGS} ${INC} ${LDFLAGS} -o reduce_scatter.x reduce_scatter.cu + clean: - rm -f allgather.x + rm -f allgather.x allreduce.x reduce_scatter.x diff --git a/README b/README deleted file mode 100644 index eba2046..0000000 --- a/README +++ /dev/null @@ -1,9 +0,0 @@ -Before compiling do these: - -module load PrgEnv-cray cudatoolkit craype-accel-nvidia80 -export CRAY_ACCEL_TARGET=nvidia80 - -When running do these: - -module load cudatoolkit -export MPICH_GPU_SUPPORT_ENABLED=1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..3688d81 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +Before compiling do these: + +### Perlmutter +```sh +module load PrgEnv-cray cudatoolkit craype-accel-nvidia80 nccl +export CRAY_ACCEL_TARGET=nvidia80 +export MPICH_GPU_SUPPORT_ENABLED=1 +``` +### Frontier +```sh +module load PrgEnv-cray amd-mixed/5.6.0 craype-accel-amd-gfx90a cray-mpich/8.1.26 cpe/23.05 +export MPICH_GPU_SUPPORT_ENABLED=1 +export LD_LIBRARY_PATH="${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}" +```