Makefile.am 9.4 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

# libelpa
9
10
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
11

12
libelpa@SUFFIX@_la_SOURCES = src/elpa1.F90 src/elpa2.F90
13
14
15
16
libelpa@SUFFIX@_la_SOURCES += src/elpa_qr/qr_utils.f90 \
                               src/elpa_qr/elpa_qrkernels.f90 \
                               src/elpa_qr/elpa_pdlarfb.f90 \
                               src/elpa_qr/elpa_pdgeqrf.f90
17
18
19
20
21
22
23
24
25
26
27
28
if HAVE_DETAILED_TIMINGS
  libelpa@SUFFIX@_la_SOURCES += src/timer.F90 \
                                src/ftimings/ftimings.F90 \
                                src/ftimings/ftimings_type.F90 \
                                src/ftimings/ftimings_value.F90 \
                                src/ftimings/highwater_mark.c \
                                src/ftimings/resident_set_size.c \
                                src/ftimings/time.c \
                                src/ftimings/virtual_memory.c \
                                src/ftimings/papi.c
endif

Andreas Marek's avatar
Andreas Marek committed
29
if WITH_REAL_GENERIC_KERNEL
30
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
31
32
endif

Andreas Marek's avatar
Andreas Marek committed
33
if WITH_COMPLEX_GENERIC_KERNEL
34
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
35
36
endif

Andreas Marek's avatar
Andreas Marek committed
37
if WITH_REAL_GENERIC_SIMPLE_KERNEL
38
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
39
40
endif

Andreas Marek's avatar
Andreas Marek committed
41
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
42
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
43
44
endif

Andreas Marek's avatar
Andreas Marek committed
45
if WITH_REAL_BGP_KERNEL
46
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
47
48
endif

Andreas Marek's avatar
Andreas Marek committed
49
if WITH_REAL_BGQ_KERNEL
50
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
51
52
endif

Andreas Marek's avatar
Andreas Marek committed
53
if WITH_REAL_SSE_KERNEL
54
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
55
56
else
if WITH_COMPLEX_SSE_KERNEL
57
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
58
59
endif
endif
Andreas Marek's avatar
Andreas Marek committed
60
61

if WITH_REAL_AVX_BLOCK2_KERNEL
62
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
63
64
endif

Andreas Marek's avatar
Andreas Marek committed
65
if WITH_REAL_AVX_BLOCK4_KERNEL
66
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
67
68
endif

Andreas Marek's avatar
Andreas Marek committed
69
if WITH_REAL_AVX_BLOCK6_KERNEL
70
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
71
72
endif

Andreas Marek's avatar
Andreas Marek committed
73
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
74
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
75
76
endif

Andreas Marek's avatar
Andreas Marek committed
77
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
78
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
79
80
endif

Andreas Marek's avatar
Andreas Marek committed
81
#if WITH_AVX_SANDYBRIDGE
82
#  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
83
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
84
85
#endif

86
# install any .mod files in the include/ dir
87
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
88
89
90
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
91
filesdir = $(docdir)/examples
92
dist_files_DATA = \
93
94
95
96
97
98
99
100
101
  test/read_real.F90 \
  test/read_real_gen.F90 \
  test/test_complex2.F90 \
  test/test_complex2_default_kernel.F90 \
  test/test_complex2_choose_kernel_with_api.F90 \
  test/test_complex.F90 \
  test/test_complex_gen.F90 \
  test/test_real2.F90 \
  test/test_real2_default_kernel.F90 \
102
  test/test_real2_default_kernel_qr_decomposition.F90 \
103
104
105
106
  test/test_real2_choose_kernel_with_api.F90 \
  src/print_available_elpa2_kernels.F90 \
  test/test_real.F90 \
  test/test_real_gen.F90
107

108
109
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

110
111
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
112
pkgconfig_DATA = @PKG_CONFIG_FILE@
113

114
115
# programs
bin_PROGRAMS = \
116
117
118
119
120
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
121
122

noinst_PROGRAMS = \
123
  elpa2_test_real_default_kernel@SUFFIX@ \
124
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
125
126
127
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@
128

129
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
130

131
132
133
134
135
136
137
if HAVE_REDIRECT
  redirect_sources = test/redir.c test/redirect.F90
else
  redirect_sources =
endif

elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 test/util.F90 $(redirect_sources)
138
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
139

140
141
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90 test/util.F90 $(redirect_sources)

142
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
143

144
145
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90 test/util.F90 $(redirect_sources)

146
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
147

148
149
150
151
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/test_real2_default_kernel_qr_decomposition.F90 test/util.F90 $(redirect_sources)

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

152
153
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90 test/util.F90 $(redirect_sources)

154
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
155

156
157
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90 test/util.F90 $(redirect_sources)

158
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
159

160
161
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90 test/util.F90 $(redirect_sources)

162
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
163

164
165
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90 test/util.F90 $(redirect_sources)

166
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
167

168
169
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90 test/util.F90 $(redirect_sources)

170
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
171

172
173
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 test/util.F90 $(redirect_sources)

174
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
175

176
check_SCRIPTS = \
177
178
179
180
181
182
  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 \
183
  elpa2_test_complex_default_kernel_qr_decomposition.sh \
184
185
186
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
187
188
189

TESTS = $(check_SCRIPTS)

190
elpa1_test_real.sh:
191
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
192
	chmod +x elpa1_test_real.sh
193

194
elpa2_test_real.sh:
195
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
196
	chmod +x elpa2_test_real.sh
197

198
elpa2_test_real_default_kernel.sh:
199
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
200
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
201

202
203
204
205
elpa2_test_real_default_kernel_qr_decomposition.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel_qr_decomposition.sh
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

206
elpa2_test_real_choose_kernel_with_api.sh:
207
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
208
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
209

210
elpa1_test_complex.sh:
211
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
212
	chmod +x elpa1_test_complex.sh
213

214
elpa2_test_complex.sh:
215
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
216
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
217

218
elpa2_test_complex_default_kernel.sh:
219
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
220
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
221

222
elpa2_test_complex_choose_kernel_with_api.sh:
223
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
224
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
225
226
227

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

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

232
CLEANFILES = \
233
234
235
236
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
237
  elpa2_test_real_default_kernel_qr_decomposition.sh \
238
239
240
241
242
  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 \
  *.i
243
244

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
245
246
247
248
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
249
250
251
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
252
	-rmdir ./src/elpa2_kernels/
253
254
	-rmdir ./src
	-rmdir ./test
255
	-rmdir ./m4
256
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
257
	-rmdir .fortran_dependencies/
258
259

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

261
262
263
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
264

265

266
@FORTRAN_MODULE_DEPS@
267
268
269
270
271

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

272
# $1  Object name
273
define require_elpa_lib
274
$1: libelpa@SUFFIX@.la
275
276

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