There is a maintenance of MPCDF Gitlab on Thursday, April 22st 2020, 9:00 am CEST - Expect some service interruptions during this time

Makefile.am 22.3 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 = \
363 364 365 366
  man/elpa2_print_kernels.1

if ENABLE_LEGACY
dist_man_MANS += \
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
  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 \
391 392 393
  man/elpa_tests.1
endif

Andreas Marek's avatar
Andreas Marek committed
394

395
if WANT_SINGLE_PRECISION_REAL
396
if ENABLE_LEGACY
397 398 399 400 401
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
402
endif
403
endif
404 405

if WANT_SINGLE_PRECISION_COMPLEX
406
if ENABLE_LEGACY
407 408 409 410 411 412
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
413
endif
414

415
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
416

417 418
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
419
pkgconfig_DATA = @PKG_CONFIG_FILE@
420

421 422
# programs
bin_PROGRAMS = \
423
  elpa2_print_kernels@SUFFIX@
424

425 426 427 428 429
if ENABLE_LEGACY
bin_PROGRAMS += \
  elpa_tests@SUFFIX@
endif

430 431
noinst_PROGRAMS =
check_SCRIPTS =
432

Andreas Marek's avatar
Andreas Marek committed
433
build_lib = libelpatest@SUFFIX@.la libelpa@SUFFIX@.la
434 435 436

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
437
libelpatest@SUFFIX@_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)test_modules $(FC_MODINC)modules
438
libelpatest@SUFFIX@_la_SOURCES = \
439 440 441 442 443 444 445 446 447
  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
448

449
if HAVE_REDIRECT
450
libelpatest@SUFFIX@_la_SOURCES += \
451 452
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
453 454 455 456 457
endif


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

460
include test_programs.am
461

462 463
if ENABLE_LEGACY
include legacy_test_programs.am
464 465
endif

466 467
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
468 469
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
double_instance@SUFFIX@_LDADD = $(build_lib)
470
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
471

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

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

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

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

500

501
# test scripts
502
MPIEXEC ?= $(MPI_BINARY) -n 2
503
if WITH_MPI
504
  wrapper=$(MPIEXEC)
505
else
506
  wrapper=
507
endif
508 509
TESTS = $(check_SCRIPTS)
%.sh: %
510 511
	@echo $(wrapper) ./$^ '$$TEST_FLAGS' > $@
	@chmod +x $@
512

513 514
include doxygen.am

515
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
516
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
517
  elpa1_test* \
518
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
519 520
  elpa2_real* \
  elpa1_real* \
521
  elpa*.sh \
522
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
523 524 525 526 527 528 529 530
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
531
  double_instance* \
532
  *.i
533 534

clean-local:
535
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
536
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
537 538 539

distclean-local:
	-rm config-f90.h
540
	-rm -rf ./src/elpa2/kernels/.deps
541 542
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
543
	-rmdir ./src/elpa2/kernels/
544 545
	-rmdir ./src
	-rmdir ./test
546
	-rmdir ./m4
547
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
548
	-rmdir .fortran_dependencies/
549

550
EXTRA_DIST = \
551
  elpa/elpa.h \
552
  elpa/elpa_legacy.h \
553
  elpa/elpa_generic.h \
554 555
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
556
  test/Fortran/elpa_print_headers.X90 \
557
  test/Fortran/assert.h \
558 559 560 561 562 563 564 565
  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 \
566 567 568 569 570
  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 \
571 572
  src/elpa1/elpa1_template.X90 \
  src/elpa2/elpa2_template.X90 \
573 574 575
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
576 577 578
  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
579
  src/general/precision_macros.h \
580
  src/elpa_index.h \
581
  src/fortran_constants.h \
582 583 584
  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
585 586 587
  src/elpa2/redist_band.X90 \
  src/elpa2/pack_unpack_cpu.X90 \
  src/elpa2/pack_unpack_gpu.X90 \
588
  src/elpa2/compute_hh_trafo.X90 \
589
  src/general/sanity.X90 \
590 591 592 593
  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 \
594
  src/elpa2/qr/elpa_qrkernels_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
595 596
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.Xcu \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.Xcu \
597
  src/GPU/cuUtils_template.Xcu \
598 599
  test/shared/test_prepare_matrix_template.X90 \
  test/shared/test_check_correctness_template.X90 \
600
  nvcc_wrap \
601 602 603 604 605 606
  test_project/Makefile.am \
  test_project/autogen.sh \
  test_project/configure.ac \
  test_project/fdep \
  test_project/src/test_real.F90 \
  test_project/m4 \
607
  elpa.spec
608

609 610
if ENABLE_LEGACY
EXTRA_DIST += \
611
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
612
  src/elpa1/legacy_interface/elpa1_template.X90 \
613
  src/elpa2/legacy_interface/elpa2_template.X90 \
614
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
615
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
616
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
617 618 619 620 621 622 623 624 625
  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
626
endif
627

628 629 630
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
631

632

633
@FORTRAN_MODULE_DEPS@
634 635 636 637 638

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

639
# $1  Object name
640
define require_elpa_lib
641
$1: libelpa@SUFFIX@.la
642 643

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