Makefile.am 9.54 KB
Newer Older
1
## Process this file with automake to produce Makefile.in
2

3
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4

5
6
AM_FCFLAGS = $(SCALAPACK_FCFLAGS) @FC_MODINC@modules @FC_MODOUT@modules
AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
7
8
9

# libelpa
if WITH_OPENMP
10
lib_LTLIBRARIES = libelpa-@PACKAGE_VERSION@_mt.la
11
12
libelpa_@PACKAGE_VERSION@_mt_la_LINK = $(FCLINK)
libelpa_@PACKAGE_VERSION@_mt_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
13
else
14
lib_LTLIBRARIES = libelpa-@PACKAGE_VERSION@.la
15
16
libelpa_@PACKAGE_VERSION@_la_LINK = $(FCLINK)
libelpa_@PACKAGE_VERSION@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
17
18
endif

19

20
21
22
23
24
##rule to produce fortran config file:
#config_f90.h: ./config.h
#	grep "^#define" ./config.h > $@

if WITH_OPENMP
25
libelpa_@PACKAGE_VERSION@_mt_la_SOURCES = src/elpa1.F90 src/elpa2.F90
26
else
27
libelpa_@PACKAGE_VERSION@_la_SOURCES = src/elpa1.F90 src/elpa2.F90
28
29
endif

Andreas Marek's avatar
Andreas Marek committed
30
if WITH_REAL_GENERIC_KERNEL
31
if WITH_OPENMP
32
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
33
else
34
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real.f90
35
36
37
endif
endif

Andreas Marek's avatar
Andreas Marek committed
38
if WITH_COMPLEX_GENERIC_KERNEL
39
if WITH_OPENMP
40
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
41
else
42
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex.f90
43
44
45
endif
endif

Andreas Marek's avatar
Andreas Marek committed
46
if WITH_REAL_GENERIC_SIMPLE_KERNEL
47
if WITH_OPENMP
48
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
49
else
50
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
Andreas Marek's avatar
Andreas Marek committed
51
endif
52
53
endif

Andreas Marek's avatar
Andreas Marek committed
54
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
55
if WITH_OPENMP
56
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
57
else
58
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
59
60
61
endif
endif

Andreas Marek's avatar
Andreas Marek committed
62
if WITH_REAL_BGP_KERNEL
63
if WITH_OPENMP
64
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
65
else
66
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
67
endif
68
69
endif

Andreas Marek's avatar
Andreas Marek committed
70
if WITH_REAL_BGQ_KERNEL
71
if WITH_OPENMP
72
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
73
else
74
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
75
76
77
endif
endif

Andreas Marek's avatar
Andreas Marek committed
78
if WITH_REAL_SSE_KERNEL
79
if WITH_OPENMP
80
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
81
else
82
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
83
84
85
86
endif
else
if WITH_COMPLEX_SSE_KERNEL
if WITH_OPENMP
87
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
88
else
89
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
90
endif
91
92
endif
endif
Andreas Marek's avatar
Andreas Marek committed
93
94

if WITH_REAL_AVX_BLOCK2_KERNEL
95
if WITH_OPENMP
96
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
97
else
98
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
99
100
101
endif
endif

Andreas Marek's avatar
Andreas Marek committed
102
if WITH_REAL_AVX_BLOCK4_KERNEL
103
if WITH_OPENMP
104
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
105
else
106
 libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
107
108
109
endif
endif

Andreas Marek's avatar
Andreas Marek committed
110
if WITH_REAL_AVX_BLOCK6_KERNEL
111
if WITH_OPENMP
112
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
113
else
114
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
115
116
117
endif
endif

Andreas Marek's avatar
Andreas Marek committed
118
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
119
if WITH_OPENMP
120
 libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
121
else
122
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
123
124
125
endif
endif

Andreas Marek's avatar
Andreas Marek committed
126
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
127
if WITH_OPENMP
128
 libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
129
else
130
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
131
132
133
endif
endif

Andreas Marek's avatar
Andreas Marek committed
134
135
#if WITH_AVX_SANDYBRIDGE
#if WITH_OPENMP
136
137
#  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
138
#else
139
140
#  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
141
142
143
#endif
#endif

144
# install any .mod files in the include/ dir
145
elpa_includedir = $(includedir)/elpa-@PACKAGE_VERSION@
146
147
148
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
149
150
filesdir = $(datadir)/@PACKAGE@-@PACKAGE_VERSION@/examples
dist_files_DATA = \
151
152
153
	test/read_real.F90 \
	test/read_real_gen.F90 \
	test/test_complex2.F90 \
Andreas Marek's avatar
Andreas Marek committed
154
155
	test/test_complex2_default_kernel.F90 \
	test/test_complex2_choose_kernel_with_api.F90 \
156
157
158
	test/test_complex.F90 \
	test/test_complex_gen.F90 \
	test/test_real2.F90 \
Andreas Marek's avatar
Andreas Marek committed
159
160
161
	test/test_real2_default_kernel.F90 \
	test/test_real2_choose_kernel_with_api.F90 \
	test/print_available_elpa2_kernels.F90 \
162
163
164
	test/test_real.F90 \
	test/test_real_gen.F90

165
166
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

Andreas Marek's avatar
Andreas Marek committed
167
168
# test programs
if WITH_OPENMP
169
build_lib = libelpa-@PACKAGE_VERSION@_mt.la
Andreas Marek's avatar
Andreas Marek committed
170
else
171
build_lib = libelpa-@PACKAGE_VERSION@.la
Andreas Marek's avatar
Andreas Marek committed
172
173
endif

