Planned maintenance on Wednesday, 2021-01-20, 17:00-18:00. Expect some interruptions during that time

Makefile.am 23.1 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
  src/elpa.F90 \
  src/elpa_api.F90 \
22
  src/elpa_constants.F90
23 24 25

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

# internal parts
noinst_LTLIBRARIES += libelpa@SUFFIX@_private.la
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
35
libelpa@SUFFIX@_private_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)private_modules $(FC_MODINC)private_modules
36
libelpa@SUFFIX@_private_la_SOURCES = \
37
  src/elpa_impl.F90 \
38
  src/elpa_abstract_impl.F90 \
39 40 41 42 43 44 45 46 47
  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 \
48
  src/elpa1/elpa1_auxiliary.F90 \
49 50 51 52 53 54 55 56 57 58 59 60 61
  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 \
62
  src/helpers/matrix_plot.F90 \
63 64 65
  src/elpa_c_interface.c \
  src/elpa_index.c

66 67 68 69 70 71 72 73 74 75
# elpa_utilities.F90 is private in new API, public in legacy
if ENABLE_LEGACY
libelpa@SUFFIX@_public_la_SOURCES += \
  src/general/elpa_utilities.F90
else
libelpa@SUFFIX@_private_la_SOURCES += \
  src/general/elpa_utilities.F90
endif


76 77
if ENABLE_LEGACY
libelpa@SUFFIX@_private_la_SOURCES += \
78
  src/elpa_driver/legacy_interface/elpa_driver_c_interface.F90 \
79
  src/elpa1/legacy_interface/elpa_1stage_c_interface.F90 \
80
  src/elpa2/legacy_interface/elpa_2stage_c_interface.F90
81
endif
82

83
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
84 85 86 87 88 89 90
  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 \
91 92 93
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
94 95 96 97 98 99
  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 \
Andreas Marek's avatar
Andreas Marek committed
100 101 102
  src/elpa2/kernels/real_template.X90 \
  src/elpa2/kernels/complex_template.X90 \
  src/elpa2/kernels/simple_template.X90 \
103 104 105 106 107 108 109 110 111 112
  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
113

114 115
if ENABLE_LEGACY
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES += \
116
  src/elpa1/legacy_interface/elpa1_template.X90 \
117
  src/elpa2/legacy_interface/elpa2_template.X90 \
118
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
119
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
120
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
121 122 123 124 125 126 127 128 129
  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
130
endif
131

132
if HAVE_DETAILED_TIMINGS
133 134 135 136 137 138 139 140 141
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
142 143 144 145 146 147

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

148
else
149 150
libelpa@SUFFIX@_private_la_SOURCES += \
  src/helpers/timer_dummy.F90
151 152
endif

153
if WITH_GPU_VERSION
Andreas Marek's avatar
Andreas Marek committed
154 155
  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
156 157
endif

158
if !WITH_MPI
159
  libelpa@SUFFIX@_private_la_SOURCES += src/helpers/mod_time_c.F90
160
if !HAVE_DETAILED_TIMINGS
161
  libelpa@SUFFIX@_private_la_SOURCES += src/ftimings/time.c
162 163 164
endif
endif

Andreas Marek's avatar
Andreas Marek committed
165
if WITH_REAL_GENERIC_KERNEL
Andreas Marek's avatar
Andreas Marek committed
166
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2/kernels/real.F90
167 168
endif

Andreas Marek's avatar
Andreas Marek committed
169
if WITH_COMPLEX_GENERIC_KERNEL
Andreas Marek's avatar
Andreas Marek committed
170
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2/kernels/complex.F90
171 172
endif

Andreas Marek's avatar
Andreas Marek committed
173
if WITH_REAL_GENERIC_SIMPLE_KERNEL
Andreas Marek's avatar
Andreas Marek committed
174
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_simple.F90
175 176
endif

Andreas Marek's avatar
Andreas Marek committed
177
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
Andreas Marek's avatar
Andreas Marek committed
178
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_simple.F90
179 180
endif

Andreas Marek's avatar
Andreas Marek committed
181
if WITH_REAL_BGP_KERNEL
Andreas Marek's avatar
Andreas Marek committed
182
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_bgp.f90
183 184
endif

Andreas Marek's avatar
Andreas Marek committed
185
if WITH_REAL_BGQ_KERNEL
Andreas Marek's avatar
Andreas Marek committed
186
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_bgq.f90
187 188
endif

