Makefile.am 27.1 KB
Newer Older
1
## Process this file with automake to produce Makefile.in
2

3
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4

5
6
AM_FCFLAGS = $(SCALAPACK_FCFLAGS) @FC_MODINC@modules @FC_MODOUT@modules
AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
7
8

# libelpa
9
10
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
11

12
libelpa@SUFFIX@_la_SOURCES = src/mod_precision.F90 \
13
14
                             src/mod_mpi.F90 \
			     src/mod_mpi_stubs.F90 \
15
			     src/elpa2_kernels/mod_fortran_interfaces.F90 \
16
                             src/elpa_utilities.F90 \
Andreas Marek's avatar
Andreas Marek committed
17
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
18
19
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
20
21
22
			     src/check_for_gpu.F90 \
			     src/mod_cuda.F90 \
			     src/interface_c_kernel.F90 \
23
			     src/mod_pack_unpack_real.F90 \
24
			     src/mod_pack_unpack_real_gpu.F90 \
25
			     src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
26
27
			     src/mod_compute_hh_trafo_real.F90 \
			     src/mod_compute_hh_trafo_complex.F90 \
28
			     src/mod_pack_unpack_complex.F90 \
29
			     src/aligned_mem.F90 \
30
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
31
32
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
33
                             src/elpa_qr/qr_utils.F90 \
34
                             src/elpa_qr/elpa_qrkernels.F90 \
35
                             src/elpa_qr/elpa_pdlarfb.F90 \
36
                             src/elpa_qr/elpa_pdgeqrf.F90
37
38
39

EXTRA_libelpa@SUFFIX@_la_DEPENDENCIES = src/elpa_reduce_add_vectors.X90 \
					src/elpa_transpose_vectors.X90 \
40
41
42
43
44
					src/redist_band.X90 \
					src/elpa1_compute_complex_template.X90 \
					src/elpa1_compute_real_template.X90 \
					src/elpa2_compute_real_template.X90 \
					src/elpa2_compute_complex_template.X90
45

46
if HAVE_DETAILED_TIMINGS
47
48
49
50
51
52
53
54
55
56
  libelpa@SUFFIX@_la_SOURCES += \
        src/timer.F90 \
        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
57
58
endif

59
if WITH_GPU_VERSION
60
61
  libelpa@SUFFIX@_la_SOURCES +=  src/cudaFunctions.cu src/cuUtils.cu src/ev_tridi_band_gpu_c_v2.cu
  #src/interface_cuda.F90 src/interface_c_kernel.F90 src/ev_tridi_band_gpu_c_v2.cu src/cuUtils.cu
62
  EXTRA_libelpa@SUFFIX@_la_DEPENDENCIES +=   src/ev_tridi_band_gpu_c_v2_complex_template.Xcu src/ev_tridi_band_gpu_c_v2_real_template.Xcu
63
64
endif

65
66
67
68
69
70
71
if !WITH_MPI
  libelpa@SUFFIX@_la_SOURCES += src/mod_time_c.F90
if !HAVE_DETAILED_TIMINGS
  libelpa@SUFFIX@_la_SOURCES += src/ftimings/time.c
endif
endif

Andreas Marek's avatar
Andreas Marek committed
72
if WITH_REAL_GENERIC_KERNEL
73
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.F90
74
75
endif

Andreas Marek's avatar
Andreas Marek committed
76
if WITH_COMPLEX_GENERIC_KERNEL
77
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.F90
78
79
endif

Andreas Marek's avatar
Andreas Marek committed
80
if WITH_REAL_GENERIC_SIMPLE_KERNEL
81
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.F90
82
83
endif

Andreas Marek's avatar
Andreas Marek committed
84
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
85
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.F90
86
87
endif

Andreas Marek's avatar
Andreas Marek committed
88
if WITH_REAL_BGP_KERNEL
89
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
90
91
endif

Andreas Marek's avatar
Andreas Marek committed
92
if WITH_REAL_BGQ_KERNEL
93
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
94
95
endif

96
if WITH_REAL_SSE_ASSEMBLY_KERNEL
97
98
99
100
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64_double_precision.s
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64_single_precision.s
endif
101

