Makefile.am 22.7 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
  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
91 92 93
  src/elpa2/kernels/real_template.X90 \
  src/elpa2/kernels/complex_template.X90 \
  src/elpa2/kernels/simple_template.X90 \
94 95 96 97 98 99 100 101 102 103
  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
Andreas Marek's avatar
Andreas Marek committed
157
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2/kernels/real.F90
158 159
endif

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

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

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

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

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

180
if WITH_REAL_SSE_ASSEMBLY_KERNEL
Andreas Marek's avatar
Andreas Marek committed
181
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/asm_x86_64_double_precision.s
182
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
183
  libelpa@SUFFIX@_private_la_SOURCES += src/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
Andreas Marek's avatar
Andreas Marek committed
188
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/asm_x86_64_double_precision.s
189
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
190
  libelpa@SUFFIX@_private_la_SOURCES += src/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
Andreas Marek's avatar
Andreas Marek committed
196
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_double_precision.c
197
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
198
  libelpa@SUFFIX@_private_la_SOURCES += src/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
Andreas Marek's avatar
Andreas Marek committed
203
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_double_precision.c
204
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
205
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_single_precision.c
206
endif
207 208
else
if WITH_REAL_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
209
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_double_precision.c
210
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
211
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_single_precision.c
212
endif
213
endif
214 215
endif

216
if WITH_REAL_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
217
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_2hv_double_precision.c
218
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
219
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_2hv_single_precision.c
220
endif
221 222 223
endif


224
if WITH_REAL_SSE_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
225
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_double_precision.c
226
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
227
  libelpa@SUFFIX@_private_la_SOURCES += src/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
Andreas Marek's avatar
Andreas Marek committed
232
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_double_precision.c
233
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
234
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_single_precision.c
235
endif
236 237
else
if WITH_REAL_AVX2_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
238
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_double_precision.c
239
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
240
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_single_precision.c
241
endif
242
endif
243 244
endif

245
if WITH_REAL_AVX512_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
246
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_4hv_double_precision.c
247
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
248
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_4hv_single_precision.c
249
endif
250 251 252 253
endif



254
if WITH_REAL_SSE_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
255
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_6hv_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_sse_6hv_single_precision.c
258
endif
259 260
endif

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

275
if WITH_REAL_AVX512_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
276
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_double_precision.c
277
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
278
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_single_precision.c
279
endif
280 281 282
endif


283
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
284
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_double_precision.c
285
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
286
  libelpa@SUFFIX@_private_la_SOURCES += src/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
Andreas Marek's avatar
Andreas Marek committed
291
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
292
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
293
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
294
endif
295 296
else
if WITH_COMPLEX_AVX2_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
297
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
298
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
299
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
300
endif
301
endif
302 303
endif

304 305

if WITH_COMPLEX_AVX512_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
306
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_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_avx512_1hv_single_precision.c
309
endif
310 311
endif

312
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
313
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_double_precision.c
314
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
315
  libelpa@SUFFIX@_private_la_SOURCES += src/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
Andreas Marek's avatar
Andreas Marek committed
320
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
321
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
322
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
323
endif
324 325
else
if WITH_COMPLEX_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
326
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
327
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
328
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
329
endif
330
endif
331 332
endif

333
if WITH_COMPLEX_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
334
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_double_precision.c
335
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
336
  libelpa@SUFFIX@_private_la_SOURCES += src/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
nobase_elpa_include_HEADERS = \
  $(wildcard modules/*) \
  elpa/elpa.h \
  elpa/elpa_generic.h \
  elpa/elpa_legacy.h

nobase_nodist_elpa_include_HEADERS = \
361 362 363
  elpa/elpa_constants.h \
  elpa/elpa_generated.h \
  elpa/elpa_generated_legacy.h
364

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
365
dist_man_MANS = \
Andreas Marek's avatar
Andreas Marek committed
366
  man/elpa2_print_kernels.1 \
Andreas Marek's avatar
Andreas Marek committed
367
  man/elpa_init.3 \
Andreas Marek's avatar
Andreas Marek committed
368
  man/elpa_allocate.3 \
Andreas Marek's avatar
Andreas Marek committed
369
  man/elpa_set.3 \
Andreas Marek's avatar
Andreas Marek committed
370
  man/elpa_setup.3 \
371
  man/elpa_eigenvalues.3 \
372
  man/elpa_eigenvectors.3 \
373
  man/elpa_cholesky.3 \
374
  man/elpa_invert_triangular.3 \
375
  man/elpa_solve_tridiagonal.3 \
376
  man/elpa_hermitian_multiply.3 \
Andreas Marek's avatar
Andreas Marek committed
377
  man/elpa_deallocate.3 \
Andreas Marek's avatar
Andreas Marek committed
378
  man/elpa_uninit.3
379 380 381

if ENABLE_LEGACY
dist_man_MANS += \
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
  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 \
406 407 408
  man/elpa_tests.1
endif

Andreas Marek's avatar
Andreas Marek committed
409

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

if WANT_SINGLE_PRECISION_COMPLEX
421
if ENABLE_LEGACY
422 423 424 425 426 427
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
428
endif
429

430
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
431

432 433
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
434
pkgconfig_DATA = @PKG_CONFIG_FILE@
435

436 437
# programs
bin_PROGRAMS = \
438
  elpa2_print_kernels@SUFFIX@
439

440 441 442 443 444
if ENABLE_LEGACY
bin_PROGRAMS += \
  elpa_tests@SUFFIX@
endif

445 446
noinst_PROGRAMS =
check_SCRIPTS =
447

Andreas Marek's avatar
Andreas Marek committed
448
build_lib = libelpatest@SUFFIX@.la libelpa@SUFFIX@.la
449 450 451

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
452
libelpatest@SUFFIX@_la_FCFLAGS = $(AM_FCFLAGS) $(FC_MODOUT)test_modules $(FC_MODINC)modules
453
libelpatest@SUFFIX@_la_SOURCES = \
454 455 456 457 458 459 460 461 462
  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
463

464
if HAVE_REDIRECT
465
libelpatest@SUFFIX@_la_SOURCES += \
466 467
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
468 469 470 471 472
endif


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

475
include test_programs.am
476

477 478
if ENABLE_LEGACY
include legacy_test_programs.am
479 480
endif

481 482
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
483 484
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
double_instance@SUFFIX@_LDADD = $(build_lib)
485
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
486

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

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

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

if WANT_SINGLE_PRECISION_COMPLEX
508 509
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
510 511
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
single_complex_2stage_banded@SUFFIX@_LDADD = $(build_lib)
512
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
513 514
endif

515

516
# test scripts
517
MPIEXEC ?= $(MPI_BINARY) -n 2
518
if WITH_MPI
519
  wrapper=$(MPIEXEC)
520
else
521
  wrapper=
522
endif
523 524
TESTS = $(check_SCRIPTS)
%.sh: %
525 526
	@echo $(wrapper) ./$^ '$$TEST_FLAGS' > $@
	@chmod +x $@
527

528 529
include doxygen.am

530
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
531
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
532
  elpa1_test* \
533
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
534 535
  elpa2_real* \
  elpa1_real* \
536
  elpa*.sh \
537
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
538 539 540 541 542 543 544 545
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
546
  double_instance* \
547
  *.i
548 549

clean-local:
550
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
551
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
552 553 554

distclean-local:
	-rm config-f90.h
555
	-rm -rf ./src/elpa2/kernels/.deps
556 557
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
558
	-rmdir ./src/elpa2/kernels/
559 560
	-rmdir ./src
	-rmdir ./test
561
	-rmdir ./m4
562
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
563
	-rmdir .fortran_dependencies/
564

565
EXTRA_DIST = \
566
  elpa/elpa.h \
567
  elpa/elpa_legacy.h \
568
  elpa/elpa_generic.h \
569 570
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
571
  manual_cpp \
572
  test/Fortran/elpa_print_headers.X90 \
573
  test/Fortran/assert.h \
574 575 576 577 578 579 580 581
  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 \
582 583 584 585 586
  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 \
587 588
  src/elpa1/elpa1_template.X90 \
  src/elpa2/elpa2_template.X90 \
589 590 591
  src/elpa2/qr/qr_utils_template.X90 \
  src/elpa2/qr/elpa_pdlarfb_template.X90 \
  src/elpa2/qr/elpa_pdgeqrf_template.X90 \
592 593 594
  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
595
  src/general/precision_macros.h \
596
  src/elpa_index.h \
597
  src/fortran_constants.h \
Andreas Marek's avatar
Andreas Marek committed
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615
  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
616 617 618
  src/elpa2/redist_band.X90 \
  src/elpa2/pack_unpack_cpu.X90 \
  src/elpa2/pack_unpack_gpu.X90 \
619
  src/elpa2/compute_hh_trafo.X90 \
620
  src/general/sanity.X90 \
621 622 623 624
  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 \
625
  src/elpa2/qr/elpa_qrkernels_template.X90 \
Andreas Marek's avatar
Andreas Marek committed
626 627
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.Xcu \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.Xcu \
628
  src/GPU/cuUtils_template.Xcu \
629 630
  test/shared/test_prepare_matrix_template.X90 \
  test/shared/test_check_correctness_template.X90 \
631
  nvcc_wrap \
632 633 634 635 636 637
  test_project/Makefile.am \
  test_project/autogen.sh \
  test_project/configure.ac \
  test_project/fdep \
  test_project/src/test_real.F90 \
  test_project/m4 \
638
  elpa.spec
639

640 641
if ENABLE_LEGACY
EXTRA_DIST += \
642
  src/elpa1/elpa1_solve_tridi_real_template.X90 \
643
  src/elpa1/legacy_interface/elpa1_template.X90 \
644
  src/elpa2/legacy_interface/elpa2_template.X90 \
645
  src/elpa1/legacy_interface/elpa1_c_interface_template.X90 \
646
  src/elpa2/legacy_interface/elpa2_c_interface_template.X90 \
647
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.X90 \
648 649 650 651 652 653 654 655 656
  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
657
endif
658

659 660 661
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
662

663

664
@FORTRAN_MODULE_DEPS@
665 666 667 668 669

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

670
# $1  Object name
671
define require_elpa_lib
672
$1: libelpa@SUFFIX@.la
673 674

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