Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 0 additions & 9 deletions README

This file was deleted.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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}"
```