Andreas Marek's avatar
Andreas Marek committed
102
else
103
if WITH_COMPLEX_SSE_ASSEMBLY_KERNEL
104
105
106
107
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64_double_precision.s
if WANT_SINGLE_PRECISION_COMPLEX
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64_single_precision.s
endif
108
109
endif
endif
Andreas Marek's avatar
Andreas Marek committed
110

111
if WITH_REAL_SSE_BLOCK2_KERNEL
112
113
114
115
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_2hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_2hv_single_precision.c
endif
116
117
endif

Andreas Marek's avatar
Andreas Marek committed
118
if WITH_REAL_AVX_BLOCK2_KERNEL
119
120
121
122
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_2hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_2hv_single_precision.c
endif
123
124
endif

125
if WITH_REAL_SSE_BLOCK4_KERNEL
126
127
128
129
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_4hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_4hv_single_precision.c
endif
130
131
endif

Andreas Marek's avatar
Andreas Marek committed
132
if WITH_REAL_AVX_BLOCK4_KERNEL
133
134
135
136
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_4hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_4hv_single_precision.c
endif
137
138
endif

139
if WITH_REAL_SSE_BLOCK6_KERNEL
140
141
142
143
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_6hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_6hv_single_precision.c
endif
144
145
endif

Andreas Marek's avatar
Andreas Marek committed
146
if WITH_REAL_AVX_BLOCK6_KERNEL
147
148
149
150
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_6hv_double_precision.c
if WANT_SINGLE_PRECISION_REAL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_6hv_single_precision.c
endif
151
152
endif

153
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
154
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv_double_precision.c
155
if WANT_SINGLE_PRECISION_COMPLEX
156
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv_single_precision.c
157
endif
158
159
endif

Andreas Marek's avatar
Andreas Marek committed
160
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
161
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv_double_precision.c
162
if WANT_SINGLE_PRECISION_COMPLEX
163
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv_single_precision.c
164
endif
165
166
endif

167
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
168
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv_double_precision.c
169
if WANT_SINGLE_PRECISION_COMPLEX
170
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv_single_precision.c
171
endif
172
173
endif

Andreas Marek's avatar
Andreas Marek committed
174
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
175
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv_double_precision.c
176
if WANT_SINGLE_PRECISION_COMPLEX
177
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv_single_precision.c
178
endif
179
180
endif

181
.cu.lo:
182
	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
183

184
# install any .mod files in the include/ dir
185
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
186
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
187
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
188

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
189
dist_man_MANS = \
190
           man/solve_evp_real.3 \
191
	   man/solve_evp_real_1stage_double.3 \
Andreas Marek's avatar
Andreas Marek committed
192
	   man/solve_evp_complex.3 \
193
194
195
	   man/solve_evp_complex_1stage_double.3 \
	   man/solve_evp_real_2stage_double.3 \
	   man/solve_evp_complex_2stage_double.3 \
Andreas Marek's avatar
Andreas Marek committed
196
	   man/get_elpa_row_col_comms.3 \
197
	   man/get_elpa_communicators.3 \
198
	   man/elpa2_print_kernels.1
Andreas Marek's avatar
Andreas Marek committed
199

200
201
if WANT_SINGLE_PRECISION_REAL

202
dist_man_MANS += man/solve_evp_real_1stage_single.3 \
203
204
205
206
207
	    man/solve_evp_real_2stage_single.3
endif

if WANT_SINGLE_PRECISION_COMPLEX

208
dist_man_MANS += man/solve_evp_complex_1stage_single.3 \
209
210
211
	    man/solve_evp_complex_2stage_single.3
endif

212
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
213

214
215
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
216
pkgconfig_DATA = @PKG_CONFIG_FILE@
217

218
219
# programs
bin_PROGRAMS = \
220
  elpa2_print_kernels@SUFFIX@
221
222

noinst_PROGRAMS = \
223
  elpa1_test_real@SUFFIX@ \
224
225
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
226
227
228
229
  elpa2_test_real_default_kernel@SUFFIX@ \
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
230
231
232
233
234
235
236
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@

#if WITH_OPENMP
# nothing yet
#endif

237
if !WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
238
noinst_PROGRAMS += \
239
  elpa1_test_real_with_c@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
240
241
242
243
244
245
  elpa1_test_real_c_version@SUFFIX@ \
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@
endif

