Commit d3142d28 authored by Henning Fehrmann's avatar Henning Fehrmann Committed by Henning Fehrmann
Browse files

add fftw compilation

parent d3412583
......@@ -2,16 +2,20 @@
OBJ = blas.o
OBJ_blas = blas.o
OBJ_fftw = fftw.o
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
CC = hipcc
else ifeq ($(GPU), NVIDIA)
CC = nvcc
LDFLAGS = -lcublas -lm -lgomp
LDFLAGS = -lm -lgomp
LDFLAGS_blas = -lcublas
INCLUDE= -I/usr/lib/x86_64-linux-gnu/openmpi/include/
CFLAGS = ${INCLUDE} --compile -O3 -pg -Xcompiler -fopenmp -DCUDA
CUDAFLAGS = --Werror cross-execution-space-call --Wno-deprecated-gpu-targets
......@@ -19,9 +23,13 @@ else
all: blas fftw
all: ${OBJ}
${CC} -o blas ${OBJ} ${LDFLAGS} ${CUDAFLAGS}
blas: ${OBJ_blas}
${CC} -o blas ${OBJ_blas} ${LDFLAGS} ${LDFLAGS_blas} ${CUDAFLAGS}
fftw: ${OBJ_fftw}
${CC} -o fftw ${OBJ_fftw} ${LDFLAGS} ${LDFLAGS_fftw} ${CUDAFLAGS}
%.o: %.c ${HEADER}
${CC} ${CFLAGS} -c $<
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment