-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmakefile-nersc
73 lines (56 loc) · 2.29 KB
/
makefile-nersc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
RMATPATH = include/common/GTgraph/R-MAT
SPRNPATH = include/common/GTgraph/sprng2.0-lite
SEQANPATH = seqan
CXXOPTPATH = cxxopts
LOGANPATH = loganGPU
XAVIER_DIR=xavier
include include/common/GTgraph/Makefile.var
INCLUDE = -I$(SPRNPATH)/include -I$(LOGANPATH) -I$(SEQANPATH) # -I${XAVIER_DIR}/include
MLKINCLUDE = -I/opt/intel/composer_xe_2015.0.039/mkl/include
LIBPATH = -L/opt/intel/composer_xe_2015.0.039/mkl/lib
COMPILER = g++
COMPILER_GPU = nvcc
CUDAFLAGS = -arch=sm_70 -O3 -maxrregcount=32 -std=c++14 -Xcompiler -fopenmp -w
CC = gcc
#ASFLAGS = -fsanitize=address -fsanitize-address-use-after-scope
CFLAGS =-std=c++11 -fpermissive -w -O3 -I. -c
PARCFLAGS = -O3 -fopenmp -c
CFLAGS += $(ASFLAGS)
PARCFLAGS += $(ASFLAGS)
ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
sprng:
(cd $(SPRNPATH); $(MAKE); cd ../..)
cxxopt:
(cd $(CXXOPTPATH); cmake .; $(MAKE); cd ..)
rmat: sprng
(cd $(RMATPATH); $(MAKE); cd ../..)
LIBS = -L$(CURDIR)/libbloom/build -lbloom -lpthread -lbz2 -lz
Buffer.o: kmercode/Buffer.c
$(CC) $(PARCFLAGS) -o Buffer.o kmercode/Buffer.c
fq_reader.o: kmercode/fq_reader.c
$(CC) $(PARCFLAGS) -std=gnu99 -o fq_reader.o kmercode/fq_reader.c
hash_funcs.o: kmercode/hash_funcs.c
$(CC) $(PARCFLAGS) -o hash_funcs.o kmercode/hash_funcs.c
bloomlib:
$(MAKE) -C libbloom all
xavierlib:
$(MAKE) -C libbloom all
optlist.o: optlist/optlist.c optlist/optlist.h
$(CC) $(CFLAGS) $<
Kmer.o: kmercode/Kmer.cpp
$(COMPILER) $(PARCFLAGS) -std=c++11 -o Kmer.o kmercode/Kmer.cpp
# flags defined in include/common/GTgraph/Makefile.var
bella: src/main.cpp hash_funcs.o fq_reader.o Buffer.o Kmer.o optlist.o rmat bloomlib
$(COMPILER) -std=c++14 -w -O3 $(ASFLAGS) $(INCLUDE) -mavx2 -fopenmp -fpermissive -o bella hash_funcs.o Kmer.o Buffer.o fq_reader.o optlist.o src/main.cpp ${LIBS}
# GPU build
bella-gpu: src/main.cu hash_funcs.o fq_reader.o Buffer.o Kmer.o optlist.o rmat bloomlib
$(COMPILER_GPU) $(CUDAFLAGS) $(INCLUDE) -o bella hash_funcs.o Kmer.o Buffer.o fq_reader.o optlist.o src/main.cu ${LIBS} -D__NVCC__
# makes evaluation
result:
(cd benchmark; make result; cd ..)
# add -D__LIBCUCKOO_SERIAL to run lubcuckoo in a single thread
clean:
(cd include/common/GTgraph; make clean; cd ../..)
rm -f *.o
rm -f bella
$(MAKE) -C libbloom clean