246
247
if WANT_SINGLE_PRECISION_COMPLEX
noinst_PROGRAMS += \
248
249
  elpa1_test_complex_single_precision@SUFFIX@ \
  elpa2_test_complex_single_precision@SUFFIX@ \
250
251
252
253
254
255
  elpa2_test_complex_default_kernel_single_precision@SUFFIX@ \
  elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@
endif

if WANT_SINGLE_PRECISION_REAL
noinst_PROGRAMS += \
256
257
  elpa1_test_real_single_precision@SUFFIX@ \
  elpa2_test_real_single_precision@SUFFIX@ \
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
  elpa2_test_real_default_kernel_single_precision@SUFFIX@ \
  elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@
endif

if WITH_GPU_VERSION
noinst_PROGRAMS += \
  elpa2_test_complex_gpu_version@SUFFIX@ \
  elpa2_test_real_gpu_version@SUFFIX@

if WANT_SINGLE_PRECISION_REAL
noinst_PROGRAMS += \
  elpa2_test_real_gpu_version_single_precision@SUFFIX@
endif

if WANT_SINGLE_PRECISION_COMPLEX
noinst_PROGRAMS += \
  elpa2_test_complex_gpu_version_single_precision@SUFFIX@
endif

endif

280
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
281

282
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
283
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
284
285
286
287
else
  redirect_sources =
endif

288
289
290
291
292
shared_sources = test/shared_sources/util.F90 \
		 test/shared_sources/read_input_parameters.F90  \
		 test/shared_sources/check_correctnes.F90 \
		 test/shared_sources/setup_mpi.F90 \
		 test/shared_sources/blacs_infrastructure.F90 \
293
		 test/shared_sources/mod_output_types.F90 \
294
		 test/shared_sources/prepare_matrix.F90
295
296
#test/shared_sources/mod_precision_created.f90: src/mod_precision.f90
#	cp $(top_srcdir)/src/mod_precision.f90 $(top_srcdir)/test/shared_sources/mod_precision_created.f90
Andreas Marek's avatar
Andreas Marek committed
297

Andreas Marek's avatar
Andreas Marek committed
298
if !WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
299
elpa1_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_real_c_version.c $(shared_sources) $(redirect_sources)
Andreas Marek's avatar
Andreas Marek committed
300
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
301
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
302
EXTRA_elpa1_test_real_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
303

304
elpa1_test_real_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa1_real_c.F90 test/shared_sources/mod_from_c.F90 test/shared_sources/call_elpa1.c $(shared_sources) $(redirect_sources)
305
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)
306
EXTRA_elpa1_test_real_with_c@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
307

Andreas Marek's avatar
Andreas Marek committed
308
309
310
elpa1_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_complex_c_version.c $(shared_sources) $(redirect_sources)
elpa1_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
elpa1_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
311
EXTRA_elpa1_test_complex_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
312
313
314
315

elpa2_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_real_c_version.c $(shared_sources) $(redirect_sources)
elpa2_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
316
EXTRA_elpa2_test_real_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
317
318
319
320

elpa2_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_complex_c_version.c $(shared_sources) $(redirect_sources)
elpa2_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
321
EXTRA_elpa2_test_complex_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
322
endif
Andreas Marek's avatar
Andreas Marek committed
323

324
elpa1_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa1_real.F90 $(shared_sources) $(redirect_sources)
325
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
Lorenz Huedepohl's avatar
Typo  
Lorenz Huedepohl committed
326
EXTRA_elpa1_test_real@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
327

328
329
#elpa1_test_complex_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex_with_c.F90 test/shared_sources/mod_from_c.F90 test/shared_sources/call_elpa1.c $(shared_sources) $(redirect_sources)
#elpa1_test_complex_with_c@SUFFIX@_LDADD = $(build_lib)
330
#EXTRA_elpa1_test_complex_with_c@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
331

332
elpa2_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real.F90 $(shared_sources) $(redirect_sources)
333
elpa2_test_real@SUFFIX@_LDFLAGS = -static
334
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
335
EXTRA_elpa2_test_real@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
336

337
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_default_kernel.F90 $(shared_sources) $(redirect_sources)
338
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
339
EXTRA_elpa2_test_real_default_kernel@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
340

341
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_qr_default_kernel.F90 \
342
								   $(shared_sources) $(redirect_sources)
343
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)
344
EXTRA_elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
345

346
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_kernel_by_api.F90 \
347
							 $(shared_sources) $(redirect_sources)
348
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
349
EXTRA_elpa2_test_real_choose_kernel_with_api@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
350

351
elpa1_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa1_complex.F90 $(shared_sources) $(redirect_sources)
352
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
353
EXTRA_elpa1_test_complex@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
354

355
elpa2_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex.F90 $(shared_sources) $(redirect_sources)
356
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
357
EXTRA_elpa2_test_complex@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
358

359
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_default_kernel.F90 $(shared_sources) $(redirect_sources)
360
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
361
EXTRA_elpa2_test_complex_default_kernel@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
362

363
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_kernel_by_api.F90 \
364
							    $(shared_sources) $(redirect_sources)
365
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
366
EXTRA_elpa2_test_complex_choose_kernel_with_api@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
367

368
elpa2_print_kernels@SUFFIX@_SOURCES = src/elpa2_print_kernels.F90 $(shared_sources) $(redirect_sources)
369
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
370

371
if WANT_SINGLE_PRECISION_REAL
372
elpa1_test_real_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa1_real_single.F90 $(shared_sources) $(redirect_sources)
373
elpa1_test_real_single_precision@SUFFIX@_LDADD = $(build_lib)
374
EXTRA_elpa1_test_real_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
375

376
elpa2_test_real_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_single.F90 $(shared_sources) $(redirect_sources)
377
378
elpa2_test_real_single_precision@SUFFIX@_LDFLAGS = -static
elpa2_test_real_single_precision@SUFFIX@_LDADD = $(build_lib)
379
EXTRA_elpa2_test_real_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
380

381
elpa2_test_real_default_kernel_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_default_kernel_single.F90 \
382
								  $(shared_sources) $(redirect_sources)
383
elpa2_test_real_default_kernel_single_precision@SUFFIX@_LDADD = $(build_lib)
384
#elpa2_test_real_default_kernel_single_precision@SUFFIX@_LDFLAGS = -static
385
EXTRA_elpa2_test_real_default_kernel_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
386

387
elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@_SOURCES = \
388
	        test/fortran_test_programs/test_elpa2_real_qr_default_kernel_single.F90 $(shared_sources) $(redirect_sources)
389
elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@_LDADD = $(build_lib)
390
EXTRA_elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
391

392
elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_kernel_by_api_single.F90 $(shared_sources) $(redirect_sources)
393
elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@_LDADD = $(build_lib)
394
EXTRA_elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
395
396
397
endif

if WANT_SINGLE_PRECISION_COMPLEX
398
elpa1_test_complex_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa1_complex_single.F90 $(shared_sources) $(redirect_sources)
399
elpa1_test_complex_single_precision@SUFFIX@_LDADD = $(build_lib)
400
EXTRA_elpa1_test_complex_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
401

402
elpa2_test_complex_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_single.F90 $(shared_sources) $(redirect_sources)
403
elpa2_test_complex_single_precision@SUFFIX@_LDADD = $(build_lib)
404
EXTRA_elpa2_test_complex_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
405

406
elpa2_test_complex_default_kernel_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_default_kernel_single.F90 $(shared_sources) $(redirect_sources)
407
elpa2_test_complex_default_kernel_single_precision@SUFFIX@_LDADD = $(build_lib)
408
#elpa2_test_complex_default_kernel_single_precision@SUFFIX@_LDFLAGS = -static
409
EXTRA_elpa2_test_complex_default_kernel_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
410

411
elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_kernel_by_api_single.F90 $(shared_sources) $(redirect_sources)
412
elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@_LDADD = $(build_lib)
413
EXTRA_elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
414
415
416
endif

if WITH_GPU_VERSION
417
elpa2_test_real_gpu_version@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_gpu.F90 $(shared_sources) $(redirect_sources)
418
elpa2_test_real_gpu_version@SUFFIX@_LDADD = $(build_lib)
419
EXTRA_elpa2_test_real_gpu_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
420

421
elpa2_test_complex_gpu_version@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_gpu.F90 $(shared_sources) $(redirect_sources)
422
elpa2_test_complex_gpu_version@SUFFIX@_LDADD = $(build_lib)
423
EXTRA_elpa2_test_complex_gpu_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
424
425