189
if WITH_REAL_SSE_ASSEMBLY_KERNEL
Andreas Marek's avatar
Andreas Marek committed
190
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/asm_x86_64_double_precision.s
191
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
192
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/asm_x86_64_single_precision.s
193
endif
194

Andreas Marek's avatar
Andreas Marek committed
195
else
196
if WITH_COMPLEX_SSE_ASSEMBLY_KERNEL
Andreas Marek's avatar
Andreas Marek committed
197
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/asm_x86_64_double_precision.s
198
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
199
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/asm_x86_64_single_precision.s
200
endif
201 202
endif
endif
Andreas Marek's avatar
Andreas Marek committed
203

204
if WITH_REAL_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
205
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_double_precision.c
206
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
207
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_single_precision.c
208
endif
209 210
endif

Andreas Marek's avatar
Andreas Marek committed
211
if WITH_REAL_AVX_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
212
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_double_precision.c
213
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
214
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_single_precision.c
215
endif
216 217
else
if WITH_REAL_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
218
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_double_precision.c
219
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
220
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_single_precision.c
221
endif
222
endif
223 224
endif

225
if WITH_REAL_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
226
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_2hv_double_precision.c
227
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
228
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_2hv_single_precision.c
229
endif
230 231 232
endif


233
if WITH_REAL_SSE_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
234
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_double_precision.c
235
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
236
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_single_precision.c
237
endif
238 239
endif

Andreas Marek's avatar
Andreas Marek committed
240
if WITH_REAL_AVX_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
241
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_double_precision.c
242
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
243
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_single_precision.c
244
endif
245 246
else
if WITH_REAL_AVX2_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
247
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_double_precision.c
248
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
249
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_single_precision.c
250
endif
251
endif
252 253
endif

254
if WITH_REAL_AVX512_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
255
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_4hv_double_precision.c
256
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
257
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_4hv_single_precision.c
258
endif
259 260 261 262
endif



263
if WITH_REAL_SSE_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
264
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_6hv_double_precision.c
265
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
266
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_6hv_single_precision.c
267
endif
268 269
endif

Andreas Marek's avatar
Andreas Marek committed
270
if WITH_REAL_AVX_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
271
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_double_precision.c
272
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
273
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_single_precision.c
274
endif
275 276
else
if WITH_REAL_AVX2_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
277
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_double_precision.c
278
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
279
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_single_precision.c
280
endif
281
endif
282 283
endif

284
if WITH_REAL_AVX512_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
285
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_double_precision.c
286
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
287
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_single_precision.c
288
endif
289 290 291
endif


292
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
293
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_double_precision.c
294
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
295
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_single_precision.c
296
endif
297 298
endif

Andreas Marek's avatar
Andreas Marek committed
299
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
300
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
301
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
302
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
303
endif
304 305
else
if WITH_COMPLEX_AVX2_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
306
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
307
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
308
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
309
endif
310
endif
311 312
endif

313 314

if WITH_COMPLEX_AVX512_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
315
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_1hv_double_precision.c
316
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
317
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_1hv_single_precision.c
318
endif
319 320
endif

321
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
322
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_double_precision.c
323
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
324
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_single_precision.c
325
endif
326 327
endif

Andreas Marek's avatar
Andreas Marek committed
328
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
329
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
330
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
331
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
332
endif
333 334
else
if WITH_COMPLEX_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
335
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
336
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
337
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
338
endif
339
endif
340 341
endif

342
if WITH_COMPLEX_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
343
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_double_precision.c
344
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
345
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_single_precision.c
346
endif
347 348
endif

349
# Cuda files
350
.cu.lo:
351
	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
352

353 354 355 356 357
# Assembly files
LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
	$(CCASFLAGS)

358 359 360
include generated_headers.am
BUILT_SOURCES = $(generated_headers)

361
# install public headers and Fortran modules files in the include/ dir
362
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
363 364 365 366 367 368 369
nobase_elpa_include_HEADERS = \
  $(wildcard modules/*) \
  elpa/elpa.h \
  elpa/elpa_generic.h \
  elpa/elpa_legacy.h

nobase_nodist_elpa_include_HEADERS = \
370 371 372
  elpa/elpa_constants.h \
  elpa/elpa_generated.h \
  elpa/elpa_generated_legacy.h
373

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
374
dist_man_MANS = \
Andreas Marek's avatar
Andreas Marek committed
375
  man/elpa2_print_kernels.1 \
Andreas Marek's avatar
Andreas Marek committed
376
  man/elpa_init.3 \
Andreas Marek's avatar
Andreas Marek committed
377
  man/elpa_allocate.3 \
Andreas Marek's avatar
Andreas Marek committed
378
  man/elpa_set.3 \
Andreas Marek's avatar
Andreas Marek committed
379
  man/elpa_setup.3 \
380
  man/elpa_eigenvalues.3 \
381
  man/elpa_eigenvectors.3 \
382
  man/elpa_cholesky.3 \
383
  man/elpa_invert_triangular.3 \
384
  man/elpa_solve_tridiagonal.3 \
385
  man/elpa_hermitian_multiply.3 \
Andreas Marek's avatar
Andreas Marek committed
386
  man/elpa_deallocate.3 \
Andreas Marek's avatar
Andreas Marek committed
387
  man/elpa_uninit.3
388 389 390

if ENABLE_LEGACY
dist_man_MANS += \
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
  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 \
414
  man/elpa_solve_evp_complex_single.3
415 416
endif

Andreas Marek's avatar
Andreas Marek committed
417

418
if WANT_SINGLE_PRECISION_REAL
419
if ENABLE_LEGACY
420 421 422 423 424
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
425
endif
426
endif
427 428

if WANT_SINGLE_PRECISION_COMPLEX
429
if ENABLE_LEGACY
430 431 432 433 434 435
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
436
endif
437

438
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
439

440 441
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
442
pkgconfig_DATA = @PKG_CONFIG_FILE@
443

444 445
# programs
bin_PROGRAMS = \
446
  elpa2_print_kernels@SUFFIX@
447

448 449
noinst_PROGRAMS =
check_SCRIPTS =
450

451 452
test_program_ldadd = libelpatest@SUFFIX@.la libelpa@SUFFIX@.la
test_program_fcflags = $(AM_FCFLAGS) $(FC_MODOUT)test_modules $(FC_MODINC)test_modules $(FC_MODINC)modules $(FC_MODINC)private_modules
453 454 455

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
456
libelpatest@SUFFIX@_la_FCFLAGS = $(test_program_fcflags)
457
libelpatest@SUFFIX@_la_SOURCES = \
458 459 460 461 462 463 464 465
  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 \
Pavel Kus's avatar
Pavel Kus committed
466
	test/shared/test_analytic.F90 \
467
  test/shared/test_output_type.F90
Andreas Marek's avatar
Andreas Marek committed
468

469
if HAVE_REDIRECT
470
libelpatest@SUFFIX@_la_SOURCES += \
471 472
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
473 474 475 476
endif


elpa2_print_kernels@SUFFIX@_SOURCES = src/elpa2/elpa2_print_kernels.F90
477
elpa2_print_kernels@SUFFIX@_LDADD = libelpa@SUFFIX@.la
478
elpa2_print_kernels@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)modules
479

480
include test_programs.am
481

482 483
if ENABLE_LEGACY
include legacy_test_programs.am
484 485
endif

486 487
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
488
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
489
double_instance@SUFFIX@_LDADD = $(test_program_ldadd)
490
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
491

492 493
noinst_PROGRAMS += real_2stage_banded@SUFFIX@
check_SCRIPTS += real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
494
real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
495
real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
496
real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
497

498 499
noinst_PROGRAMS += complex_2stage_banded@SUFFIX@
check_SCRIPTS += complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
500
complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
501
complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
502
complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
503 504

if WANT_SINGLE_PRECISION_REAL
505 506
noinst_PROGRAMS += single_real_2stage_banded@SUFFIX@
check_SCRIPTS += single_real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
507
single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
508
single_real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
509
single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
510 511 512
endif

if WANT_SINGLE_PRECISION_COMPLEX
513 514
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
515
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
516
single_complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
517
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
518 519
endif

520

521 522
# test scriptsT
TASKS ?= 2
523
if WITH_MPI
524
  wrapper=$(MPI_BINARY) -n $${TASKS:-$(TASKS)}
525
else
526
  wrapper=
527
endif
528 529
TESTS = $(check_SCRIPTS)
%.sh: %
530
	@echo "#!/bin/bash" > $@
531
	@echo '$(wrapper)' ./$^ '$$TEST_FLAGS' >> $@
532
	@chmod +x $@
533

534 535
include doxygen.am

536
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
537
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
538
  elpa1_test* \
539
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
540 541
  elpa2_real* \
  elpa1_real* \
542
  elpa*.sh \
543
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
544 545 546 547 548 549 550 551
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
552
  double_instance* \
553
  *.i
554 555

clean-local:
556
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
557
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
558 559 560

distclean-local:
	-rm config-f90.h
561
	-rm -rf ./src/elpa2/kernels/.deps
562 563
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
564
	-rmdir ./src/elpa2/kernels/
565 566
	-rmdir ./src
	-rmdir ./test
567
	-rmdir ./m4
568
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
569
	-rmdir .fortran_dependencies/
570

571
EXTRA_DIST = \
572
  elpa/elpa.h \
573
  elpa/elpa_legacy.h \
574
  elpa/elpa_generic.h \
575 576
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
577
  manual_cpp \
578
  test/Fortran/elpa_print_headers.X90 \
579
  test/Fortran/assert.h \
580 581
  src/general/prow_pcol.X90 \
  src/general/map_global_to_local.X90 \
582 583 584 585 586 587 588 589
  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 \
590 591 592 593 594
  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 \
595 596
  src/elpa1/elpa1_template.X90 \
  src/elpa2/elpa2_template.X90 \
597 598 599
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
600 601 602
  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
603
  src/general/precision_macros.h \
604
  src/elpa_index.h \
605
  src/fortran_constants.h \
Andreas Marek's avatar
Andreas Marek committed
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623
  src/elpa2/kernels/real_template.X90 \
  src/elpa2/kernels/complex_template.X90 \
  src/elpa2/kernels/simple_template.X90 \
  src/elpa2/kernels/real_sse_2hv_template.Xc \
  src/elpa2/kernels/real_sse_4hv_template.Xc \
  src/elpa2/kernels/real_sse_6hv_template.Xc \
  src/elpa2/kernels/real_avx-avx2_2hv_template.Xc \
  src/elpa2/kernels/real_avx-avx2_4hv_template.Xc \
  src/elpa2/kernels/real_avx-avx2_6hv_template.Xc \
  src/elpa2/kernels/real_avx512_2hv_template.Xc \
  src/elpa2/kernels/real_avx512_4hv_template.Xc \
  src/elpa2/kernels/real_avx512_6hv_template.Xc \
  src/elpa2/kernels/complex_sse_1hv_template.Xc \
  src/elpa2/kernels/complex_sse_2hv_template.Xc \
  src/elpa2/kernels/complex_avx-avx2_1hv_template.Xc \
  src/elpa2/kernels/complex_avx-avx2_2hv_template.Xc \
  src/elpa2/kernels/complex_avx512_1hv_template.Xc \
  src/elpa2/kernels/complex_avx512_2hv_template.Xc \
Andreas Marek's avatar
Andreas Marek committed
624 625 626
  src/elpa2/redist_band.X90 \
  src/elpa2/pack_unpack_cpu.X90 \
  src/elpa2/pack_unpack_gpu.X90 \
627
  src/elpa2/compute_hh_trafo.X90 \
628
  src/general/sanity.X90 \
629 630 631 632
  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 \
633
  src/elpa2/qr/elpa_qrkernels_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
634 635
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.Xcu \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.Xcu \
636
  src/GPU/cuUtils_template.Xcu \
637 638
  test/shared/test_prepare_matrix_template.X90 \
  test/shared/test_check_correctness_template.X90 \
639
  nvcc_wrap \
640 641 642 643 644 645
  test_project/Makefile.am \
  test_project/autogen.sh \
  test_project/configure.ac \
  test_project/fdep \
  test_project/src/test_real.F90 \
  test_project/m4 \
646
  elpa.spec
647

648 649
if ENABLE_LEGACY
EXTRA_DIST += \
650
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
651
  src/elpa1/legacy_interface/elpa1_template.X90 \
652
  src/elpa2/legacy_interface/elpa2_template.X90 \
653
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
654
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
655
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
656 657 658 659 660 661 662 663 664
  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
665
endif
666

667 668 669
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
670

671

672
@FORTRAN_MODULE_DEPS@
673 674 675 676 677

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

678
# $1  Object name
679
define require_elpa_lib
680
$1: libelpa@SUFFIX@.la
681 682

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