Makefile.am 24.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_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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  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 \
112 113
  src/general/precision_macros.h \
  src/general/precision_kinds.F90
114

115 116
if ENABLE_LEGACY
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES += \
117 118 119 120 121 122 123 124 125 126 127 128 129 130
  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
131
endif
132

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

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

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

154
if WITH_GPU_VERSION
Andreas Marek's avatar
Andreas Marek committed
155
  libelpa@SUFFIX@_private_la_SOURCES +=  src/GPU/cudaFunctions.cu src/GPU/cuUtils.cu src/elpa2/GPU/ev_tridi_band_gpu_c_v2.cu
156
  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
157 158
endif

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

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

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

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

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

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

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

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

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

205 206 207 208 209 210 211
if WITH_REAL_SPARC64_BLOCK2_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_2hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_2hv_single_precision.c
endif
endif

212
if WITH_REAL_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
213
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_double_precision.c
214
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
215
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_2hv_single_precision.c
216
endif
217 218
endif

Andreas Marek's avatar
Andreas Marek committed
219
if WITH_REAL_AVX_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
220
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_double_precision.c
221
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
222
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_2hv_single_precision.c
223
endif
224 225
else
if WITH_REAL_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
226
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_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_avx-avx2_2hv_single_precision.c
229
endif
230
endif
231 232
endif

233
if WITH_REAL_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
234
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_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_avx512_2hv_single_precision.c
237
endif
238 239 240
endif


241 242 243 244 245 246 247
if WITH_REAL_SPARC64_BLOCK4_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_4hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_4hv_single_precision.c
endif
endif

248
if WITH_REAL_SSE_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
249
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_double_precision.c
250
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
251
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_4hv_single_precision.c
252
endif
253 254
endif

Andreas Marek's avatar
Andreas Marek committed
255
if WITH_REAL_AVX_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
256
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_double_precision.c
257
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
258
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_single_precision.c
259
endif
260 261
else
if WITH_REAL_AVX2_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
262
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_4hv_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_4hv_single_precision.c
265
endif
266
endif
267 268
endif

269
if WITH_REAL_AVX512_BLOCK4_KERNEL
Andreas Marek's avatar
Andreas Marek committed
270
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_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_avx512_4hv_single_precision.c
273
endif
274 275
endif

276 277 278 279 280 281
if WITH_REAL_SPARC64_BLOCK6_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_6hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sparc64_6hv_single_precision.c
endif
endif
282 283


284
if WITH_REAL_SSE_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
285
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_sse_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_sse_6hv_single_precision.c
288
endif
289 290
endif

Andreas Marek's avatar
Andreas Marek committed
291
if WITH_REAL_AVX_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
292
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_double_precision.c
293
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
294
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_single_precision.c
295
endif
296 297
else
if WITH_REAL_AVX2_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
298
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_double_precision.c
299
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
300
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx-avx2_6hv_single_precision.c
301
endif
302
endif
303 304
endif

305
if WITH_REAL_AVX512_BLOCK6_KERNEL
Andreas Marek's avatar
Andreas Marek committed
306
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_double_precision.c
307
if WANT_SINGLE_PRECISION_REAL
Andreas Marek's avatar
Andreas Marek committed
308
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/real_avx512_6hv_single_precision.c
309
endif
310 311 312
endif


313 314 315 316 317 318 319
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

320
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
321
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_double_precision.c
322
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
323
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_1hv_single_precision.c
324
endif
325 326
endif

Andreas Marek's avatar
Andreas Marek committed
327
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
328
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_double_precision.c
329
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
330
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_single_precision.c
331
endif
332 333
else
if WITH_COMPLEX_AVX2_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
334
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_1hv_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_avx-avx2_1hv_single_precision.c
337
endif
338
endif
339 340
endif

341 342

if WITH_COMPLEX_AVX512_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
343
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_1hv_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_1hv_single_precision.c
346
endif
347 348
endif

349 350 351 352 353 354 355
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

356
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
357
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_double_precision.c
358
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
359
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_sse_2hv_single_precision.c
360
endif
361 362
endif

Andreas Marek's avatar
Andreas Marek committed
363
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
364
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
365
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
366
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
367
endif
368 369
else
if WITH_COMPLEX_AVX2_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
370
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_double_precision.c
371
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
372
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx-avx2_2hv_single_precision.c
373
endif
374
endif
375 376
endif

