Makefile.am 23.4 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
  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 \
63
  src/helpers/matrix_plot.F90 \
64 65 66 67 68
  src/elpa_c_interface.c \
  src/elpa_index.c

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

74
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
75 76 77 78 79 80 81
  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 \
82 83 84
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
  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
104

105 106
if ENABLE_LEGACY
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES += \
107
  src/elpa1/legacy_interface/elpa1_template.X90 \
108
  src/elpa2/legacy_interface/elpa2_template.X90 \
109
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
110
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
111
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
112 113 114 115 116 117 118 119 120
  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
121
endif
122

123
if HAVE_DETAILED_TIMINGS
124 125 126 127 128 129 130 131 132
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
133 134 135 136 137 138

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

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

144
if WITH_GPU_VERSION
Andreas Marek's avatar
Andreas Marek committed
145 146
  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
147 148
endif

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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



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

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

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


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

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

304 305

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

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

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

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

340
# Cuda files
341
.cu.lo:
342
	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
343

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

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

352
# install public headers and Fortran modules files in the include/ dir
353
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
354 355 356 357 358 359 360 361
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
362

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

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

Andreas Marek's avatar
Andreas Marek committed
401

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

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

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

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

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

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

437 438
noinst_PROGRAMS =
check_SCRIPTS =
439

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

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

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


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

467
include test_programs.am
468

469 470
if ENABLE_LEGACY
include legacy_test_programs.am
471 472
endif

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

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

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

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

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

507

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

520 521
include doxygen.am

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

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

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

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

632 633
if ENABLE_LEGACY
EXTRA_DIST += \
634
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
635
  src/elpa1/legacy_interface/elpa1_template.X90 \
636
  src/elpa2/legacy_interface/elpa2_template.X90 \
637
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
638
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
639
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
640 641 642 643 644 645 646 647 648
  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
649
endif
650

651 652 653
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
654

655

656
@FORTRAN_MODULE_DEPS@
657 658 659 660 661

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

662
# $1  Object name
663
define require_elpa_lib
664
$1: libelpa@SUFFIX@.la
665 666

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