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

3
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
5
AM_FCFLAGS = $(SCALAPACK_FCFLAGS) $(FC_MODINC)modules
6
AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
7

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
8
9
FCLD = @ACTUAL_FC@

10
# libelpa
11
12
13
14
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION)
libelpa@SUFFIX@_la_LIBADD = libelpa@SUFFIX@_public.la libelpa@SUFFIX@_private.la
libelpa@SUFFIX@_la_SOURCES =
15

16
17
# parts with public interface
noinst_LTLIBRARIES = libelpa@SUFFIX@_public.la
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
18
libelpa@SUFFIX@_public_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)modules $(FC_MODINC)private_modules
19
libelpa@SUFFIX@_public_la_SOURCES = \
20
21
22
23
24
25
26
  src/elpa.F90 \
  src/elpa_api.F90 \
  src/elpa_constants.F90 \
  src/general/elpa_utilities.F90

if ENABLE_LEGACY
libelpa@SUFFIX@_public_la_SOURCES += \
27
  src/elpa_driver/legacy_interface/elpa.F90 \
28
  src/elpa1/legacy_interface/elpa1.F90 \
29
30
  src/elpa2/legacy_interface/elpa2.F90 \
  src/elpa2/legacy_interface/elpa2_utilities.F90 \
31
  src/elpa1/legacy_interface/elpa1_auxiliary.F90
32
endif
33
34
35

# internal parts
noinst_LTLIBRARIES += libelpa@SUFFIX@_private.la
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
36
libelpa@SUFFIX@_private_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
37
libelpa@SUFFIX@_private_la_SOURCES = \
38
  src/elpa_impl.F90 \
39
  src/elpa_abstract_impl.F90 \
40
41
42
43
44
45
46
47
48
  src/helpers/mod_precision.F90 \
  src/helpers/mod_mpi.F90 \
  src/helpers/mod_mpi_stubs.F90 \
  src/elpa_generated_fortran_interfaces.F90 \
  src/elpa2/mod_redist_band.F90 \
  src/elpa2/mod_pack_unpack_cpu.F90 \
  src/elpa2/mod_compute_hh_trafo.F90 \
  src/helpers/aligned_mem.F90 \
  src/elpa1/elpa1_compute_private.F90 \
49
  src/elpa1/elpa1_auxiliary.F90 \
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
  src/elpa2/elpa2_determine_workload.F90 \
  src/elpa2/elpa2_compute.F90 \
  src/elpa2/kernels/mod_single_hh_trafo_real.F90 \
  src/GPU/check_for_gpu.F90 \
  src/GPU/mod_cuda.F90 \
  src/elpa2/GPU/interface_c_kernel.F90 \
  src/elpa2/mod_pack_unpack_gpu.F90 \
  src/elpa2/qr/qr_utils.F90 \
  src/elpa2/qr/elpa_qrkernels.F90 \
  src/elpa2/qr/elpa_pdlarfb.F90 \
  src/elpa2/qr/elpa_pdgeqrf.F90 \
  src/elpa1/elpa1.F90 \
  src/elpa2/elpa2.F90 \
  src/elpa_c_interface.c \
  src/elpa_index.c

if ENABLE_LEGACY
libelpa@SUFFIX@_private_la_SOURCES += \
68
  src/elpa_driver/legacy_interface/elpa_driver_c_interface.F90 \
69
  src/elpa1/legacy_interface/elpa_1stage_c_interface.F90 \
70
  src/elpa2/legacy_interface/elpa_2stage_c_interface.F90
71
endif
72

73
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
74
75
76
77
78
79
80
  src/elpa1/elpa_reduce_add_vectors.X90 \
  src/elpa1/elpa_transpose_vectors.X90 \
  src/elpa1/elpa1_compute_template.X90 \
  src/elpa2/elpa2_compute_real_template.X90 \
  src/elpa2/elpa2_compute_complex_template.X90 \
  src/elpa1/elpa1_template.X90 \
  src/elpa2/elpa2_template.X90 \
