Makefile.am 32.9 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/elpa_utilities.F90 \
Andreas Marek's avatar
Andreas Marek committed
16
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
17
18
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
19
20
21
			     src/check_for_gpu.F90 \
			     src/mod_cuda.F90 \
			     src/interface_c_kernel.F90 \
22
			     src/mod_pack_unpack_real.F90 \
23
			     src/mod_pack_unpack_real_gpu.F90 \
24
			     src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
25
26
			     src/mod_compute_hh_trafo_real.F90 \
			     src/mod_compute_hh_trafo_complex.F90 \
27
			     src/mod_pack_unpack_complex.F90 \
28
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
29
30
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
31
                             src/elpa_qr/qr_utils.F90 \
32
                             src/elpa_qr/elpa_qrkernels.F90 \
33
                             src/elpa_qr/elpa_pdlarfb.F90 \
34
                             src/elpa_qr/elpa_pdgeqrf.F90
35
36
37
38
39
40
41
42
43
44
45
46
if HAVE_DETAILED_TIMINGS
  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
endif

47
if WITH_GPU_VERSION
48
49
  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
50
51
endif

52
53
54
55
56
57
58
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
59
if WITH_REAL_GENERIC_KERNEL
60
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.F90
61
62
endif

Andreas Marek's avatar
Andreas Marek committed
63
if WITH_COMPLEX_GENERIC_KERNEL
64
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.F90
65
66
endif

Andreas Marek's avatar
Andreas Marek committed
67
if WITH_REAL_GENERIC_SIMPLE_KERNEL
68
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.F90
69
70
endif

Andreas Marek's avatar
Andreas Marek committed
71
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
72
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.F90
73
74
endif

Andreas Marek's avatar
Andreas Marek committed
75
if WITH_REAL_BGP_KERNEL
76
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
77
78
endif

Andreas Marek's avatar
Andreas Marek committed
79
if WITH_REAL_BGQ_KERNEL
80
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
81
82
endif

Andreas Marek's avatar
Andreas Marek committed
83
if WITH_REAL_SSE_KERNEL
84
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
85
86
else
if WITH_COMPLEX_SSE_KERNEL
87
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
88
89
endif
endif
Andreas Marek's avatar
Andreas Marek committed
90
91

if WITH_REAL_AVX_BLOCK2_KERNEL
92
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
93
94
endif

Andreas Marek's avatar
Andreas Marek committed
95
if WITH_REAL_AVX_BLOCK4_KERNEL
96
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
97
98
endif

Andreas Marek's avatar
Andreas Marek committed
99
if WITH_REAL_AVX_BLOCK6_KERNEL
100
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
101
102
endif

Andreas Marek's avatar
Andreas Marek committed
103
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
104
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
105
106
endif

Andreas Marek's avatar
Andreas Marek committed
107
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
108
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
109
110
endif

111
.cu.lo:
112
	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
113

114
# install any .mod files in the include/ dir
115
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
116
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
117
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
118

Andreas Marek's avatar
Andreas Marek committed
119
man_MANS = man/solve_evp_real.3 \
120
	   man/solve_evp_real_1stage_double.3 \
Andreas Marek's avatar
Andreas Marek committed
121
	   man/solve_evp_complex.3 \
122
123
124
	   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
125
	   man/get_elpa_row_col_comms.3 \
126
	   man/get_elpa_communicators.3 \
Andreas Marek's avatar
Andreas Marek committed
127
128
	   man/print_available_elpa2_kernels.1

129
130
131
132
133
134
135
136
137
138
139
140
141
if WANT_SINGLE_PRECISION_REAL

man_MANS += man/solve_evp_real_1stage_single.3 \
	    man/solve_evp_real_2stage_single.3
endif

if WANT_SINGLE_PRECISION_COMPLEX

man_MANS += man/solve_evp_complex_1stage_single.3 \
	    man/solve_evp_complex_2stage_single.3
endif


142
# other files to distribute
143
filesdir = $(docdir)/examples
144
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
145
146
147
148
149
150
151
152
153
154
155
  test/fortran_test_programs/read_real.F90 \
  test/fortran_test_programs/test_complex2.F90 \
  test/fortran_test_programs/test_complex2_default_kernel.F90 \
  test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90 \
  test/fortran_test_programs/test_complex.F90 \
  test/fortran_test_programs/test_real2.F90 \
  test/fortran_test_programs/test_real2_default_kernel.F90 \
  test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 \
  test/fortran_test_programs/test_real2_choose_kernel_with_api.F90 \
  test/fortran_test_programs/test_real.F90 \
  test/fortran_test_programs/test_real_with_c.F90 \
