Makefile.am 35.4 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/aligned_mem.F90 \
29
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
30 31
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
32
                             src/elpa_qr/qr_utils.F90 \
33
                             src/elpa_qr/elpa_qrkernels.F90 \
34
                             src/elpa_qr/elpa_pdlarfb.F90 \
35
                             src/elpa_qr/elpa_pdgeqrf.F90
36 37 38 39 40 41 42 43 44 45 46 47
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

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

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

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

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

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

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

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

Andreas Marek's avatar
Andreas Marek committed
84
if WITH_REAL_SSE_KERNEL
85 86 87 88
  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
Andreas Marek's avatar
Andreas Marek committed
89 90
else
if WITH_COMPLEX_SSE_KERNEL
91 92 93 94 95
  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

96 97
endif
endif
Andreas Marek's avatar
Andreas Marek committed
98

99
if WITH_REAL_SSE_BLOCK2_KERNEL
100 101 102 103
  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
104 105
endif

Andreas Marek's avatar
Andreas Marek committed
106
if WITH_REAL_AVX_BLOCK2_KERNEL
107 108 109 110
  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
111 112
endif

113
if WITH_REAL_SSE_BLOCK4_KERNEL
114 115 116 117
  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
118 119
endif

Andreas Marek's avatar
Andreas Marek committed
120
if WITH_REAL_AVX_BLOCK4_KERNEL
121 122 123 124
  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
125 126
endif

127
if WITH_REAL_SSE_BLOCK6_KERNEL
128 129 130 131
  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
132 133
endif

Andreas Marek's avatar
Andreas Marek committed
134
if WITH_REAL_AVX_BLOCK6_KERNEL
135 136 137 138
  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
139 140
endif

141
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
142 143 144 145
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv_double_precision.cpp
if WANT_SINGLE_PRECISION_COMPLEX
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv_single_precision.cpp
endif
146 147
endif

Andreas Marek's avatar
Andreas Marek committed
148
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
149 150 151 152
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv_double_precision.cpp
if WANT_SINGLE_PRECISION_COMPLEX
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv_single_precision.cpp
endif
153 154
endif

155
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
156 157 158 159
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv_double_precision.cpp
if WANT_SINGLE_PRECISION_COMPLEX
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv_single_precision.cpp
endif
160 161
endif

Andreas Marek's avatar
Andreas Marek committed
162
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
163 164 165 166
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv_double_precision.cpp
if WANT_SINGLE_PRECISION_COMPLEX
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv_single_precision.cpp
endif
167 168
endif

169
.cu.lo:
170
	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
171

172
# install any .mod files in the include/ dir
173
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
174
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
175
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
176

Andreas Marek's avatar
Andreas Marek committed
177
man_MANS = man/solve_evp_real.3 \
178
	   man/solve_evp_real_1stage_double.3 \
Andreas Marek's avatar
Andreas Marek committed
179
	   man/solve_evp_complex.3 \
180 181 182
	   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
183
	   man/get_elpa_row_col_comms.3 \
184
	   man/get_elpa_communicators.3 \
Andreas Marek's avatar
Andreas Marek committed
185 186
	   man/print_available_elpa2_kernels.1

187 188 189 190 191 192 193 194 195 196 197 198 199
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


200
# other files to distribute
201
filesdir = $(docdir)/examples
202
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
203 204 205 206 207 208 209 210 211 212 213
  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 \
214
  src/print_available_elpa2_kernels.F90
215

216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
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
244 245
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

246 247
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
248
pkgconfig_DATA = @PKG_CONFIG_FILE@
249

250 251
# programs
bin_PROGRAMS = \
252 253 254 255 256
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
257

258 259 260 261 262 263 264 265 266 267 268 269
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

270
noinst_PROGRAMS = \
271
  elpa2_test_real_default_kernel@SUFFIX@ \
272
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
273 274
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
275
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
276
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
277 278 279
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
280
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
281

282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
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

312

313
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
314

315
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
316
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
317 318 319 320
else
  redirect_sources =
endif

321 322 323 324 325
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 \
326
		 test/shared_sources/mod_output_types.F90 \
327
		 test/shared_sources/prepare_matrix.F90
Andreas Marek's avatar
Andreas Marek committed
328

Andreas Marek's avatar
Andreas Marek committed
329
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
330
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
331
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
332

Andreas Marek's avatar
Andreas Marek committed
333 334 335 336 337 338 339 340 341 342 343 344 345 346
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)
347
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
348

Andreas Marek's avatar
Andreas Marek committed
349
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
350 351
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

352 353
#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
354 355

elpa2_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2.F90 $(shared_sources) $(redirect_sources)
356
elpa2_test_real@SUFFIX@_LDFLAGS = -static
357
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
358

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

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

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

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

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

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

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

Andreas Marek's avatar
Andreas Marek committed
380
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 $(shared_sources) $(redirect_sources)
381
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
382

383 384 385 386 387 388 389 390 391 392
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)
393
#elpa2_test_real_default_kernel_single_precision@SUFFIX@_LDFLAGS = -static
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410

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)
411
#elpa2_test_complex_default_kernel_single_precision@SUFFIX@_LDFLAGS = -static
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435

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

436
check_SCRIPTS = \
437
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
438 439
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
Andreas Marek's avatar
Andreas Marek committed
440 441 442
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
443 444 445 446 447
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
448
  elpa2_test_real_default_kernel_qr_decomposition.sh \
449 450 451
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
452

453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
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

484
TESTS = $(check_SCRIPTS)
485
if WITH_MPI
486
elpa1_test_real.sh:
487
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
488
	chmod +x elpa1_test_real.sh
489

Andreas Marek's avatar
Andreas Marek committed
490 491 492 493
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
494 495 496 497 498 499 500 501
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
502 503 504 505
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
506 507 508
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
509

510
elpa2_test_real.sh:
511
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
512
	chmod +x elpa2_test_real.sh
513

514
elpa2_test_real_default_kernel.sh:
515
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
516
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
517

518
elpa2_test_real_default_kernel_qr_decomposition.sh:
519
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
520 521
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

522
elpa2_test_real_choose_kernel_with_api.sh:
523
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
524
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
525

526
elpa1_test_complex.sh:
527
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
528
	chmod +x elpa1_test_complex.sh
529

530
elpa2_test_complex.sh:
531
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
532
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
533

534
elpa2_test_complex_default_kernel.sh:
535
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
536
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
537

538
elpa2_test_complex_choose_kernel_with_api.sh:
539
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
540
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
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 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731

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

732 733
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
734

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

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

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

744 745 746
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 $@

747 748 749
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 $@

750 751 752
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 $@

753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773
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 $@

774 775
include doxygen.am

776
CLEANFILES = \
777
  elpa/elpa-generated.h \
778 779 780 781
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
782
  elpa2_test_real_default_kernel_qr_decomposition.sh \
783 784 785 786
  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
787 788 789 790 791
  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 \
792
  *.i
793 794

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
795 796 797 798
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
799 800 801
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
802
	-rm -rf ./elpa/elpa_generated.h
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
803
	-rmdir ./src/elpa2_kernels/
804 805
	-rmdir ./src
	-rmdir ./test
806
	-rmdir ./m4
807
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
808
	-rmdir .fortran_dependencies/
809

810 811 812
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
813
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
814 815
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
816 817 818 819
  src/elpa1_compute_template_real.X90 \
  src/elpa1_compute_template_complex.X90 \
  src/elpa2_compute_template_real.X90 \
  src/elpa2_compute_template_complex.X90 \
820
  src/redist_band.X90 \
821 822 823 824 825
  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 \
826
  nvcc_wrap
827

828 829 830 831 832 833
# 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; }
834

835 836 837
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
838

839

840
@FORTRAN_MODULE_DEPS@
841 842 843 844 845

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

846
# $1  Object name
847
define require_elpa_lib
848
$1: libelpa@SUFFIX@.la
849 850

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