-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathmake.top
98 lines (83 loc) · 3.46 KB
/
make.top
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#####################################################################################
#
#The MIT License (MIT)
#
#Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all
#copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#SOFTWARE.
#
#####################################################################################
#can be GNU or INTEL
LIBP_ARCH=GNU
#absolute path to libparanumal
export LIBP_DIR:=$(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
export LIBP_INCLUDE_DIR=${LIBP_DIR}/include
export LIBP_TPL_DIR=${LIBP_DIR}/3rdParty
export LIBP_LIBS_DIR=${LIBP_DIR}/libs
export LIBP_TEST_DIR=${LIBP_DIR}/test
#paths to installed blas and lapack libraries
export LIBP_BLAS_DIR =/usr/lib/x86_64-linux-gnu
export LIBP_LAPACK_DIR=/usr/lib/x86_64-linux-gnu
export LIBP_BLAS_LIB =-L${LIBP_BLAS_DIR} -lblas
export LIBP_LAPACK_LIB=-L${LIBP_LAPACK_DIR} -llapack
#include OCCA
ifndef OCCA_DIR
$(error environment variable [OCCA_DIR] is not set)
endif
ifeq (,$(wildcard ${OCCA_DIR}/scripts/Makefile))
$(error cannot locate {OCCA_DIR}/scripts/Makefile)
else
include ${OCCA_DIR}/scripts/Makefile
endif
#compilers to use for C/C++
export LIBP_MPICC = mpicc
export LIBP_MPICXX= mpic++
export LIBP_LD = mpic++
export LIBP_CFLAGS=-O2 -fopenmp -g -Wall -Wshadow -Wno-unused-function
export LIBP_MPICFLAGS=$(LIBP_CFLAGS)
export LIBP_CXXFLAGS=-O2 -fopenmp -g -Wall -Wshadow -Wno-unused-function -std=c++11
export LIBP_MPICXXFLAGS=$(LIBP_CXXFLAGS)
ifeq (1,${LIBP_COVERAGE})
export LIBP_CXXFLAGS+=--coverage
export LIBP_MPICXXFLAGS+=--coverage
endif
export LIBP_LIBS=${LIBP_BLAS_LIB} \
${LIBP_LAPACK_LIB} \
-L$(OCCA_DIR)/lib -locca $(links)
export LIBP_DEFINES=-DUSE_OCCA_MEM_BYTE_ALIGN=32
export LIBP_INCLUDES=-I${LIBP_INCLUDE_DIR} -I${OCCA_DIR}/include
ifeq (GNU,${LIBP_ARCH})
# LIBP_CXXFLAGS+= -mavx2 -ftree-vectorize -march=native
#-funroll-all-loops
#LIBP_LIBS+=-L/opt/apps/gcc5_2/atlas/3.10.2/lib/ -llapack -latlas -lf77blas -lcblas -lptcblas -lptf77blas -lsatlas -lgfortran -L../../../libxsmm/lib -lxsmm -ldl
else ifeq (INTEL,${LIBP_ARCH})
LIBP_CXXFLAGS+= -funroll-loops -xHost
LIBP_LIBS+=-L/opt/apps/intel15_3/mkl/11.2.3/lib/intel64 -lmkl_rt
# -fopt-info-vec-missed -fopt-info
#-fopt-info
else
$(error unknown arch for [LIBP_ARCH] specified)
endif
export OBJ_COLOR = \033[0;36m
export LIB_COLOR = \033[0;34m
export EXE_COLOR = \033[0;32m
export SOL_COLOR = \033[0;33m
export TEST_COLOR= \033[0;35m
export NO_COLOR = \033[m
export LIBP_MAKETOP_LOADED=true