156
  src/print_available_elpa2_kernels.F90
157

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
if WANT_SINGLE_PRECISION_COMPLEX
dist_files_DATA += test/fortran_test_programs/test_complex2_single_precision.F90 \
                   test/fortran_test_programs/test_complex2_default_kernel_single_precision.F90 \
                   test/fortran_test_programs/test_complex2_choose_kernel_with_api_single_precision.F90 \
                   test/fortran_test_programs/test_complex_single_precision.F90
endif

if WANT_SINGLE_PRECISION_REAL
dist_files_DATA += test/fortran_test_programs/test_real2_single_precision.F90 \
                   test/fortran_test_programs/test_real2_default_kernel_single_precision.F90 \
                   test/fortran_test_programs/test_real2_default_kernel_qr_decomposition_single_precision.F90 \
                   test/fortran_test_programs/test_real2_choose_kernel_with_api_single_precision.F90 \
                   test/fortran_test_programs/test_real_single_precision.F90
endif

if WITH_GPU_VERSION
dist_files_DATA += test/fortran_test_programs/test_real2_gpu_version.F90 \
                   test/fortran_test_programs/test_complex2_gpu_version.F90

if WANT_SINGLE_PRECISION_REAL
dist_files_DATA += test/fortran_test_programs/test_real2_gpu_version_single_precision.F90
endif

if WANT_SINGLE_PRECISION_COMPLEX
dist_files_DATA += test/fortran_test_programs/test_complex2_gpu_version_single_precision.F90
endif

endif
186
187
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

188
189
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
190
pkgconfig_DATA = @PKG_CONFIG_FILE@
191

192
193
# programs
bin_PROGRAMS = \
194
195
196
197
198
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
199

200
201
202
203
204
205
206
207
208
209
210
211
if WANT_SINGLE_PRECISION_COMPLEX
bin_PROGRAMS += \
  elpa1_test_complex_single_precision@SUFFIX@ \
  elpa2_test_complex_single_precision@SUFFIX@
endif

if WANT_SINGLE_PRECISION_REAL
bin_PROGRAMS += \
  elpa1_test_real_single_precision@SUFFIX@ \
  elpa2_test_real_single_precision@SUFFIX@
endif

212
noinst_PROGRAMS = \
213
  elpa2_test_real_default_kernel@SUFFIX@ \
214
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
215
216
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
217
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
218
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
219
220
221
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
222
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
223

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
if WANT_SINGLE_PRECISION_COMPLEX
noinst_PROGRAMS += \
  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 += \
  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

254

255
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
256

257
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
258
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
259
260
261
262
else
  redirect_sources =
endif

263
264
265
266
267
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 \
268
		 test/shared_sources/mod_output_types.F90 \
269
		 test/shared_sources/prepare_matrix.F90
Andreas Marek's avatar
Andreas Marek committed
270

Andreas Marek's avatar
Andreas Marek committed
271
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
272
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
273
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
274

Andreas Marek's avatar
Andreas Marek committed
275
276
277
278
279
280
281
282
283
284
285
286
287
288
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)

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)

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)


elpa1_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real.F90 $(shared_sources) $(redirect_sources)
289
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
290

Andreas Marek's avatar
Andreas Marek committed
291
elpa1_test_real_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_real_with_c.F90 test/shared_sources/mod_from_c.F90 test/shared_sources/call_elpa1.c $(shared_sources) $(redirect_sources)
Andreas Marek's avatar
Andreas Marek committed
292
293
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

294
295
#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)
Andreas Marek's avatar
Andreas Marek committed
296
297

elpa2_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2.F90 $(shared_sources) $(redirect_sources)
298
elpa2_test_real@SUFFIX@_LDFLAGS = -static
299
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
300

Andreas Marek's avatar
Andreas Marek committed
301
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel.F90 $(shared_sources) $(redirect_sources)
302
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
303

Andreas Marek's avatar
Andreas Marek committed
304
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
305
306
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

Andreas Marek's avatar
Andreas Marek committed
307
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_choose_kernel_with_api.F90 $(shared_sources) $(redirect_sources)
308
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
309

Andreas Marek's avatar
Andreas Marek committed
310
elpa1_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex.F90 $(shared_sources) $(redirect_sources)
311
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
312

Andreas Marek's avatar
Andreas Marek committed
313
elpa2_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2.F90 $(shared_sources) $(redirect_sources)
314
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
315

Andreas Marek's avatar
Andreas Marek committed
316
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_default_kernel.F90 $(shared_sources) $(redirect_sources)
317
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
318

Andreas Marek's avatar
Andreas Marek committed
319
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90 $(shared_sources) $(redirect_sources)
320
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
321

Andreas Marek's avatar
Andreas Marek committed
322
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 $(shared_sources) $(redirect_sources)
323
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
324

325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
if WANT_SINGLE_PRECISION_REAL
elpa1_test_real_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_real_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa1_test_real_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_real_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_real_single_precision@SUFFIX@_LDFLAGS = -static
elpa2_test_real_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_real_default_kernel_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_real_default_kernel_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_choose_kernel_with_api_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@_LDADD = $(build_lib)
endif

if WANT_SINGLE_PRECISION_COMPLEX
elpa1_test_complex_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa1_test_complex_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_complex_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_complex_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_complex_default_kernel_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_default_kernel_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_complex_default_kernel_single_precision@SUFFIX@_LDADD = $(build_lib)

elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_choose_kernel_with_api_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@_LDADD = $(build_lib)
endif

if WITH_GPU_VERSION
elpa2_test_real_gpu_version@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_gpu_version.F90 $(shared_sources) $(redirect_sources)
elpa2_test_real_gpu_version@SUFFIX@_LDADD = $(build_lib)

elpa2_test_complex_gpu_version@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_gpu_version.F90 $(shared_sources) $(redirect_sources)
elpa2_test_complex_gpu_version@SUFFIX@_LDADD = $(build_lib)

if WANT_SINGLE_PRECISION_REAL
elpa2_test_real_gpu_version_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_gpu_version_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_real_gpu_version_single_precision@SUFFIX@_LDADD = $(build_lib)
endif

if WANT_SINGLE_PRECISION_COMPLEX
elpa2_test_complex_gpu_version_single_precision@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_gpu_version_single_precision.F90 $(shared_sources) $(redirect_sources)
elpa2_test_complex_gpu_version_single_precision@SUFFIX@_LDADD = $(build_lib)
endif

endif

376
check_SCRIPTS = \
377
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
378
379
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
Andreas Marek's avatar
Andreas Marek committed
380
381
382
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
383
384
385
386
387
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
388
  elpa2_test_real_default_kernel_qr_decomposition.sh \
389
390
391
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
392

393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
if WANT_SINGLE_PRECISION_REAL
check_SCRIPTS += \
  elpa1_test_real_single_precision.sh \
  elpa2_test_real_single_precision.sh \
  elpa2_test_real_default_kernel_single_precision.sh \
  elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh \
  elpa2_test_real_choose_kernel_with_api_single_precision.sh
endif

if WANT_SINGLE_PRECISION_COMPLEX
check_SCRIPTS += \
  elpa1_test_complex_single_precision.sh \
  elpa2_test_complex_single_precision.sh \
  elpa2_test_complex_default_kernel_single_precision.sh
endif

if WITH_GPU_VERSION
check_SCRIPTS += \
  elpa2_test_real_gpu_version.sh \
  elpa2_test_complex_gpu_version.sh
if WANT_SINGLE_PRECISION_REAL
check_SCRIPTS += \
  elpa2_test_real_gpu_version_single_precision.sh
endif
if WANT_SINGLE_PRECISION_COMPLEX
check_SCRIPTS += \
  elpa2_test_complex_gpu_version_single_precision.sh
endif

endif

424
TESTS = $(check_SCRIPTS)
425
if WITH_MPI
426
elpa1_test_real.sh:
427
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
428
	chmod +x elpa1_test_real.sh
429

Andreas Marek's avatar
Andreas Marek committed
430
431
432
433
elpa1_test_real_with_c.sh:
	echo 'mpiexec -n 2 ./elpa1_test_real_with_c@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_with_c.sh
	chmod +x elpa1_test_real_with_c.sh

Andreas Marek's avatar
Andreas Marek committed
434
435
436
437
438
439
440
441
elpa2_test_real_c_version.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_c_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_c_version.sh
	chmod +x elpa2_test_real_c_version.sh

elpa2_test_complex_c_version.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_c_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_c_version.sh
	chmod +x elpa2_test_complex_c_version.sh

Andreas Marek's avatar
Andreas Marek committed
442
443
444
445
elpa1_test_real_c_version.sh:
	echo 'mpiexec -n 2 ./elpa1_test_real_c_version@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_c_version.sh
	chmod +x elpa1_test_real_c_version.sh

Andreas Marek's avatar
Andreas Marek committed
446
447
448
elpa1_test_complex_c_version.sh:
	echo 'mpiexec -n 2 ./elpa1_test_complex_c_version@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex_c_version.sh
	chmod +x elpa1_test_complex_c_version.sh
449