174
175
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
176
pkgconfig_DATA = @PKG_CONFIG_FILE@
177

178
179
180
181
182
183
184
185
186
187
188
# programs
bin_PROGRAMS = \
	elpa1_test_real \
	elpa1_test_complex \
	elpa2_print_kernels \
	elpa2_test_real \
	elpa2_test_real_default_kernel \
	elpa2_test_complex \
	elpa2_test_complex_default_kernel \
	elpa2_test_real_choose_kernel_with_api \
	elpa2_test_complex_choose_kernel_with_api
Andreas Marek's avatar
Andreas Marek committed
189

190
191
elpa1_test_real_SOURCES = test/test_real.F90
elpa1_test_real_LDADD = $(build_lib)
192

193
194
elpa2_test_real_SOURCES = test/test_real2.F90
elpa2_test_real_LDADD = $(build_lib)
195

196
197
elpa2_test_real_default_kernel_SOURCES = test/test_real2_default_kernel.F90
elpa2_test_real_default_kernel_LDADD = $(build_lib)
198

199
200
elpa2_test_real_choose_kernel_with_api_SOURCES = test/test_real2_choose_kernel_with_api.F90
elpa2_test_real_choose_kernel_with_api_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
201

202
203
elpa1_test_complex_SOURCES = test/test_complex.F90
elpa1_test_complex_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
204

205
206
elpa2_test_complex_SOURCES = test/test_complex2.F90
elpa2_test_complex_LDADD = $(build_lib)
207

208
209
elpa2_test_complex_default_kernel_SOURCES = test/test_complex2_default_kernel.F90
elpa2_test_complex_default_kernel_LDADD = $(build_lib)
210

211
212
elpa2_test_complex_choose_kernel_with_api_SOURCES = test/test_complex2_choose_kernel_with_api.F90
elpa2_test_complex_choose_kernel_with_api_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
213

214
215
elpa2_print_kernels_SOURCES = test/print_available_elpa2_kernels.F90
elpa2_print_kernels_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
216

217
218
219
220
221
222
223
224
225
226
check_SCRIPTS = \
	elpa1_test_real.sh \
	elpa2_test_real.sh \
	elpa2_test_real_default_kernel.sh \
	elpa1_test_complex.sh \
	elpa2_test_complex.sh \
	elpa2_test_complex_default_kernel.sh \
	elpa2_test_real_choose_kernel_with_api.sh \
	elpa2_test_complex_choose_kernel_with_api.sh \
	elpa2_print_kernels
227
228
229

TESTS = $(check_SCRIPTS)

230
231
232
elpa1_test_real.sh:
	echo "mpiexec -n 2 ./elpa1_test_real > /dev/null 2>&1" > elpa1_test_real.sh
	chmod +x elpa1_test_real.sh
233

234
235
236
elpa2_test_real.sh:
	echo "mpiexec -n 2 ./elpa2_test_real > /dev/null 2>&1" > elpa2_test_real.sh
	chmod +x elpa2_test_real.sh
237

238
239
240
elpa2_test_real_default_kernel.sh:
	echo "mpiexec -n 2 ./elpa2_test_real_default_kernel > /dev/null 2>&1" > elpa2_test_real_default_kernel.sh
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
241

242
243
244
elpa2_test_real_choose_kernel_with_api.sh:
	echo "mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api > /dev/null 2>&1" > elpa2_test_real_choose_kernel_with_api.sh
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
245

246
247
248
elpa1_test_complex.sh:
	echo "mpiexec -n 2 ./elpa1_test_complex > /dev/null 2>&1" > elpa1_test_complex.sh
	chmod +x elpa1_test_complex.sh
249

250
251
252
elpa2_test_complex.sh:
	echo "mpiexec -n 2 ./elpa2_test_complex > /dev/null 2>&1" > elpa2_test_complex.sh
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
253

254
255
256
elpa2_test_complex_default_kernel.sh:
	echo "mpiexec -n 2 ./elpa2_test_complex_default_kernel > /dev/null 2>&1" > elpa2_test_complex_default_kernel.sh
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
257

258
259
260
elpa2_test_complex_choose_kernel_with_api.sh:
	echo "mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api > /dev/null 2>&1" > elpa2_test_complex_choose_kernel_with_api.sh
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
261
262
263

elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
264

Andreas Marek's avatar
Andreas Marek committed
265
266
elpa1.i: $(top_srcdir)/src/elpa1.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa1.F90 -o $@
267

268
CLEANFILES = \
269
270
271
272
273
274
275
276
277
	elpa1_test_real.sh \
	elpa1_test_complex.sh \
	elpa2_test_real.sh \
	elpa2_test_real_default_kernel.sh \
	elpa2_test_complex.sh \
	elpa2_test_complex_default_kernel.sh \
	elpa2_test_real_choose_kernel_with_api.sh \
	elpa2_test_complex_choose_kernel_with_api.sh \
	elpa2_print_kernels.sh \
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
278
	*.i
279
280

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
281
282
283
284
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
285
286
287
288
289
	-rmdir ./src/.deps
	-rmdir ./src
	-rmdir ./test/.deps
	-rmdir ./test
	-rmdir modules/
290
291

EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk
292

293
294
295
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
296

297

298
@FORTRAN_MODULE_DEPS@
299
300
301
302
303
304
305
306
307
308
309

# Fortran module dependencies only work within each target,
# specify that the test programs need a finished library before
# one can compile them

# $1	Object name
define require_elpa_lib
$1: $(build_lib)

endef
$(foreach p,$(bin_PROGRAMS),$(foreach o,$($p_OBJECTS),$(eval $(call require_elpa_lib,$o))))