Skip to content
Snippets Groups Projects
Commit d3142d28 authored by Henning Fehrmann's avatar Henning Fehrmann Committed by Henning Fehrmann
Browse files

add fftw compilation

parent d3412583
No related branches found
No related tags found
No related merge requests found
...@@ -2,16 +2,20 @@ ...@@ -2,16 +2,20 @@
GPU=NVIDIA GPU=NVIDIA
GPU=AMD GPU=AMD
OBJ = blas.o OBJ_blas = blas.o
OBJ_fftw = fftw.o
ifeq ($(GPU), AMD) ifeq ($(GPU), AMD)
LDFLAGS = -L/opt/rocm/lib -lhipblas -lrocblas -fopenmp LDFLAGS = -L/opt/rocm/lib -fopenmp
LDFLAGS_blas = -lhipblas -lrocblas
LDFLAGS_fftw = -lrocfft
CFLAGS = -g -Wall -O3 -fopenmp -I/opt/rocm/include -I/opt/rocm/hip/include -DROC CFLAGS = -g -Wall -O3 -fopenmp -I/opt/rocm/include -I/opt/rocm/hip/include -DROC
CC = hipcc CC = hipcc
else ifeq ($(GPU), NVIDIA) else ifeq ($(GPU), NVIDIA)
CC = nvcc CC = nvcc
LDFLAGS = -lcublas -lm -lgomp LDFLAGS = -lm -lgomp
LDFLAGS_blas = -lcublas
INCLUDE= -I/usr/lib/x86_64-linux-gnu/openmpi/include/ INCLUDE= -I/usr/lib/x86_64-linux-gnu/openmpi/include/
CFLAGS = ${INCLUDE} --compile -O3 -pg -Xcompiler -fopenmp -DCUDA CFLAGS = ${INCLUDE} --compile -O3 -pg -Xcompiler -fopenmp -DCUDA
CUDAFLAGS = --Werror cross-execution-space-call --Wno-deprecated-gpu-targets CUDAFLAGS = --Werror cross-execution-space-call --Wno-deprecated-gpu-targets
...@@ -19,9 +23,13 @@ else ...@@ -19,9 +23,13 @@ else
unknown_HW: unknown_HW:
endif endif
all: blas fftw
all: ${OBJ} blas: ${OBJ_blas}
${CC} -o blas ${OBJ} ${LDFLAGS} ${CUDAFLAGS} ${CC} -o blas ${OBJ_blas} ${LDFLAGS} ${LDFLAGS_blas} ${CUDAFLAGS}
fftw: ${OBJ_fftw}
${CC} -o fftw ${OBJ_fftw} ${LDFLAGS} ${LDFLAGS_fftw} ${CUDAFLAGS}
%.o: %.c ${HEADER} %.o: %.c ${HEADER}
${CC} ${CFLAGS} -c $< ${CC} ${CFLAGS} -c $<
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment