Makefile.am 26.8 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_autotune_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
  src/elpa_c_interface.c \
  src/elpa_index.c

67
68
69
70
71
72
73
74
75
76
# 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


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

84
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  src/elpa1/elpa_reduce_add_vectors.F90 \
  src/elpa1/elpa_transpose_vectors.F90 \
  src/elpa1/elpa1_compute_template.F90 \
  src/elpa2/elpa2_compute_real_template.F90 \
  src/elpa2/elpa2_compute_complex_template.F90 \
  src/elpa1/elpa1_template.F90 \
  src/elpa2/elpa2_template.F90 \
  src/elpa2/qr/qr_utils_template.F90 \
  src/elpa2/qr/elpa_pdlarfb_template.F90 \
  src/elpa2/qr/elpa_pdgeqrf_template.F90 \
  src/elpa2/elpa2_bandred_template.F90 \
  src/elpa2/elpa2_symm_matrix_allreduce_real_template.F90 \
  src/elpa2/elpa2_trans_ev_band_to_full_template.F90 \
  src/elpa2/elpa2_tridiag_band_template.F90 \
  src/elpa2/elpa2_trans_ev_tridi_to_band_template.F90 \
  src/elpa2/elpa2_herm_matrix_allreduce_complex_template.F90 \
  src/elpa2/kernels/real_template.F90 \
  src/elpa2/kernels/complex_template.F90 \
  src/elpa2/kernels/simple_template.F90 \
  src/elpa2/pack_unpack_cpu.F90 \
  src/elpa2/pack_unpack_gpu.F90 \
  src/elpa2/compute_hh_trafo.F90 \
  src/elpa2/redist_band.F90 \
  src/general/sanity.F90 \
  src/elpa1/elpa_cholesky_template.F90 \
  src/elpa1/elpa_invert_trm.F90 \
  src/elpa1/elpa_multiply_a_b.F90 \
  src/elpa1/elpa_solve_tridi_impl_public.F90 \
113
114
  src/general/precision_macros.h \
  src/general/precision_kinds.F90
115

116
117
if ENABLE_LEGACY
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES += \
118
119
120
121
122
123
124
125
126
127
128
129
130
131
  src/elpa1/legacy_interface/elpa1_template.F90 \
  src/elpa2/legacy_interface/elpa2_template.F90 \
  src/elpa1/legacy_interface/elpa1_c_interface_template.F90 \
  src/elpa2/legacy_interface/elpa2_c_interface_template.F90 \
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_solve_tridi_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_mult_at_b_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_mult_ah_b_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_invert_trm_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_cholesky_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_cholesky_template.F90 \
  src/elpa1/legacy_interface/elpa_invert_trm.F90 \
  src/elpa1/legacy_interface/elpa_multiply_a_b.F90 \
  src/elpa1/legacy_interface/elpa_solve_tridi.F90
132
endif
133

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

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

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

155
if WITH_GPU_VERSION
Andreas Marek's avatar
Andreas Marek committed
156
  libelpa@SUFFIX@_private_la_SOURCES +=  src/GPU/cudaFunctions.cu src/GPU/cuUtils.cu src/elpa2/GPU/ev_tridi_band_gpu_c_v2.cu
157
  EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES +=   src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.cu src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.cu
158
159
endif

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

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

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

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

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

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

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

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

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

206
207
if WITH_REAL_SPARC64_BLOCK2_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_2hv_double_precision.c
Andreas Marek's avatar
Andreas Marek committed
208
209
210
#if WANT_SINGLE_PRECISION_REAL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_2hv_single_precision.c
#endif
211
212
endif

213
214
if WITH_REAL_VSX_BLOCK2_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_vsx_2hv_double_precision.c
215
216
217
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_vsx_2hv_single_precision.c
endif
218
219
endif

220
if WITH_REAL_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
221
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_double_precision.c
222
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
223
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_single_precision.c
224
endif
225
226
endif

Andreas Marek's avatar
Andreas Marek committed
227
if WITH_REAL_AVX_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
228
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_double_precision.c
229
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
230
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_single_precision.c
231
endif
232
233
else
if WITH_REAL_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
234
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_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_avx-avx2_2hv_single_precision.c
237
endif
238
endif
239
240
endif

241
if WITH_REAL_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
242
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_2hv_double_precision.c
243
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
244
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_2hv_single_precision.c
245
endif
246
247
endif

248
249
if WITH_REAL_SPARC64_BLOCK4_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_4hv_double_precision.c
250
251
252
#if WANT_SINGLE_PRECISION_REAL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_4hv_single_precision.c
#endif
253
endif
254
255
256
257
258
259
260

if WITH_REAL_VSX_BLOCK4_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_vsx_4hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_vsx_4hv_single_precision.c
endif
endif
261

262
if WITH_REAL_SSE_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
263
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_double_precision.c
264
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
265
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_single_precision.c
266
endif
267
268
endif

Andreas Marek's avatar
Andreas Marek committed
269
if WITH_REAL_AVX_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
270
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_double_precision.c
271
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
272
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_single_precision.c
273
endif
274
275
else
if WITH_REAL_AVX2_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
276
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_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_avx-avx2_4hv_single_precision.c
279
endif
280
endif
281
282
endif

283
if WITH_REAL_AVX512_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
284
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_4hv_double_precision.c
285
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
286
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_4hv_single_precision.c
287
endif
288
289
endif

290
291
if WITH_REAL_SPARC64_BLOCK6_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_6hv_double_precision.c
292
293
294
#if WANT_SINGLE_PRECISION_REAL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_6hv_single_precision.c
#endif
295
endif
296

297
298
299
300
301
302
if WITH_REAL_VSX_BLOCK6_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_vsx_6hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_vsx_6hv_single_precision.c
endif
endif
303

304
if WITH_REAL_SSE_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
305
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_6hv_double_precision.c
306
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
307
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_6hv_single_precision.c
308
endif
309
310
endif

Andreas Marek's avatar
Andreas Marek committed
311
if WITH_REAL_AVX_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
312
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_double_precision.c
313
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
314
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_single_precision.c
315
endif
316
317
else
if WITH_REAL_AVX2_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
318
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_double_precision.c
319
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
320
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_single_precision.c
321
endif
322
endif
323
324
endif

325
if WITH_REAL_AVX512_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
326
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_double_precision.c
327
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
328
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_single_precision.c
329
endif
330
331
endif

332
333
334
335
336
337
338
339
340
341
342
343
344
#if WITH_COMPLEX_SPARC64_BLOCK1_KERNEL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sparc64_1hv_double_precision.c
#if WANT_SINGLE_PRECISION_COMPLEX
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sparc64_1hv_single_precision.c
#endif
#endif
#
#if WITH_COMPLEX_VSX_BLOCK1_KERNEL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_vsx_1hv_double_precision.c
#if WANT_SINGLE_PRECISION_COMPLEX
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_vsx_1hv_single_precision.c
#endif
#endif
345

346
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
347
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_double_precision.c
348
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
349
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_single_precision.c
350
endif
351
352
endif

Andreas Marek's avatar
Andreas Marek committed
353
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
354
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
355
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
356
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
357
endif
358
359
else
if WITH_COMPLEX_AVX2_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
360
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
361
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
362
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
363
endif
364
endif
365
366
endif

367
368

if WITH_COMPLEX_AVX512_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
369
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_1hv_double_precision.c
370
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
371
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_1hv_single_precision.c
372
endif
373
374
endif

375
376
377
378
379
380
381
382
383
384
385
386
387
#if WITH_COMPLEX_SPARC64_BLOCK2_KERNEL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sparc64_2hv_double_precision.c
#if WANT_SINGLE_PRECISION_COMPLEX
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sparc64_2hv_single_precision.c
#endif
#endif
#
#if WITH_COMPLEX_VSX_BLOCK2_KERNEL
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_vsx_2hv_double_precision.c
#if WANT_SINGLE_PRECISION_COMPLEX
#  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_vsx_2hv_single_precision.c
#endif
#endif
388

389
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
390
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_double_precision.c
391
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
392
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_single_precision.c
393
endif
394
395
endif

Andreas Marek's avatar
Andreas Marek committed
396
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
397
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
398
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
399
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
400
endif
401
402
else
if WITH_COMPLEX_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
403
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
404
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
405
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
406
endif
407
endif
408
409
endif

410
if WITH_COMPLEX_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
411
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_double_precision.c
412
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
413
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_single_precision.c
414
endif
415
416
endif

417
# Cuda files
418
.cu.lo:
419
	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
420

421
422
423
424
425
# Assembly files
LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
	$(CCASFLAGS)

426
427
428
include generated_headers.am
BUILT_SOURCES = $(generated_headers)

