Makefile.am 23 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
354
355
356
357
358
359
360
nobase_elpa_include_HEADERS = \
  $(wildcard modules/*) \
  elpa/elpa.h \
  elpa/elpa_generic.h \
  elpa/elpa_legacy.h

nobase_nodist_elpa_include_HEADERS = \
  elpa/elpa_constants.h
361

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
362
dist_man_MANS = \
Andreas Marek's avatar
Andreas Marek committed
363
  man/elpa2_print_kernels.1 \
Andreas Marek's avatar
Andreas Marek committed
364
  man/elpa_init.3 \
Andreas Marek's avatar
Andreas Marek committed
365
  man/elpa_allocate.3 \
Andreas Marek's avatar
Andreas Marek committed
366
  man/elpa_set.3 \
Andreas Marek's avatar
Andreas Marek committed
367
  man/elpa_setup.3 \
Andreas Marek's avatar
Andreas Marek committed
368
  man/elpa_deallocate.3 \
Andreas Marek's avatar
Andreas Marek committed
369
  man/elpa_uninit.3
370
371
372

if ENABLE_LEGACY
dist_man_MANS += \
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
  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 \
397
398
399
  man/elpa_tests.1
endif

Andreas Marek's avatar
Andreas Marek committed
400

401
if WANT_SINGLE_PRECISION_REAL
402
if ENABLE_LEGACY
403
404
405
406
407
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
408
endif
409
endif
410
411

if WANT_SINGLE_PRECISION_COMPLEX
412
if ENABLE_LEGACY
413
414
415
416
417
418
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
419
endif
420

421
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
422

423
424
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
425
pkgconfig_DATA = @PKG_CONFIG_FILE@
426

427
428
# programs
bin_PROGRAMS = \
429
  elpa2_print_kernels@SUFFIX@
430

431
432
433
434
435
if ENABLE_LEGACY
bin_PROGRAMS += \
  elpa_tests@SUFFIX@
endif

436
437
noinst_PROGRAMS =
check_SCRIPTS =
438

Andreas Marek's avatar
Andreas Marek committed
439
build_lib = libelpatest@SUFFIX@.la libelpa@SUFFIX@.la
440
441
442

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
443
libelpatest@SUFFIX@_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)test_modules $(FC_MODINC)modules
444
libelpatest@SUFFIX@_la_SOURCES = \
445
446
447
448
449
450
451
452
453
  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
454

455
if HAVE_REDIRECT
456
libelpatest@SUFFIX@_la_SOURCES += \
457
458
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
459
460
461
462
463
endif


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

466
include test_programs.am
467

468
469
if ENABLE_LEGACY
include legacy_test_programs.am
470
471
endif

472
473
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
474
475
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
double_instance@SUFFIX@_LDADD = $(build_lib)
476
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
477

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

484
485
noinst_PROGRAMS += complex_2stage_banded@SUFFIX@
check_SCRIPTS += complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
486
487
complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
488
complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
489
490

if WANT_SINGLE_PRECISION_REAL
491
492
noinst_PROGRAMS += single_real_2stage_banded@SUFFIX@
check_SCRIPTS += single_real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
493
494
single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
single_real_2stage_banded@SUFFIX@_LDADD = $(build_lib)
495
single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
496
497
498
endif

if WANT_SINGLE_PRECISION_COMPLEX
499
500
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
501
502
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
single_complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
503
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
504
505
endif

506

507
# test scripts
508
MPIEXEC ?= $(MPI_BINARY) -n 2
509
if WITH_MPI
510
  wrapper=$(MPIEXEC)
511
else
512
  wrapper=
513
endif
514
515
TESTS = $(check_SCRIPTS)
%.sh: %
516
517
	@echo $(wrapper) ./$^ '$$TEST_FLAGS' > $@
	@chmod +x $@
518

519
520
include doxygen.am

521
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
522
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
523
  elpa1_test* \
524
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
525
526
  elpa2_real* \
  elpa1_real* \
527
  elpa*.sh \
528
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
529
530
531
532
533
534
535
536
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
537
  double_instance* \
538
  *.i
539
540

clean-local:
541
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
542
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
543
544
545

distclean-local:
	-rm config-f90.h
546
	-rm -rf ./src/elpa2/kernels/.deps
547
548
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
549
	-rmdir ./src/elpa2/kernels/
550
551
	-rmdir ./src
	-rmdir ./test
552
	-rmdir ./m4
553
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
554
	-rmdir .fortran_dependencies/
555

556
EXTRA_DIST = \
557
  elpa/elpa.h \
558
  elpa/elpa_legacy.h \
559
  elpa/elpa_generic.h \
560
561
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
562
  manual_cpp \
563
  test/Fortran/elpa_print_headers.X90 \
564
  test/Fortran/assert.h \
565
566
567
568
569
570
571
572
  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 \
573
574
575
576
577
  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 \
578
579
  src/elpa1/elpa1_template.X90 \
  src/elpa2/elpa2_template.X90 \
580
581
582
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
583
584
585
  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
586
  src/general/precision_macros.h \
587
  src/elpa_index.h \
588
  src/fortran_constants.h \
589
590
591
  src/elpa2/kernels/elpa2_kernels_real_template.X90 \
  src/elpa2/kernels/elpa2_kernels_complex_template.X90 \
  src/elpa2/kernels/elpa2_kernels_simple_template.X90 \
592
  src/elpa2/kernels/elpa2_kernels_real_sse_2hv_template.Xc \
593
  src/elpa2/kernels/elpa2_kernels_real_sse_4hv_template.Xc \
594
  src/elpa2/kernels/elpa2_kernels_real_sse_6hv_template.Xc \
595
  src/elpa2/kernels/elpa2_kernels_real_avx-avx2_2hv_template.Xc \
596
  src/elpa2/kernels/elpa2_kernels_real_avx-avx2_4hv_template.Xc \
597
  src/elpa2/kernels/elpa2_kernels_real_avx-avx2_6hv_template.Xc \
598
  src/elpa2/kernels/elpa2_kernels_complex_sse_1hv_template.Xc \
599
  src/elpa2/kernels/elpa2_kernels_complex_sse_2hv_template.Xc \
600
  src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_1hv_template.Xc \
601
  src/elpa2/kernels/elpa2_kernels_complex_avx-avx2_2hv_template.Xc \
Andreas Marek's avatar
Andreas Marek committed
602
603
604
  src/elpa2/redist_band.X90 \
  src/elpa2/pack_unpack_cpu.X90 \
  src/elpa2/pack_unpack_gpu.X90 \
605
  src/elpa2/compute_hh_trafo.X90 \
606
  src/general/sanity.X90 \
607
608
609
610
  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 \
611
  src/elpa2/qr/elpa_qrkernels_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
612
613
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.Xcu \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.Xcu \
614
  src/GPU/cuUtils_template.Xcu \
615
616
  test/shared/test_prepare_matrix_template.X90 \
  test/shared/test_check_correctness_template.X90 \
617
  nvcc_wrap \
618
619
620
621
622
623
  test_project/Makefile.am \
  test_project/autogen.sh \
  test_project/configure.ac \
  test_project/fdep \
  test_project/src/test_real.F90 \
  test_project/m4 \
624
  elpa.spec
625

626
627
if ENABLE_LEGACY
EXTRA_DIST += \
628
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
629
  src/elpa1/legacy_interface/elpa1_template.X90 \
630
  src/elpa2/legacy_interface/elpa2_template.X90 \
631
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
632
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
633
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
634
635
636
637
638
639
640
641
642
  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
643
endif
644

645
646
647
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
648

649

650
@FORTRAN_MODULE_DEPS@
651
652
653
654
655

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

656
# $1  Object name
657
define require_elpa_lib
658
$1: libelpa@SUFFIX@.la
659
660

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