if WANT_SINGLE_PRECISION_REAL
426
elpa2_test_real_gpu_version_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_real_gpu_single.F90 $(shared_sources) $(redirect_sources)
427
elpa2_test_real_gpu_version_single_precision@SUFFIX@_LDADD = $(build_lib)
428
EXTRA_elpa2_test_real_gpu_version_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
429
430
431
endif

if WANT_SINGLE_PRECISION_COMPLEX
432
elpa2_test_complex_gpu_version_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_elpa2_complex_gpu_single.F90 $(shared_sources) $(redirect_sources)
433
elpa2_test_complex_gpu_version_single_precision@SUFFIX@_LDADD = $(build_lib)
434
EXTRA_elpa2_test_complex_gpu_version_single_precision@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
435
436
437
438
endif

endif

439
check_SCRIPTS = \
440
441
442
443
444
445
446
447
448
  elpa1_test_real@SUFFIX@.sh \
  elpa2_test_real@SUFFIX@.sh \
  elpa2_test_real_default_kernel@SUFFIX@.sh \
  elpa1_test_complex@SUFFIX@.sh \
  elpa2_test_complex@SUFFIX@.sh \
  elpa2_test_complex_default_kernel@SUFFIX@.sh \
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@.sh \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@.sh \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@.sh \
449
  elpa2_print_kernels@SUFFIX@
450

Andreas Marek's avatar
Andreas Marek committed
451
452
if !WITH_OPENMP
check_SCRIPTS += \
453
  elpa1_test_real_with_c@SUFFIX@.sh \
454
455
456
457
  elpa1_test_real_c_version@SUFFIX@.sh \
  elpa1_test_complex_c_version@SUFFIX@.sh \
  elpa2_test_real_c_version@SUFFIX@.sh \
  elpa2_test_complex_c_version@SUFFIX@.sh
Andreas Marek's avatar
Andreas Marek committed
458
459
endif

460
461
if WANT_SINGLE_PRECISION_REAL
check_SCRIPTS += \
462
463
464
465
466
  elpa1_test_real_single_precision@SUFFIX@.sh \
  elpa2_test_real_single_precision@SUFFIX@.sh \
  elpa2_test_real_default_kernel_single_precision@SUFFIX@.sh \
  elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@.sh \
  elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@.sh
467
468
469
470
endif

if WANT_SINGLE_PRECISION_COMPLEX
check_SCRIPTS += \
471
472
  elpa1_test_complex_single_precision@SUFFIX@.sh \
  elpa2_test_complex_single_precision@SUFFIX@.sh \
473
474
  elpa2_test_complex_default_kernel_single_precision@SUFFIX@.sh \
  elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@.sh
475
476
477
478
endif

if WITH_GPU_VERSION
check_SCRIPTS += \
479
480
  elpa2_test_real_gpu_version@SUFFIX@.sh \
  elpa2_test_complex_gpu_version@SUFFIX@.sh
481
482
if WANT_SINGLE_PRECISION_REAL
check_SCRIPTS += \
483
  elpa2_test_real_gpu_version_single_precision@SUFFIX@.sh
484
485
486
endif
if WANT_SINGLE_PRECISION_COMPLEX
check_SCRIPTS += \
487
  elpa2_test_complex_gpu_version_single_precision@SUFFIX@.sh
488
489
490
491
endif

endif

492
# test scripts
493
if WITH_MPI
494
  wrapper="mpiexec -n 2 "
495
else
496
  wrapper=""
497
endif
498
499
500
501
TESTS = $(check_SCRIPTS)
%.sh: %
	echo '$(wrapper)./$^ $$TEST_FLAGS' > $@
	chmod +x $@
502

503

504
## this one does not want any arguments
505
506
507
#elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@.sh:
#	echo '$(wrapper)./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > $@
#	chmod +x $@
508

509
#if WANT_SINGLE_PRECISION_REAL
510
511
#elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@.sh:
#	echo '$(wrapper)./elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@' > $@
512
#	chmod +x $@
513
514
#endif

515
# Preprocessed files (just used for manual inspection)
516
517
mod_precision.i: $(top_srcdir)/src/mod_precision.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/mod_precision.F90 -o $@
Andreas Marek's avatar
Andreas Marek committed
518

Andreas Marek's avatar
Andreas Marek committed
519
elpa2_utilities.i: $(top_srcdir)/src/elpa2_utilities.F90
520
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa2_utilities.F90 -o $@
Andreas Marek's avatar
Andreas Marek committed
521