429
# install public headers and Fortran modules files in the include/ dir
430
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
431
432
433
434
435
436
437
nobase_elpa_include_HEADERS = \
  $(wildcard modules/*) \
  elpa/elpa.h \
  elpa/elpa_generic.h \
  elpa/elpa_legacy.h

nobase_nodist_elpa_include_HEADERS = \
438
439
440
  elpa/elpa_constants.h \
  elpa/elpa_generated.h \
  elpa/elpa_generated_legacy.h
441

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
442
dist_man_MANS = \
Andreas Marek's avatar
Andreas Marek committed
443
  man/elpa2_print_kernels.1 \
Andreas Marek's avatar
Andreas Marek committed
444
  man/elpa_init.3 \
Andreas Marek's avatar
Andreas Marek committed
445
  man/elpa_allocate.3 \
Andreas Marek's avatar
Andreas Marek committed
446
  man/elpa_set.3 \
Andreas Marek's avatar
Andreas Marek committed
447
  man/elpa_setup.3 \
448
  man/elpa_eigenvalues.3 \
449
  man/elpa_eigenvectors.3 \
450
  man/elpa_cholesky.3 \
451
  man/elpa_invert_triangular.3 \
452
  man/elpa_solve_tridiagonal.3 \
453
  man/elpa_hermitian_multiply.3 \
Andreas Marek's avatar
Andreas Marek committed
454
  man/elpa_deallocate.3 \
Andreas Marek's avatar
Andreas Marek committed
455
  man/elpa_uninit.3
456
457
458

if ENABLE_LEGACY
dist_man_MANS += \
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
  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 \
482
  man/elpa_solve_evp_complex_single.3
483
484
endif

Andreas Marek's avatar
Andreas Marek committed
485

486
if WANT_SINGLE_PRECISION_REAL
487
if ENABLE_LEGACY
488
489
490
491
492
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
493
endif
494
endif
495
496

if WANT_SINGLE_PRECISION_COMPLEX
497
if ENABLE_LEGACY
498
499
500
501
502
503
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
504
endif
505

506
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
507

508
509
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
510
pkgconfig_DATA = @PKG_CONFIG_FILE@
511

512
513
# programs
bin_PROGRAMS = \
514
  elpa2_print_kernels@SUFFIX@
515

516
517
noinst_PROGRAMS =
check_SCRIPTS =
518

519
520
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
521
522
523

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
524
libelpatest@SUFFIX@_la_FCFLAGS = $(test_program_fcflags)
525
libelpatest@SUFFIX@_la_SOURCES = \
526
527
528
529
530
531
  test/shared/test_util.F90 \
  test/shared/test_read_input_parameters.F90 \
  test/shared/test_check_correctness.F90 \
  test/shared/test_setup_mpi.F90 \
  test/shared/test_blacs_infrastructure.F90 \
  test/shared/test_prepare_matrix.F90 \
532
  test/shared/test_analytic.F90 \
533
  test/shared/test_output_type.F90
Andreas Marek's avatar
Andreas Marek committed
534

535
536
537
538
539
if WITH_SCALAPACK_TESTS
libelpatest@SUFFIX@_la_SOURCES += \
  test/shared/test_scalapack.F90
endif

540
if HAVE_REDIRECT
541
libelpatest@SUFFIX@_la_SOURCES += \
542
543
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
544
545
546
547
endif


elpa2_print_kernels@SUFFIX@_SOURCES = src/elpa2/elpa2_print_kernels.F90
548
elpa2_print_kernels@SUFFIX@_LDADD = libelpa@SUFFIX@.la
549
elpa2_print_kernels@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)modules
550

551
include test_programs.am
552

553
554
if ENABLE_LEGACY
include legacy_test_programs.am
555
556
endif

557
558
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
559
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
560
double_instance@SUFFIX@_LDADD = $(test_program_ldadd)
561
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
562

563
564
noinst_PROGRAMS += real_2stage_banded@SUFFIX@
check_SCRIPTS += real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
565
real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
566
real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
567
real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
568

569
570
noinst_PROGRAMS += complex_2stage_banded@SUFFIX@
check_SCRIPTS += complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
571
complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
572
complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
573
complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
574
575

if WANT_SINGLE_PRECISION_REAL
576
577
noinst_PROGRAMS += single_real_2stage_banded@SUFFIX@
check_SCRIPTS += single_real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
578
single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
579
single_real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
580
single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
581
582
583
endif

if WANT_SINGLE_PRECISION_COMPLEX
584
585
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
586
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
587
single_complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
588
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
589
590
endif

591

592
593
# test scriptsT
TASKS ?= 2
594
if WITH_MPI
595
  wrapper=$(MPI_BINARY) -n $${TASKS:-$(TASKS)}
596
else
597
  wrapper=
598
endif
599
600
TESTS = $(check_SCRIPTS)
%.sh: %
601
	@echo "#!/bin/bash" > $@
602
	@echo '$(wrapper)' ./$^ '$$TEST_FLAGS' >> $@
603
	@chmod +x $@
604

605
606
include doxygen.am

607
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
608
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
609
  elpa1_test* \
610
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
611
612
  elpa2_real* \
  elpa1_real* \
613
  elpa*.sh \
614
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
615
616
617
618
619
620
621
622
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
623
  double_instance* \
624
  *.i
625
626

clean-local:
627
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
628
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
629
630
631

distclean-local:
	-rm config-f90.h
632
	-rm -rf ./src/elpa2/kernels/.deps
633
634
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
635
	-rmdir ./src/elpa2/kernels/
636
637
	-rmdir ./src
	-rmdir ./test
638
	-rmdir ./m4
639
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
640
	-rmdir .fortran_dependencies/
641

642
EXTRA_DIST = \
643
  elpa.spec \
644
  elpa/elpa.h \
645
  elpa/elpa_generic.h \
646
  elpa/elpa_legacy.h \
647
  fdep/fortran_dependencies.mk \
648
  fdep/fortran_dependencies.pl \
649
  manual_cpp \
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
  nvcc_wrap \
  src/GPU/cuUtils_template.cu \
  src/elpa1/elpa1_compute_template.F90 \
  src/elpa1/elpa1_merge_systems_real_template.F90 \
  src/elpa1/elpa1_solve_tridi_real_template.F90 \
  src/elpa1/elpa1_template.F90 \
  src/elpa1/elpa1_tools_template.F90 \
  src/elpa1/elpa1_trans_ev_template.F90 \
  src/elpa1/elpa1_tridiag_template.F90 \
  src/elpa1/elpa_cholesky_template.F90 \
  src/elpa1/elpa_invert_trm.F90 \
  src/elpa1/elpa_multiply_a_b.F90 \
  src/elpa1/elpa_reduce_add_vectors.F90 \
  src/elpa1/elpa_solve_tridi_impl_public.F90 \
  src/elpa1/elpa_transpose_vectors.F90 \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_complex_template.cu \
  src/elpa2/GPU/ev_tridi_band_gpu_c_v2_real_template.cu \
  src/elpa2/compute_hh_trafo.F90 \
  src/elpa2/elpa2_bandred_template.F90 \
  src/elpa2/elpa2_compute_complex_template.F90 \
  src/elpa2/elpa2_compute_real_template.F90 \
  src/elpa2/elpa2_herm_matrix_allreduce_complex_template.F90 \
  src/elpa2/elpa2_symm_matrix_allreduce_real_template.F90 \
  src/elpa2/elpa2_template.F90 \
  src/elpa2/elpa2_trans_ev_band_to_full_template.F90 \
  src/elpa2/elpa2_trans_ev_tridi_to_band_template.F90 \
  src/elpa2/elpa2_tridiag_band_template.F90 \
  src/elpa2/kernels/complex_avx-avx2_1hv_template.c \
  src/elpa2/kernels/complex_avx-avx2_2hv_template.c \
  src/elpa2/kernels/complex_avx512_1hv_template.c \
  src/elpa2/kernels/complex_avx512_2hv_template.c \
  src/elpa2/kernels/complex_sse_1hv_template.c \
  src/elpa2/kernels/complex_sse_2hv_template.c \
  src/elpa2/kernels/complex_template.F90 \
  src/elpa2/kernels/real_avx-avx2_2hv_template.c \
  src/elpa2/kernels/real_avx-avx2_4hv_template.c \
  src/elpa2/kernels/real_avx-avx2_6hv_template.c \
  src/elpa2/kernels/real_avx512_2hv_template.c \
  src/elpa2/kernels/real_avx512_4hv_template.c \
  src/elpa2/kernels/real_avx512_6hv_template.c \
Andreas Marek's avatar
Andreas Marek committed
690
  src/elpa2/kernels/real_vsx_2hv_template.c \
691
692
  src/elpa2/kernels/real_vsx_4hv_template.c \
  src/elpa2/kernels/real_vsx_6hv_template.c \
693
694
695
696
697
698
699
700
701
702
703
704
  src/elpa2/kernels/real_sse_2hv_template.c \
  src/elpa2/kernels/real_sse_4hv_template.c \
  src/elpa2/kernels/real_sse_6hv_template.c \
  src/elpa2/kernels/real_template.F90 \
  src/elpa2/kernels/simple_template.F90 \
  src/elpa2/pack_unpack_cpu.F90 \
  src/elpa2/pack_unpack_gpu.F90 \
  src/elpa2/qr/elpa_pdgeqrf_template.F90 \
  src/elpa2/qr/elpa_pdlarfb_template.F90 \
  src/elpa2/qr/elpa_qrkernels_template.F90 \
  src/elpa2/qr/qr_utils_template.F90 \
  src/elpa2/redist_band.F90 \
705
  src/elpa_index.h \
706
  src/fortran_constants.h \
707
708
  src/general/map_global_to_local.F90 \
  src/general/precision_macros.h \
709
  src/general/precision_kinds.F90 \
710
711
712
713
714
715
  src/general/prow_pcol.F90 \
  src/general/sanity.F90 \
  test/Fortran/assert.h \
  test/Fortran/elpa_print_headers.F90 \
  test/shared/test_check_correctness_template.F90 \
  test/shared/test_prepare_matrix_template.F90 \
Pavel Kus's avatar
Pavel Kus committed
716
  test/shared/test_analytic_template.F90 \
Andreas Marek's avatar
Andreas Marek committed
717
718
719
720
721
722
  test_project_1stage/Makefile.am \
  test_project_1stage/autogen.sh \
  test_project_1stage/configure.ac \
  test_project_1stage/fdep \
  test_project_1stage/m4 \
  test_project_1stage/src/test_real.F90 \
723
724
725
726
727
  test_project_2stage/Makefile.am \
  test_project_2stage/autogen.sh \
  test_project_2stage/configure.ac \
  test_project_2stage/fdep \
  test_project_2stage/m4 \
Andreas Marek's avatar
Andreas Marek committed
728
729
730
731
732
733
734
735
736
737
738
739
740
  test_project_2stage/src/test_real2.F90 \
  test_project_1stage_legacy_api/Makefile.am \
  test_project_1stage_legacy_api/autogen.sh \
  test_project_1stage_legacy_api/configure.ac \
  test_project_1stage_legacy_api/fdep \
  test_project_1stage_legacy_api/m4 \
  test_project_1stage_legacy_api/src/test_real.F90 \
  test_project_2stage_legacy_api/Makefile.am \
  test_project_2stage_legacy_api/autogen.sh \
  test_project_2stage_legacy_api/configure.ac \
  test_project_2stage_legacy_api/fdep \
  test_project_2stage_legacy_api/m4 \
  test_project_2stage_legacy_api/src/test_real2.F90
741

742
743
if ENABLE_LEGACY
EXTRA_DIST += \
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
  src/elpa1/elpa1_solve_tridi_real_template.F90 \
  src/elpa1/legacy_interface/elpa1_template.F90 \
  src/elpa2/legacy_interface/elpa2_template.F90 \
  src/elpa1/legacy_interface/elpa1_c_interface_template.F90 \
  src/elpa2/legacy_interface/elpa2_c_interface_template.F90 \
  src/elpa_driver/legacy_interface/elpa_driver_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_solve_tridi_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_mult_at_b_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_mult_ah_b_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_invert_trm_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_cholesky_c_interface_template.F90 \
  src/elpa1/legacy_interface/elpa_cholesky_template.F90 \
  src/elpa1/legacy_interface/elpa_invert_trm.F90 \
  src/elpa1/legacy_interface/elpa_multiply_a_b.F90 \
  src/elpa1/legacy_interface/elpa_solve_tridi.F90
759
endif
760

Pavel Kus's avatar
Pavel Kus committed
761
762
763
764
765
if WITH_SCALAPACK_TESTS
EXTRA_DIST += \
  test/shared/test_scalapack_template.F90
endif

766
767
768
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
769

770

771
@FORTRAN_MODULE_DEPS@
772
773
774
775
776

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

777
# $1  Object name
778
define require_elpa_lib
779
$1: libelpa@SUFFIX@.la
780
781

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