forked from drjuls/AMBiT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.machine
More file actions
205 lines (162 loc) · 4.89 KB
/
make.machine
File metadata and controls
205 lines (162 loc) · 4.89 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# change this stuff only if you know what you are doing
# Options specific to Atomic source code are
# -DAMBIT_USE_MPI - To use MPI
# -DAMBIT_USE_SCALAPACK - To use ScaLAPACK
# -D_FSU=1 - Append underscores to fortran subroutine names (default)
# -D_FSU=0 - Do not append underscores to fortran subroutine names
HOSTNAME = $(shell hostname)
MACHINE = default
ifeq ($(findstring raijin, $(HOSTNAME)), raijin)
MACHINE = nci
endif
ifeq ($(findstring katana, $(HOSTNAME)), katana)
MACHINE = katana
endif
ifeq ($(HOSTNAME), jcb1pc)
MACHINE = jcb1pc
endif
ifeq ($(findstring pg, $(HOSTNAME)), pg)
MACHINE = peregrine
endif
SRCDIR = $(shell pwd)
# Override these below, if necessary
ANGULAR_DATA_DIRECTORY=$(SRCDIR)/AngularData
EIGEN_INCLUDE_DIR = /usr/local/include/Eigen3
GTEST_INCLUDE_DIR = $(SRCDIR)
GTEST_LIBS_DIR = $(SRCDIR)/gtest
INCLUDE = $(SRCDIR) $(EIGEN_INCLUDE_DIR)
ifeq ($(MACHINE), default)
CC = gcc -fopenmp
CXX = g++ -std=c++11 -Wno-deprecated-register -Wno-unused-result -fopenmp
F77 = gfortran
LINK = g++
LINKFLAGS = -fopenmp
LIBDIR = /usr/local/lib
LIBS = gsl boost_filesystem boost_system lapack blas
INCLUDE += /usr/local/include
ifdef debug
BUILD = Debug
CXXFLAGS = -g
CFLAGS = -g
else
BUILD = Release
CXXFLAGS = -O3
CFLAGS = -O3
F77FLAGS = -O2
endif
CCDEP = gcc -std=c++11
DEPFLAG = -MM
CXXFLAGS += -DAMBIT_USE_OPENMP
endif
ifeq ($(MACHINE), nci)
CC = mpic++
CXX = mpic++ -std=c++11 -qopenmp
F77 = ifort
EIGEN_INCLUDE_DIR =
ANGULAR_DATA_DIRECTORY = /short/gx16/ambit/AngularData
LINK = mpic++
LINKFLAGS = -qopenmp
LIBDIR = $(MKL)/lib/intel64
LIBOBJ =
LIBS = gsl boost_filesystem boost_system mkl_scalapack_lp64 mkl_intel_lp64 mkl_blacs_openmpi_lp64 mkl_intel_thread mkl_core pthread m dl
INCLUDE += /short/gx16/ambit/sparsehash/src
ifdef debug
BUILD = Debug
CFLAGS += -g
CXXFLAGS += -g
else
BUILD = Release
CFLAGS += -O3
CXXFLAGS += -O3
F77FLAGS += -O2 -fpe0 -static -nofor_main
endif
CXXFLAGS += -wd1125 -DAMBIT_USE_MPI -DAMBIT_USE_SCALAPACK -DAMBIT_USE_OPENMP -DEIGEN_USE_MKL_ALL
CCDEP = gcc -std=c++11
DEPFLAG = -MM
endif
ifeq ($(MACHINE), katana)
CC = mpiCC -openmp
CXX = mpiCC -std=c++11 -openmp
F77 = ifort
ANGULAR_DATA_DIRECTORY = /srv/scratch/ambit/AngularData
EIGEN_INCLUDE_DIR = /srv/scratch/ambit/
LINK = mpiCC #icpc
LINKFLAGS = -openmp
LIBDIR = ${MKLROOT}/lib/intel64/
LIBOBJ = ${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_blacs_openmpi_lp64.a -Wl,--end-group
LIBS = gsl gslcblas boost_filesystem boost_system pthread m dl
INCLUDE += ${MKLROOT}/include /share/apps/sparsehash/2.0.2/include
ifdef debug
BUILD = Debug
CFLAGS = -g
CXXFLAGS = -g
else
BUILD = Release
CFLAGS = -O2
CXXFLAGS = -O3
F77FLAGS = -O2 -fpe0 -static -nofor_main
endif
CXXFLAGS += -wd1125 -DEIGEN_USE_MKL_ALL -DAMBIT_USE_MPI -DAMBIT_USE_SCALAPACK -DAMBIT_USE_OPENMP
CCDEP = gcc -std=c++11
DEPFLAG = -MM
endif
ifeq ($(MACHINE), peregrine)
CC =
CXX = mpiicpc -std=c++11 #-fopenmp
F77 = mpiifort
LINK = mpiicpc
LINKFLAGS =
LIBDIR =
LIBOBJ =
LIBS = gsl mkl_scalapack_lp64 mkl_intel_lp64 mkl_core mkl_sequential mkl_blacs_intelmpi_lp64 boost_filesystem boost_system pthread m
# INCLUDE += ${MKLROOT}/include /share/apps/sparsehash/2.0.2/include
ifdef debug
BUILD = Debug
CFLAGS = -g
CXXFLAGS = -g
else
BUILD = Release
CFLAGS = -O2
CXXFLAGS = -O3
F77FLAGS = -O2 -fpe0 -static -nofor_main
endif
CXXFLAGS += -wd1125 -DEIGEN_USE_MKL_ALL -DAMBIT_USE_MPI -DAMBIT_USE_SCALAPACK
CCDEP = gcc -std=c++11
DEPFLAG = -MM
endif
ifeq ($(MACHINE), jcb1pc)
CC = gcc
CXX = /opt/openmpi-1.8.5/bin/mpiCC -std=c++11 -Wno-unused-result
F77 = gfortran
LINK = mpiCC
LINKFLAGS =
LIBDIR =
LIBS = gsl scalapack-openmpi blacs-openmpi blacsCinit-openmpi boost_filesystem boost_system lapack blas
INCLUDE += /usr/include
ifdef debug
BUILD = Debug
CXXFLAGS = -g
CFLAGS = -g
else
BUILD = Release
CXXFLAGS = -O3
CFLAGS = -O3
F77FLAGS = -O2
endif
CXXFLAGS += -DAMBIT_USE_MPI -DAMBIT_USE_SCALAPACK
CCDEP = mpiCC -std=c++11
DEPFLAG = -MM
endif
ifdef test
INCLUDE += $(GTEST_INCLUDE_DIR)
LIBDIR += $(GTEST_LIBS_DIR)
LIBS += gtest pthread
CXXFLAGS += -DGTEST_USE_OWN_TR1_TUPLE=0
endif
CXXFLAGS += $(addprefix -I, $(INCLUDE))
CFLAGS += $(addprefix -I, $(INCLUDE))
DEPFLAG += $(addprefix -I, $(INCLUDE))
CXXFLAGS += -DANGULAR_DATA_DIRECTORY=$(ANGULAR_DATA_DIRECTORY)
RANLIB = ranlib
AR = ar
LIBSUFFIX = lib.a