2022-10-10 11:01:53 +02:00
|
|
|
#FC = ifx
|
2022-10-17 14:56:32 +02:00
|
|
|
CC = nvc
|
2022-10-10 11:01:53 +02:00
|
|
|
|
2022-10-17 14:56:32 +02:00
|
|
|
#CFLAGS=-std=c99 -O0 -Wall -g -DHAVE_CUBLAS_OFFLOAD -DUSE_NVTX -mp -target=gpu
|
|
|
|
CFLAGS=-std=c99 -O3 -Wall -g -DHAVE_CUBLAS_OFFLOAD -DUSE_NVTX -mp -target=gpu
|
2022-10-10 11:01:53 +02:00
|
|
|
|
|
|
|
INCLUDE=-I$(NVHPC_ROOT)/math_libs/include
|
2022-10-17 14:56:32 +02:00
|
|
|
INCLUDE+=-I$(NVHPC_ROOT)/cuda/11.7/targets/x86_64-linux/include
|
|
|
|
INCLUDE+=-I$(NVHPC_ROOT)/profilers/Nsight_Systems/target-linux-x64/nvtx/include
|
2022-10-10 11:01:53 +02:00
|
|
|
|
|
|
|
LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial -lhdf5 -lhdf5_hl
|
|
|
|
LDFLAGS+=-L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
|
|
|
|
LDFLAGS+=-L$(NVHPC_ROOT)/math_libs/lib64 -lcublas -lcusolver -mp -target=gpu
|
|
|
|
|
|
|
|
all: test_nvc_ompol
|
|
|
|
|
2022-10-17 14:56:32 +02:00
|
|
|
test_nvc_ompol: kernels.o test.o helper.o
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
2022-10-10 11:01:53 +02:00
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf *.o *genmod* test_nvc_ompol
|
|
|
|
|