-
Notifications
You must be signed in to change notification settings - Fork 1
/
Make.inc
executable file
·71 lines (71 loc) · 1.97 KB
/
Make.inc
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
############################################################
# nuTRLan make include file for a plain linux installation with LAPACK,
# BLAS and MPI in /usr/local
############################################################
#
# C compiler
CC = cc
MPICC = mpicc
LOADER = cc
PLOADER = mpicc
#
CFLAGS = -DBLAS
# Debuging
CFLAGS += -O -Wall -g # -Wextra
# Fast
# CFLAGS += -O3
#
# On AMD Epyc, add flags suggested by
# http://www.prace-ri.eu/best-practice-guide-amd-epyc
#
ifeq ($(shell lscpu|grep -m 1 -c -i epyc),1)
CFLAGS += -march=znver1 -mtune=znver1 -mfma -mavx2 -m3dnow -fomit-frame-pointer
INC_NUTRLAN = -I/usr/include/openmpi-x86_64/
else
INC_NUTRLAN = -I/usr/include/mpi
endif
#
# Make command
MAKE = make
# MAKEFLAGS = TOP=${PWD}
#
# nuTRLan home directory
# TOP = ${PWD}
NUTRLAN = $(TOP)/libnutrlan.a
PNUTRLAN = $(TOP)/libnutrlan_mpi.a
#
# External directories
DIR_CLAPACK =
#
# External libraries
LIB_DIR =
MATH = -lm
ifeq (1,0) # Use Blis
BLAS = -lblis
LAPACK = -lflame
else
ifeq (1,1) # Use OpenBLAS
BLAS = -L/opt/OpenBLAS/lib -lopenblas
LAPACK = -lflame
else # Use MKL
MKLROOT = /opt/intel/mkl
BLAS =
LAPACK =
CLAPACK = $(MKLROOT)/lib/intel64/libmkl_blas95_lp64.a $(MKLROOT)/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_gnu_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -lgomp -lpthread -lm -ldl
endif
endif
F2C =
LIB = $(LIB_DIR) $(LAPACK) $(BLAS) $(CLAPACK) $(F2C) $(MATH) -lgomp
PLIB = $(LIB) -lmpi
#
# Include files
INC_CLAPACK =
INC_NUTRLAN += -I$(TOP)/INC
INC = $(INC_CLAPACK) $(INC_NUTRLAN)
#
# Object files
OBJ_REAL = dsort2.o dstqrb.o trlan.o trlaux.o trlcore.o restart.o trlmap.o
OBJ_CPLX = zdgemm.o zdgemv.o zdaxpy.o ztrlan.o ztrlaux.o ztrlcore.o
OBJ = $(OBJ_REAL) $(OBJ_CPLX)
OBJ_SERIAL = $(OBJ) trl_comm_none.o ztrl_comm_none.o
OBJ_PARALLEL = $(OBJ) trl_comm_mpi.o ztrl_comm_mpi.o