-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·83 lines (65 loc) · 2.67 KB
/
Makefile
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
74
75
76
77
78
79
80
81
82
83
#LIBS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_sequential.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm
ifdef RI
INCS = -I/home/rajbhand/DTCF/DLTC
INCS += -I/home/rajbhand/DTCF
GA_DIR = /home/rajbhand/Applications/ga-5-0/build
INCS += -I$(GA_DIR)/include/
# SCIOTO
SCIOTO_DIR = /home/rajbhand/Applications/scioto/trunk
INCS += -I$(SCIOTO_DIR)/include
CC = mpicxx
LIBS = -I$(MKLROOT)/include -mkl=parallel -openmp -lpthread -lm
LIBS += -L$(SCIOTO_DIR)/lib -ltc -lm
LIBS += -L$(SCIOTO_DIR)
LIBS += -L$(GA_DIR)/lib -lga -lifcore
FLAGS = -DRI=1 -std=c++0x -O3
endif
ifdef HOPPER
CC = CC
LIBS = -fopenmp
FLAGS = -DHOPPER=1 -std=c++0x -O3
endif
ifdef BGQ
CC = mpixlcxx_r
LIBS = -I/bgsys/drivers/ppcfloor/ -I/soft/libraries/essl/current/include -L/soft/libraries/essl/current/lib64 -lesslsmpbg -L${IBM_MAIN_DIR}/xlf/bg/14.1/bglib64 -lxlf90_r
FLAGS = -std=c++-98x -qlanglvl=extended0x -DBGQ=1 -O3 -qarch=qp -qtune=qp -qsmp=auto
IBMCMP_ROOT=${IBM_MAIN_DIR}
BLAS_LIB=/soft/libraries/alcf/current/xl/BLAS/lib
LAPACK_LIB=/soft/libraries/alcf/current/xl/LAPACK/lib
ESSL_LIB=/soft/libraries/essl/current/essl/5.1/lib64
XLF_LIB=${IBMCMP_ROOT}/xlf/bg/14.1/bglib64
XLSMP_LIB=${IBMCMP_ROOT}/xlsmp/bg/3.1/bglib64
XLMASS_LIB=${IBMCMP_ROOT}/xlmass/bg/7.3/bglib64
MATH_LIBS="-L${XLMASS_LIB} -lmass -L${LAPACK_LIB} -llapack \
-L${ESSL_LIB} -lesslsmpbg -L${XLF_LIB} -lxlf90_r \
-L${XLSMP_LIB} -lxlsmp -lxlopt -lxlfmath -lxl -ldl \
-Wl,--allow-multiple-definition"
#CC = /soft/compilers/wrappers/gcc/mpicxx
#LIBS = -fopenmp -I/bgsys/drivers/ppcfloor/ -I/soft/libraries/essl/current/include ${MATH_LIBS}
#LIBS = -I/bgsys/drivers/ppcfloor/ -I/soft/libraries/essl/current/include ${MATH_LIBS}
#FLAGS = -qlanglvl=extended0x -DBGQ=1 -O3 -qarch=qp -qtune=qp -qsmp=auto
#FLAGS = -DBGQ=1 -std=c++0x -O3 -mcpu=a2 -ffast-math -funroll-loops -ftree-vectorize -fopenmp
endif
ifdef TIMER
FLAGS+=-DTIMER=$(TIMER)
endif
MAIN = tests/m223/m223
LINK = $(CC)
EXE = tests/m223/m223.x
OBJS_DLTC = DLTC/dltc_tensor.o DLTC/compute.o DLTC/transp-kernel-omp.o DLTC/exec.o DLTC/ccd-t2.o DLTC/ccsd-t1.o DLTC/ccsd-t2.o DLTC/task.o DLTC/expr.o DLTC/loops.o DLTC/profiler.o DLTC/cache.o DLTC/transp.o DLTC/main.o
OBJS_RRR = tensor.o redistribute.o grid_redib.o cost.o contraction.o helper.o transpose_helper.o localcontract.o block_grid.o grid.o correct.o rect_instigation.o tests/m223/m223.o
OBJS = $(OBJS_RRR)
#OBJS += $(OBJS_DLTC)
OBJS += $(MAIN).o
ifdef TIMER
FLAGS+=-DTIMER=$(TIMER)
endif
all: $(EXE)
$(EXE): $(OBJS)
$(LINK) $(FLAGS) -o $@ $^ $(LIBS)
%.o:%.cc
$(CC) $(INCS) $(FLAGS) -c -o $@ $^ $(LIBS)
.PHONY : clean
clean:
rm -rf *.o *.x *.out
rm -rf DLTC/*.o *.x *.out