81
82
83
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  src/elpa2/elpa2_bandred_template.X90 \
  src/elpa2/elpa2_symm_matrix_allreduce_real_template.X90 \
  src/elpa2/elpa2_trans_ev_band_to_full_template.X90 \
  src/elpa2/elpa2_tridiag_band_template.X90 \
  src/elpa2/elpa2_trans_ev_tridi_to_band_template.X90 \
  src/elpa2/elpa2_herm_matrix_allreduce_complex_template.X90 \
  src/elpa2/kernels/elpa2_kernels_real_template.X90 \
  src/elpa2/kernels/elpa2_kernels_complex_template.X90 \
  src/elpa2/kernels/elpa2_kernels_simple_template.X90 \
  src/elpa2/pack_unpack_cpu.X90 \
  src/elpa2/pack_unpack_gpu.X90 \
  src/elpa2/compute_hh_trafo.X90 \
  src/elpa2/redist_band.X90 \
  src/general/sanity.X90 \
  src/elpa1/elpa_cholesky_template.X90 \
  src/elpa1/elpa_invert_trm.X90 \
  src/elpa1/elpa_multiply_a_b.X90 \
  src/elpa1/elpa_solve_tridi_impl_public.X90 \
  src/general/precision_macros.h
103

104
105
if ENABLE_LEGACY
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES += \
106
  src/elpa1/legacy_interface/elpa1_template.X90 \
107
  src/elpa2/legacy_interface/elpa2_template.X90 \
108
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
109
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
110
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
111
112
113
114
115
116
117
118
119
  src/elpa1/legacy_interface/elpa_solve_tridi_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_mult_at_b_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_mult_ah_b_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_invert_trm_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_cholesky_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_cholesky_template.X90 \
  src/elpa1/legacy_interface/elpa_invert_trm.X90 \
  src/elpa1/legacy_interface/elpa_multiply_a_b.X90 \
  src/elpa1/legacy_interface/elpa_solve_tridi.X90
120
endif
121

122
if HAVE_DETAILED_TIMINGS
123
124
125
126
127
128
129
130
131
libelpa@SUFFIX@_private_la_SOURCES += \
  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
132
133
134
135
136
137

if ENABLE_LEGACY
libelpa@SUFFIX@_private_la_SOURCES += \
  src/helpers/timer.F90
endif

138
else
139
140
libelpa@SUFFIX@_private_la_SOURCES += \
  src/helpers/timer_dummy.F90
141
142
endif

143
if WITH_GPU_VERSION
Andreas Marek's avatar
Andreas Marek committed
144
145
  libelpa@SUFFIX@_private_la_SOURCES +=  src/GPU/cudaFunctions.cu src/GPU/cuUtils.cu src/elpa2/GPU/ev_tridi_band_gpu_c_v2.cu
  EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES +=   src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.Xcu src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.Xcu
146
147
endif

148
if !WITH_MPI
149
  libelpa@SUFFIX@_private_la_SOURCES += src/helpers/mod_time_c.F90
150
if !HAVE_DETAILED_TIMINGS
151
  libelpa@SUFFIX@_private_la_SOURCES += src/ftimings/time.c
152
153
154
endif
endif

Andreas Marek's avatar
Andreas Marek committed
155
if WITH_REAL_GENERIC_KERNEL
156
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2/kernels/elpa2_kernels_real.F90
157
158
endif

Andreas Marek's avatar
Andreas Marek committed
159
if WITH_COMPLEX_GENERIC_KERNEL
160
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2/kernels/elpa2_kernels_complex.F90
161
162
endif

Andreas Marek's avatar
Andreas Marek committed
163
if WITH_REAL_GENERIC_SIMPLE_KERNEL
164
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_simple.F90
165
166
endif

Andreas Marek's avatar
Andreas Marek committed
167
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
168
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_simple.F90
169
170
endif

Andreas Marek's avatar
Andreas Marek committed
171
if WITH_REAL_BGP_KERNEL
172
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_bgp.f90
173
174
endif

Andreas Marek's avatar
Andreas Marek committed
175
if WITH_REAL_BGQ_KERNEL
176
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_bgq.f90
177
178
endif

179
if WITH_REAL_SSE_ASSEMBLY_KERNEL
180
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_asm_x86_64_double_precision.s
181
if WANT_SINGLE_PRECISION_REAL
182
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_asm_x86_64_single_precision.s
183
endif
184

Andreas Marek's avatar
Andreas Marek committed
185
else
186
if WITH_COMPLEX_SSE_ASSEMBLY_KERNEL
187
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_asm_x86_64_double_precision.s
188
if WANT_SINGLE_PRECISION_COMPLEX
189
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_asm_x86_64_single_precision.s
190
endif
191
192
endif
endif
Andreas Marek's avatar
Andreas Marek committed
193

194
if WITH_REAL_SSE_BLOCK2_KERNEL
195
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_sse_2hv_double_precision.c
196
if WANT_SINGLE_PRECISION_REAL
197
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_sse_2hv_single_precision.c
198
endif
199
200
endif

Andreas Marek's avatar
Andreas Marek committed
201
if WITH_REAL_AVX_BLOCK2_KERNEL
202
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_2hv_double_precision.c
203
if WANT_SINGLE_PRECISION_REAL
204
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_2hv_single_precision.c
205
endif
206
207
else
if WITH_REAL_AVX2_BLOCK2_KERNEL
208
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_2hv_double_precision.c
209
if WANT_SINGLE_PRECISION_REAL
210
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_2hv_single_precision.c
211
endif
212
endif
213
214
endif

215
if WITH_REAL_AVX512_BLOCK2_KERNEL
216
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx512_2hv_double_precision.c
217
if WANT_SINGLE_PRECISION_REAL
218
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx512_2hv_single_precision.c
219
endif
220
221
222
endif


223
if WITH_REAL_SSE_BLOCK4_KERNEL
224
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_sse_4hv_double_precision.c
225
if WANT_SINGLE_PRECISION_REAL
226
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_sse_4hv_single_precision.c
227
endif
228
229
endif

Andreas Marek's avatar
Andreas Marek committed
230
if WITH_REAL_AVX_BLOCK4_KERNEL
231
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_4hv_double_precision.c
232
if WANT_SINGLE_PRECISION_REAL
233
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_4hv_single_precision.c
234
endif
235
236
else
if WITH_REAL_AVX2_BLOCK4_KERNEL
237
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_4hv_double_precision.c
238
if WANT_SINGLE_PRECISION_REAL
239
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_4hv_single_precision.c
240
endif
241
endif
242
243
endif

244
if WITH_REAL_AVX512_BLOCK4_KERNEL
245
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx512_4hv_double_precision.c
246
if WANT_SINGLE_PRECISION_REAL
247
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx512_4hv_single_precision.c
248
endif
249
250
251
252
endif



253
if WITH_REAL_SSE_BLOCK6_KERNEL
254
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_sse_6hv_double_precision.c
255
if WANT_SINGLE_PRECISION_REAL
256
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_sse_6hv_single_precision.c
257
endif
258
259
endif

Andreas Marek's avatar
Andreas Marek committed
260
if WITH_REAL_AVX_BLOCK6_KERNEL
261
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_6hv_double_precision.c
262
if WANT_SINGLE_PRECISION_REAL
263
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_6hv_single_precision.c
264
endif
265
266
else
if WITH_REAL_AVX2_BLOCK6_KERNEL
267
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_6hv_double_precision.c
268
if WANT_SINGLE_PRECISION_REAL
269
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx-avx2_6hv_single_precision.c
270
endif
271
endif
272
273
endif

274
if WITH_REAL_AVX512_BLOCK6_KERNEL
275
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx512_6hv_double_precision.c
276
if WANT_SINGLE_PRECISION_REAL
277
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_real_avx512_6hv_single_precision.c
278
endif
279
280
281
endif


282
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
283
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_sse_1hv_double_precision.c
284
if WANT_SINGLE_PRECISION_COMPLEX
285
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_sse_1hv_single_precision.c
286
endif
287
288
endif