377
if WITH_COMPLEX_AVX512_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
378
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_double_precision.c
379
if WANT_SINGLE_PRECISION_COMPLEX
Andreas Marek's avatar
Andreas Marek committed
380
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2/kernels/complex_avx512_2hv_single_precision.c
381
endif
382 383
endif

384
# Cuda files
385
.cu.lo:
386
	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
387

388 389 390 391 392
# Assembly files
LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
	$(CCASFLAGS)

393 394 395
include generated_headers.am
BUILT_SOURCES = $(generated_headers)

396
# install public headers and Fortran modules files in the include/ dir
397
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
398 399 400 401 402 403 404
nobase_elpa_include_HEADERS = \
  $(wildcard modules/*) \
  elpa/elpa.h \
  elpa/elpa_generic.h \
  elpa/elpa_legacy.h

nobase_nodist_elpa_include_HEADERS = \
405 406 407
  elpa/elpa_constants.h \
  elpa/elpa_generated.h \
  elpa/elpa_generated_legacy.h
408

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
409
dist_man_MANS = \
Andreas Marek's avatar
Andreas Marek committed
410
  man/elpa2_print_kernels.1 \
Andreas Marek's avatar
Andreas Marek committed
411
  man/elpa_init.3 \
Andreas Marek's avatar
Andreas Marek committed
412
  man/elpa_allocate.3 \
Andreas Marek's avatar
Andreas Marek committed
413
  man/elpa_set.3 \
Andreas Marek's avatar
Andreas Marek committed
414
  man/elpa_setup.3 \
415
  man/elpa_eigenvalues.3 \
416
  man/elpa_eigenvectors.3 \
417
  man/elpa_cholesky.3 \
418
  man/elpa_invert_triangular.3 \
419
  man/elpa_solve_tridiagonal.3 \
420
  man/elpa_hermitian_multiply.3 \
Andreas Marek's avatar
Andreas Marek committed
421
  man/elpa_deallocate.3 \
Andreas Marek's avatar
Andreas Marek committed
422
  man/elpa_uninit.3
423 424 425

if ENABLE_LEGACY
dist_man_MANS += \
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
  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 \
449
  man/elpa_solve_evp_complex_single.3
450 451
endif

Andreas Marek's avatar
Andreas Marek committed
452

453
if WANT_SINGLE_PRECISION_REAL
454
if ENABLE_LEGACY
455 456 457 458 459
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
460
endif
461
endif
462 463

if WANT_SINGLE_PRECISION_COMPLEX
464
if ENABLE_LEGACY
465 466 467 468 469 470
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
471
endif
472

473
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
474

475 476
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
477
pkgconfig_DATA = @PKG_CONFIG_FILE@
478

479 480
# programs
bin_PROGRAMS = \
481
  elpa2_print_kernels@SUFFIX@
482

483 484
noinst_PROGRAMS =
check_SCRIPTS =
485

486 487
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
488 489 490

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
491
libelpatest@SUFFIX@_la_FCFLAGS = $(test_program_fcflags)
492
libelpatest@SUFFIX@_la_SOURCES = \
493 494 495 496 497 498
  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 \
499
  test/shared/test_analytic.F90 \
500
  test/shared/test_output_type.F90
Andreas Marek's avatar
Andreas Marek committed
501

502 503 504 505 506
if WITH_SCALAPACK_TESTS
libelpatest@SUFFIX@_la_SOURCES += \
  test/shared/test_scalapack.F90
endif

507
if HAVE_REDIRECT
508
libelpatest@SUFFIX@_la_SOURCES += \
509 510
  test/shared/test_redir.c \
  test/shared/test_redirect.F90
511 512 513 514
endif


elpa2_print_kernels@SUFFIX@_SOURCES = src/elpa2/elpa2_print_kernels.F90
515
elpa2_print_kernels@SUFFIX@_LDADD = libelpa@SUFFIX@.la
516
elpa2_print_kernels@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)modules
517

518
include test_programs.am
519

520 521
if ENABLE_LEGACY
include legacy_test_programs.am
522 523
endif

524 525
noinst_PROGRAMS += double_instance@SUFFIX@
check_SCRIPTS += double_instance@SUFFIX@.sh
526
double_instance@SUFFIX@_SOURCES = test/Fortran/elpa2/double_instance.F90
527
double_instance@SUFFIX@_LDADD = $(test_program_ldadd)
528
double_instance@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
529

530 531
noinst_PROGRAMS += real_2stage_banded@SUFFIX@
check_SCRIPTS += real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
532
real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/real_2stage_banded.F90
533
real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
534
real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
535

536 537
noinst_PROGRAMS += complex_2stage_banded@SUFFIX@
check_SCRIPTS += complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
538
complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/complex_2stage_banded.F90
539
complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
540
complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
541 542

if WANT_SINGLE_PRECISION_REAL
543 544
noinst_PROGRAMS += single_real_2stage_banded@SUFFIX@
check_SCRIPTS += single_real_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
545
single_real_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_real_2stage_banded.F90
546
single_real_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
547
single_real_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
548 549 550
endif

if WANT_SINGLE_PRECISION_COMPLEX
551 552
noinst_PROGRAMS += single_complex_2stage_banded@SUFFIX@
check_SCRIPTS += single_complex_2stage_banded@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
553
single_complex_2stage_banded@SUFFIX@_SOURCES = test/Fortran/elpa2/single_complex_2stage_banded.F90
554
single_complex_2stage_banded@SUFFIX@_LDADD = $(test_program_ldadd)
555
single_complex_2stage_banded@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules
556 557
endif

558

559 560
# test scriptsT
TASKS ?= 2
561
if WITH_MPI
562
  wrapper=$(MPI_BINARY) -n $${TASKS:-$(TASKS)}
563
else
564
  wrapper=
565
endif
566 567
TESTS = $(check_SCRIPTS)
%.sh: %
568
	@echo "#!/bin/bash" > $@
569
	@echo '$(wrapper)' ./$^ '$$TEST_FLAGS' >> $@
570
	@chmod +x $@
571

572 573
include doxygen.am

574
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
575
  elpa-generated.h \
Andreas Marek's avatar
Andreas Marek committed
576
  elpa1_test* \
577
  elpa2_test*\
Andreas Marek's avatar
Andreas Marek committed
578 579
  elpa2_real* \
  elpa1_real* \
580
  elpa*.sh \
581
  test*.sh \
Andreas Marek's avatar
Andreas Marek committed
582 583 584 585 586 587 588 589
  legacy_real* \
  legacy_complex* \
  legacy_single_real* \
  legacy_single_complex* \
  single_real* \
  single_complex* \
  real* \
  complex* \
590
  double_instance* \
591
  *.i
592 593

clean-local:
594
	-rm -rf modules/* private_modules/* test_modules/* .fortran_dependencies/*
595
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
596 597 598

distclean-local:
	-rm config-f90.h
599
	-rm -rf ./src/elpa2/kernels/.deps
600 601
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
602
	-rmdir ./src/elpa2/kernels/
603 604
	-rmdir ./src
	-rmdir ./test
605
	-rmdir ./m4
606
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
607
	-rmdir .fortran_dependencies/
608

609
EXTRA_DIST = \
610
  elpa.spec \
611
  elpa/elpa.h \
612
  elpa/elpa_generic.h \
613
  elpa/elpa_legacy.h \
614
  fdep/fortran_dependencies.mk \
615
  fdep/fortran_dependencies.pl \
616
  manual_cpp \
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
  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 \
  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 \
669
  src/elpa_index.h \
670
  src/fortran_constants.h \
671 672
  src/general/map_global_to_local.F90 \
  src/general/precision_macros.h \
673
  src/general/precision_kinds.F90 \
674 675 676 677 678 679
  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
680
  test/shared/test_analytic_template.F90 \
681 682 683 684 685
  test_project/Makefile.am \
  test_project/autogen.sh \
  test_project/configure.ac \
  test_project/fdep \
  test_project/m4 \
686 687 688 689 690 691 692
  test_project/src/test_real.F90 \
  test_project_2stage/Makefile.am \
  test_project_2stage/autogen.sh \
  test_project_2stage/configure.ac \
  test_project_2stage/fdep \
  test_project_2stage/m4 \
  test_project_2stage/src/test_real2.F90
693

694 695
if ENABLE_LEGACY
EXTRA_DIST += \
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710
  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
711
endif
712

Pavel Kus's avatar
Pavel Kus committed
713 714 715 716 717
if WITH_SCALAPACK_TESTS
EXTRA_DIST += \
  test/shared/test_scalapack_template.F90
endif

718 719 720
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
721

722

723
@FORTRAN_MODULE_DEPS@
724 725 726 727 728

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

729
# $1  Object name
730
define require_elpa_lib
731
$1: libelpa@SUFFIX@.la
732 733

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