Andreas Marek's avatar
Andreas Marek committed
522
elpa2.i: $(top_srcdir)/src/elpa2.F90
523
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
524

Andreas Marek's avatar
Andreas Marek committed
525
elpa1.i: $(top_srcdir)/src/elpa1.F90
526
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa1.F90 -o $@
527

528
529
530
elpa1_compute.i: $(top_srcdir)/src/elpa1_compute.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa1_compute.F90 -o $@

531
532
533
elpa2_compute.i: $(top_srcdir)/src/elpa2_compute.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa2_compute.F90 -o $@

534
535
536
elpa2_kernels_real.i: $(top_srcdir)/src/elpa2_kernels/elpa2_kernels_real.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2_kernels/elpa2_kernels_real.F90 -o $@

537
538
539
mod_compute_hh_trafo_real.i: $(top_srcdir)/src/mod_compute_hh_trafo_real.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo_real.F90 -o $@

540
541
542
mod_compute_hh_trafo_complex.i: $(top_srcdir)/src/mod_compute_hh_trafo_complex.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo_complex.F90 -o $@

543
544
test_real.i: $(top_srcdir)/test/fortran_test_programs/test_elpa1_real.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/fortran_test_programs/test_elpa1_real.F90 -o $@
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563

blacs_infrastructure.i: $(top_srcdir)/test/shared_sources/blacs_infrastructure.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/shared_sources/blacs_infrastructure.F90 -o $@

check_correctnes.i: $(top_srcdir)/test/shared_sources/check_correctnes.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/shared_sources/check_correctnes.F90 -o $@

prepare_matrix.i: $(top_srcdir)/test/shared_sources/prepare_matrix.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/shared_sources/prepare_matrix.F90 -o $@

read_input_parameters.i: $(top_srcdir)/test/shared_sources/read_input_parameters.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/shared_sources/read_input_parameters.F90 -o $@

setup_mpi.i: $(top_srcdir)/test/shared_sources/setup_mpi.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/shared_sources/setup_mpi.F90 -o $@

cuUtils.i: $(top_srcdir)/src/cuUtils.cu
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/cuUtils.cu -o $@

564
include doxygen.am
565
566
include generated_headers.am
BUILT_SOURCES = $(generated_headers)
567

568
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
569
  elpa1_test* \
570
  elpa2_test*\
571
  *.i
572
573

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
574
	-rm -rf modules/* .fortran_dependencies/*
575
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
576
577
578

distclean-local:
	-rm config-f90.h
579
580
581
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
582
	-rmdir ./src/elpa2_kernels/
583
584
	-rmdir ./src
	-rmdir ./test
585
	-rmdir ./m4
586
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
587
	-rmdir .fortran_dependencies/
588

589
590
591
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
592
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
593
594
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
595
596
597
598
  src/elpa1_compute_real_template.X90 \
  src/elpa1_compute_complex_template.X90 \
  src/elpa2_compute_real_template.X90 \
  src/elpa2_compute_complex_template.X90 \
599
  src/redist_band.X90 \
600
601
602
603
604
  src/elpa_qr/elpa_qrkernels.X90 \
  src/ev_tridi_band_gpu_c_v2_complex_template.Xcu \
  src/ev_tridi_band_gpu_c_v2_real_template.Xcu \
  src/cuUtils_complex_template.Xcu \
  src/cuUtils_real_template.Xcu \
605
  nvcc_wrap \
606
  elpa.spec
607

608
609
610
611
612
613
# Rules to re-generated the headers
elpa/elpa_generated.h: $(top_srcdir)/src/elpa_c_interface.F90
	grep -h "^ *!c>" $^ | sed 's/^ *!c>//;' > $@ || { rm $@; exit 1; }

test/shared_sources/generated.h: $(wildcard $(top_srcdir)/test/shared_sources/*.F90)
	grep -h "^ *!c>" $^ | sed 's/^ *!c>//;' > $@ || { rm $@; exit 1; }
614

615
616
617
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
618

619

620
@FORTRAN_MODULE_DEPS@
621
622
623
624
625

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

626
# $1  Object name
627
define require_elpa_lib
628
$1: libelpa@SUFFIX@.la
629
630

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