Andreas Marek's avatar
Andreas Marek committed
289
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
290
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_1hv_double_precision.c
291
if WANT_SINGLE_PRECISION_COMPLEX
292
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_1hv_single_precision.c
293
endif
294
295
else
if WITH_COMPLEX_AVX2_BLOCK1_KERNEL
296
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_1hv_double_precision.c
297
if WANT_SINGLE_PRECISION_COMPLEX
298
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_1hv_single_precision.c
299
endif
300
endif
301
302
endif

303
304

if WITH_COMPLEX_AVX512_BLOCK1_KERNEL
305
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx512_1hv_double_precision.c
306
if WANT_SINGLE_PRECISION_COMPLEX
307
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx512_1hv_single_precision.c
308
endif
309
310
endif

311
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
312
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_sse_2hv_double_precision.c
313
if WANT_SINGLE_PRECISION_COMPLEX
314
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_sse_2hv_single_precision.c
315
endif
316
317
endif

Andreas Marek's avatar
Andreas Marek committed
318
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
319
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_2hv_double_precision.c
320
if WANT_SINGLE_PRECISION_COMPLEX
321
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_2hv_single_precision.c
322
endif
323
324
else
if WITH_COMPLEX_AVX2_BLOCK2_KERNEL
325
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_2hv_double_precision.c
326
if WANT_SINGLE_PRECISION_COMPLEX
327
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_2hv_single_precision.c
328
endif
329
endif
330
331
endif

332
if WITH_COMPLEX_AVX512_BLOCK2_KERNEL
333
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx512_2hv_double_precision.c
334
if WANT_SINGLE_PRECISION_COMPLEX
335
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/elpa2_kernels_complex_avx512_2hv_single_precision.c
336
endif
337
338
endif

