2022-09-22 14:37:00 +02:00
|
|
|
#FC = ifx
|
|
|
|
#CC = nvc
|
2022-07-22 11:34:29 +02:00
|
|
|
|
2022-09-09 17:15:12 +02:00
|
|
|
CFLAGS=-std=c99 -O3 -Wall -g -mp -target=gpu
|
2022-07-22 11:34:29 +02:00
|
|
|
|
2022-09-22 14:37:00 +02:00
|
|
|
INCLUDE=-I$(NVHPC_ROOT)/math_libs/include
|
|
|
|
|
|
|
|
LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial -lhdf5 -lhdf5_hl
|
2022-09-09 17:15:12 +02:00
|
|
|
LDFLAGS+=-L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
|
2022-09-23 18:57:54 +02:00
|
|
|
LDFLAGS+=-L$(NVHPC_ROOT)/math_libs/lib64 -lcublas -lcusolver -mp -target=gpu
|
2022-09-22 14:37:00 +02:00
|
|
|
|
|
|
|
all: test
|
2022-07-11 14:48:59 +02:00
|
|
|
|
|
|
|
## Link with icc
|
2022-07-21 12:21:51 +02:00
|
|
|
# test: sm.o test.o detupdate21.o meuk.o
|
2022-09-09 17:15:12 +02:00
|
|
|
# $(CC) $(LDFLAGS) -o test sm.o detupdate21.o test.o meuk.o
|
2022-07-21 12:21:51 +02:00
|
|
|
test: sm.o test.o meuk.o
|
2022-09-09 17:15:12 +02:00
|
|
|
$(CC) $(LDFLAGS) -o test sm.o test.o meuk.o
|
2022-07-21 12:21:51 +02:00
|
|
|
|
2022-07-11 14:48:59 +02:00
|
|
|
%.o: %.f90
|
|
|
|
$(FC) $(FFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf *.o *genmod* test test
|
|
|
|
|
|
|
|
debug_n_2: test
|
|
|
|
gdb --silent --args ./test n 2
|
|
|
|
|
|
|
|
debug_a_2: test
|
|
|
|
gdb --silent --args ./test a 2
|