450
elpa2_test_real.sh:
451
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
452
	chmod +x elpa2_test_real.sh
453

454
elpa2_test_real_default_kernel.sh:
455
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
456
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
457

458
elpa2_test_real_default_kernel_qr_decomposition.sh:
459
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
460
461
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

462
elpa2_test_real_choose_kernel_with_api.sh:
463
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
464
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
465

466
elpa1_test_complex.sh:
467
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
468
	chmod +x elpa1_test_complex.sh
469

470
elpa2_test_complex.sh:
471
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
472
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
473

474
elpa2_test_complex_default_kernel.sh:
475
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
476
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
477

478
elpa2_test_complex_choose_kernel_with_api.sh:
479
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
480
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
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
669
670
671

if WANT_SINGLE_PRECISION_REAL
elpa1_test_real_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa1_test_real_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_single_precision.sh
	chmod +x elpa1_test_real_single_precision.sh

elpa2_test_real_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_single_precision.sh
	chmod +x elpa2_test_real_single_precision.sh

elpa2_test_real_default_kernel_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel_single_precision.sh
	chmod +x elpa2_test_real_default_kernel_single_precision.sh

elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh
	chmod +x elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh

elpa2_test_real_choose_kernel_with_api_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api_single_precision.sh
	chmod +x elpa2_test_real_choose_kernel_with_api_single_precision.sh
endif

if WANT_SINGLE_PRECISION_COMPLEX
elpa1_test_complex_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa1_test_complex_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex_single_precision.sh
	chmod +x elpa1_test_complex_single_precision.sh

elpa2_test_complex_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_single_precision.sh
	chmod +x elpa2_test_complex_single_precision.sh

elpa2_test_complex_default_kernel_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel_single_precision.sh
	chmod +x elpa2_test_complex_default_kernel_single_precision.sh

elpa2_test_complex_choose_kernel_with_api_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api_single_precision.sh
	chmod +x elpa2_test_complex_choose_kernel_with_api_single_precision.sh
endif

if WITH_GPU_VERSION
elpa2_test_real_gpu_version.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_gpu_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_gpu_version.sh
	chmod +x elpa2_test_real_gpu_version.sh

elpa2_test_complex_gpu_version.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_gpu_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_gpu_version.sh
	chmod +x elpa2_test_complex_gpu_version.sh

if WANT_SINGLE_PRECISION_REAL
elpa2_test_real_gpu_version_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_gpu_version_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_gpu_version_single_precision.sh
	chmod +x elpa2_test_real_gpu_version_single_precision.sh
endif

if WANT_SINGLE_PRECISION_COMPLEX
elpa2_test_complex_gpu_version_single_precision.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_gpu_version_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_gpu_version_single_precision.sh
	chmod +x elpa2_test_complex_gpu_version_single_precision.sh
endif
# GPU_VERSION
endif

else
# build tests without mpi support

elpa1_test_real.sh:
	echo './elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
	chmod +x elpa1_test_real.sh

elpa1_test_real_with_c.sh:
	echo './elpa1_test_real_with_c@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_with_c.sh
	chmod +x elpa1_test_real_with_c.sh

elpa2_test_real_c_version.sh:
	echo './elpa2_test_real_c_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_c_version.sh
	chmod +x elpa2_test_real_c_version.sh

elpa2_test_complex_c_version.sh:
	echo './elpa2_test_complex_c_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_c_version.sh
	chmod +x elpa2_test_complex_c_version.sh

elpa1_test_real_c_version.sh:
	echo './elpa1_test_real_c_version@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_c_version.sh
	chmod +x elpa1_test_real_c_version.sh

elpa1_test_complex_c_version.sh:
	echo './elpa1_test_complex_c_version@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex_c_version.sh
	chmod +x elpa1_test_complex_c_version.sh

elpa2_test_real.sh:
	echo './elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
	chmod +x elpa2_test_real.sh

elpa2_test_real_default_kernel.sh:
	echo './elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
	chmod +x elpa2_test_real_default_kernel.sh

elpa2_test_real_default_kernel_qr_decomposition.sh:
	echo './elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

elpa2_test_real_choose_kernel_with_api.sh:
	echo './elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
	chmod +x elpa2_test_real_choose_kernel_with_api.sh

elpa1_test_complex.sh:
	echo './elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
	chmod +x elpa1_test_complex.sh

elpa2_test_complex.sh:
	echo './elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
	chmod +x elpa2_test_complex.sh

elpa2_test_complex_default_kernel.sh:
	echo './elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
	chmod +x elpa2_test_complex_default_kernel.sh

elpa2_test_complex_choose_kernel_with_api.sh:
	echo './elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh

if WANT_SINGLE_PRECISION_REAL
elpa1_test_real_single_precision.sh:
	echo './elpa1_test_real_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_single_precision.sh
	chmod +x elpa1_test_real_single_precision.sh

elpa2_test_real_single_precision.sh:
	echo './elpa2_test_real_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_single_precision.sh
	chmod +x elpa2_test_real_single_precision.sh

elpa2_test_real_default_kernel_single_precision.sh:
	echo './elpa2_test_real_default_kernel_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel_single_precision.sh
	chmod +x elpa2_test_real_default_kernel_single_precision.sh

elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh:
	echo './elpa2_test_real_default_kernel_qr_decomposition_single_precision@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh
	chmod +x elpa2_test_real_default_kernel_qr_decomposition_single_precision.sh

elpa2_test_real_choose_kernel_with_api_single_precision.sh:
	echo './elpa2_test_real_choose_kernel_with_api_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api_single_precision.sh
	chmod +x elpa2_test_real_choose_kernel_with_api_single_precision.sh
endif

if WANT_SINGLE_PRECISION_COMPLEX
elpa1_test_complex_single_precision.sh:
	echo './elpa1_test_complex_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex_single_precision.sh
	chmod +x elpa1_test_complex_single_precision.sh

elpa2_test_complex_single_precision.sh:
	echo './elpa2_test_complex_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_single_precision.sh
	chmod +x elpa2_test_complex_single_precision.sh

elpa2_test_complex_default_kernel_single_precision.sh:
	echo './elpa2_test_complex_default_kernel_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel_single_precision.sh
	chmod +x elpa2_test_complex_default_kernel_single_precision.sh

elpa2_test_complex_choose_kernel_with_api_single_precision.sh:
	echo './elpa2_test_complex_choose_kernel_with_api_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api_single_precision.sh
	chmod +x elpa2_test_complex_choose_kernel_with_api_single_precision.sh
endif

if WITH_GPU_VERSION
elpa2_test_real_gpu_version.sh:
	echo './elpa2_test_real_gpu_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_gpu_version.sh
	chmod +x elpa2_test_real_gpu_version.sh

elpa2_test_complex_gpu_version.sh:
	echo './elpa2_test_complex_gpu_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_gpu_version.sh
	chmod +x elpa2_test_complex_gpu_version.sh

if WANT_SINGLE_PRECISION_REAL
elpa2_test_real_gpu_version_single_precision.sh:
	echo './elpa2_test_real_gpu_version_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_gpu_version_single_precision.sh
	chmod +x elpa2_test_real_gpu_version_single_precision.sh
endif

if WANT_SINGLE_PRECISION_COMPLEX
elpa2_test_complex_gpu_version_single_precision.sh:
	echo './elpa2_test_complex_gpu_version_single_precision@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_gpu_version_single_precision.sh
	chmod +x elpa2_test_complex_gpu_version_single_precision.sh
endif
# GPU_VERSION
endif



# use mpi
endif

672
673
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
674

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

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

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

684
685
686
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 $@

687
688
689
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 $@

690
691
692
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 $@

693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
test_real.i: $(top_srcdir)/test/fortran_test_programs/test_real.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/test/fortran_test_programs/test_real.F90 -o $@

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 $@

714
715
include doxygen.am

716
CLEANFILES = \
717
  elpa/elpa-generated.h \
718
719
720
721
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
722
  elpa2_test_real_default_kernel_qr_decomposition.sh \
723
724
725
726
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
Andreas Marek's avatar
Andreas Marek committed
727
728
729
730
731
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
732
  *.i
733
734

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
735
736
737
738
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
739
740
741
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
742
	-rm -rf ./elpa/elpa_generated.h
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
743
	-rmdir ./src/elpa2_kernels/
744
745
	-rmdir ./src
	-rmdir ./test
746
	-rmdir ./m4
747
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
748
	-rmdir .fortran_dependencies/
749

750
751
752
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
753
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
754
755
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
756
757
758
759
  src/elpa1_compute_template_real.X90 \
  src/elpa1_compute_template_complex.X90 \
  src/elpa2_compute_template_real.X90 \
  src/elpa2_compute_template_complex.X90 \
760
  src/redist_band.X90 \
761
762
763
764
765
  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 \
766
  nvcc_wrap
767

768
769
770
771
772
773
# 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; }
774

775
776
777
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
778

779

780
@FORTRAN_MODULE_DEPS@
781
782
783
784
785

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

786
# $1  Object name
787
define require_elpa_lib
788
$1: libelpa@SUFFIX@.la
789
790

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