339
# Cuda files
340
.cu.lo:
341
	NVCC="$(NVCC)" libtool --mode=compile --tag=CC $(top_srcdir)/nvcc_wrap $(NVCCFLAGS) $(LDFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/  -c $< -o $@
Andreas Marek's avatar
Andreas Marek committed
342

343
344
345
346
347
# Assembly files
LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
	$(CCASFLAGS)

348
349
350
include generated_headers.am
BUILT_SOURCES = $(generated_headers)

351
# install public headers and Fortran modules files in the include/ dir
352
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
353
nobase_elpa_include_HEADERS = $(wildcard modules/*) $(wildcard elpa/*)
354

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
355
dist_man_MANS = \
356
357
358
359
  man/elpa2_print_kernels.1

if ENABLE_LEGACY
dist_man_MANS += \
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  man/solve_evp_real.3 \
  man/solve_evp_real_1stage_double.3 \
  man/solve_evp_complex.3 \
  man/solve_evp_complex_1stage_double.3 \
  man/solve_evp_real_2stage_double.3 \
  man/solve_evp_complex_2stage_double.3 \
  man/elpa_solve_evp_real_1stage_double.3 \
  man/elpa_solve_evp_complex_1stage_double.3 \
  man/elpa_solve_evp_real_2stage_double.3 \
  man/elpa_solve_evp_complex_2stage_double.3 \
  man/get_elpa_row_col_comms.3 \
  man/get_elpa_communicators.3 \
  man/elpa_mult_at_b_real_double.3 \
  man/elpa_mult_at_b_real_single.3 \
  man/elpa_mult_ah_b_complex_double.3 \
  man/elpa_mult_ah_b_complex_single.3 \
  man/elpa_invert_trm_real_double.3 \
  man/elpa_invert_trm_real_single.3 \
  man/elpa_invert_trm_complex_double.3 \
  man/elpa_invert_trm_complex_single.3 \
  man/elpa_solve_evp_real_double.3 \
  man/elpa_solve_evp_real_single.3 \
  man/elpa_solve_evp_complex_double.3 \
  man/elpa_solve_evp_complex_single.3 \
384
385
386
  man/elpa_tests.1
endif

Andreas Marek's avatar
Andreas Marek committed
387

388
if WANT_SINGLE_PRECISION_REAL
389
if ENABLE_LEGACY
390
391
392
393
394
dist_man_MANS += \
  man/solve_evp_real_1stage_single.3 \
  man/elpa_solve_evp_real_1stage_single.3 \
  man/elpa_solve_evp_real_2stage_single.3 \
  man/solve_evp_real_2stage_single.3
395
endif
396
endif
397
398

if WANT_SINGLE_PRECISION_COMPLEX
399
if ENABLE_LEGACY
400
401
402
403
404
405
dist_man_MANS += \
  man/solve_evp_complex_1stage_single.3 \
  man/elpa_solve_evp_complex_1stage_single.3 \
  man/elpa_solve_evp_complex_2stage_single.3 \
  man/solve_evp_complex_2stage_single.3
endif
406
endif
407

408
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
409

410
411
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
412
pkgconfig_DATA = @PKG_CONFIG_FILE@
413

414
415
# programs
bin_PROGRAMS = \
416
  elpa2_print_kernels@SUFFIX@
417

418
419
420
421
422
if ENABLE_LEGACY
bin_PROGRAMS += \
  elpa_tests@SUFFIX@
endif

423
424
noinst_PROGRAMS =
check_SCRIPTS =
425

Andreas Marek's avatar
Andreas Marek committed
426
build_lib = libelpatest@SUFFIX@.la libelpa@SUFFIX@.la
427
428
429

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
430
libelpatest@SUFFIX@_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)test_modules $(FC_MODINC)modules
431
libelpatest@SUFFIX@_la_SOURCES = \
432
433
434
435
436
437
438
439
440
  test/shared/test_util.F90 \
  test/shared/test_read_input_parameters.F90 \
  test/shared/test_check_correctness.F90 \
  test/shared/test_check_correctness_template.X90 \
  test/shared/test_setup_mpi.F90 \
  test/shared/test_blacs_infrastructure.F90 \
  test/shared/test_prepare_matrix.F90 \
  test/shared/test_prepare_matrix_template.X90 \
  test/shared/test_output_type.F90
Andreas Marek's avatar
Andreas Marek committed
441

442
if HAVE_REDIRECT
443
libelpatest@SUFFIX@_la_SOURCES += \
444
445
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
446
447
448
449
450
endif


elpa2_print_kernels@SUFFIX@_SOURCES = src/elpa2/elpa2_print_kernels.F90
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
451
elpa2_print_kernels@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)modules
452

453
include test_programs.am
454

455
456
if ENABLE_LEGACY
include legacy_test_programs.am
457
458
endif

459
460
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
461
462
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
double_instance@SUFFIX@_LDADD = $(build_lib)
463
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
464

465
466
noinst_PROGRAMS += real_2stage_banded@SUFFIX@
check_SCRIPTS += real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
467
468
real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
469
real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
470

471
472
noinst_PROGRAMS += complex_2stage_banded@SUFFIX@
check_SCRIPTS += complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
473
474
complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
475
complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
476
477

if WANT_SINGLE_PRECISION_REAL
478
479
noinst_PROGRAMS += single_real_2stage_banded@SUFFIX@
check_SCRIPTS += single_real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
480
481
single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
single_real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
482
single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
483
484
485
endif

if WANT_SINGLE_PRECISION_COMPLEX
486
487
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
488
489
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
single_complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
490
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
491
492
endif

493

494
# test scripts
495
MPIEXEC ?= $(MPI_BINARY) -n 2
496
if WITH_MPI
497
  wrapper=$(MPIEXEC)
498
else
499
  wrapper=
500
endif
501
502
TESTS = $(check_SCRIPTS)
%.sh: %
503
504
	@echo $(wrapper) ./$^ '$$TEST_FLAGS' > $@
	@chmod +x $@
505

506
507
include doxygen.am

508
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
509
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
510
  elpa1_test* \
511
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
512
513
  elpa2_real* \
  elpa1_real* \
514
  elpa*.sh \
515
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
516
517
518
519
520
521
522
523
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
524
  double_instance* \
525
  *.i
526
527

clean-local:
528
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
529
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
530
531
532

distclean-local:
	-rm config-f90.h
533
	-rm -rf ./src/elpa2/kernels/.deps
534
535
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
536
	-rmdir ./src/elpa2/kernels/
537
538
	-rmdir ./src
	-rmdir ./test
539
	-rmdir ./m4
540
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
541
	-rmdir .fortran_dependencies/
542

543
EXTRA_DIST = \
544
  elpa/elpa.h \
545
  elpa/elpa_legacy.h \
546
  elpa/elpa_generic.h \
547
548
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
549
  test/Fortran/elpa_print_headers.X90 \
550
  test/Fortran/assert.h \
551
552
553
554
555
556
557
558
  src/elpa1/elpa_reduce_add_vectors.X90 \
  src/elpa1/elpa_transpose_vectors.X90 \
  src/elpa1/elpa1_compute_template.X90 \
  src/elpa1/elpa1_merge_systems_real_template.X90 \
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
  src/elpa1/elpa1_tools_template.X90 \
  src/elpa1/elpa1_trans_ev_template.X90 \
  src/elpa1/elpa1_tridiag_template.X90 \
559
560
561
562
563
  src/elpa2/elpa2_compute_real_template.X90 \
  src/elpa2/elpa2_compute_complex_template.X90 \
  src/elpa2/elpa2_bandred_template.X90 \
  src/elpa2/elpa2_herm_matrix_allreduce_complex_template.X90 \
  src/elpa2/elpa2_symm_matrix_allreduce_real_template.X90 \
564
565
  src/elpa1/elpa1_template.X90 \
  src/elpa2/elpa2_template.X90 \
566
567
568
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
569
570
571
  src/elpa2/elpa2_tridiag_band_template.X90 \
  src/elpa2/elpa2_trans_ev_band_to_full_template.X90 \
  src/elpa2/elpa2_trans_ev_tridi_to_band_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
572
  src/general/precision_macros.h \
573
  src/elpa_index.h \
574
  src/fortran_constants.h \
575
576
577
  src/elpa2/kernels/elpa2_kernels_real_template.X90 \
  src/elpa2/kernels/elpa2_kernels_complex_template.X90 \
  src/elpa2/kernels/elpa2_kernels_simple_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
578
579
580
  src/elpa2/redist_band.X90 \
  src/elpa2/pack_unpack_cpu.X90 \
  src/elpa2/pack_unpack_gpu.X90 \
581
  src/elpa2/compute_hh_trafo.X90 \
582
  src/general/sanity.X90 \
583
584
585
586
  src/elpa1/elpa_cholesky_template.X90 \
  src/elpa1/elpa_invert_trm.X90 \
  src/elpa1/elpa_multiply_a_b.X90 \
  src/elpa1/elpa_solve_tridi_impl_public.X90 \
587
  src/elpa2/qr/elpa_qrkernels_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
588
589
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.Xcu \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.Xcu \
590
  src/GPU/cuUtils_template.Xcu \
591
592
  test/shared/test_prepare_matrix_template.X90 \
  test/shared/test_check_correctness_template.X90 \
593
  nvcc_wrap \
594
595
596
597
598
599
  test_project/Makefile.am \
  test_project/autogen.sh \
  test_project/configure.ac \
  test_project/fdep \
  test_project/src/test_real.F90 \
  test_project/m4 \
600
  elpa.spec
601

602
603
if ENABLE_LEGACY
EXTRA_DIST += \
604
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
605
  src/elpa1/legacy_interface/elpa1_template.X90 \
606
  src/elpa2/legacy_interface/elpa2_template.X90 \
607
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
608
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
609
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
610
611
612
613
614
615
616
617
618
  src/elpa1/legacy_interface/elpa_solve_tridi_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_mult_at_b_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_mult_ah_b_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_invert_trm_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_cholesky_c_interface_template.X90 \
  src/elpa1/legacy_interface/elpa_cholesky_template.X90 \
  src/elpa1/legacy_interface/elpa_invert_trm.X90 \
  src/elpa1/legacy_interface/elpa_multiply_a_b.X90 \
  src/elpa1/legacy_interface/elpa_solve_tridi.X90
619
endif
620

621

622
623
624
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
625

626

627
@FORTRAN_MODULE_DEPS@
628
629
630
631
632

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

633
# $1  Object name
634
define require_elpa_lib
635
$1: libelpa@SUFFIX@.la
636
637

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