Makefile.am 13.5 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

Andreas Marek's avatar
Andreas Marek committed
12
libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 \
13
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
14 15 16 17 18 19 20 21
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
                             src/elpa_qr/qr_utils.f90 \
                             src/elpa_qr/elpa_qrkernels.f90 \
                             src/elpa_qr/elpa_pdlarfb.f90 \
                             src/elpa_qr/elpa_pdgeqrf.f90
22 23 24 25 26 27 28 29 30 31 32 33
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

Andreas Marek's avatar
Andreas Marek committed
34
if WITH_REAL_GENERIC_KERNEL
35
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
36 37
endif

Andreas Marek's avatar
Andreas Marek committed
38
if WITH_COMPLEX_GENERIC_KERNEL
39
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
40 41
endif

Andreas Marek's avatar
Andreas Marek committed
42
if WITH_REAL_GENERIC_SIMPLE_KERNEL
43
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
44 45
endif

Andreas Marek's avatar
Andreas Marek committed
46
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
47
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
48 49
endif

Andreas Marek's avatar
Andreas Marek committed
50
if WITH_REAL_BGP_KERNEL
51
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
52 53
endif

Andreas Marek's avatar
Andreas Marek committed
54
if WITH_REAL_BGQ_KERNEL
55
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
56 57
endif

Andreas Marek's avatar
Andreas Marek committed
58
if WITH_REAL_SSE_KERNEL
59
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
60 61
else
if WITH_COMPLEX_SSE_KERNEL
62
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
63 64
endif
endif
Andreas Marek's avatar
Andreas Marek committed
65 66

if WITH_REAL_AVX_BLOCK2_KERNEL
67
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
68 69
endif

Andreas Marek's avatar
Andreas Marek committed
70
if WITH_REAL_AVX_BLOCK4_KERNEL
71
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
72 73
endif

Andreas Marek's avatar
Andreas Marek committed
74
if WITH_REAL_AVX_BLOCK6_KERNEL
75
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
76 77
endif

Andreas Marek's avatar
Andreas Marek committed
78
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
79
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
80 81
endif

Andreas Marek's avatar
Andreas Marek committed
82
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
83
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
84 85
endif

Andreas Marek's avatar
Andreas Marek committed
86
#if WITH_AVX_SANDYBRIDGE
87
#  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
88
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
89 90
#endif

91
# install any .mod files in the include/ dir
92
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
93
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
94
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
95 96

# other files to distribute
97
filesdir = $(docdir)/examples
98
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
99 100 101 102 103 104 105 106 107 108 109
  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 \
110
  src/print_available_elpa2_kernels.F90
111

112 113
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

114 115
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
116
pkgconfig_DATA = @PKG_CONFIG_FILE@
117

118 119
# programs
bin_PROGRAMS = \
120 121 122 123 124
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
125 126

noinst_PROGRAMS = \
127
  elpa2_test_real_default_kernel@SUFFIX@ \
128
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
129 130
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
131
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
132
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
133 134 135
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
136
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
137

138

139
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
140

141
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
142
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
143 144 145 146
else
  redirect_sources =
endif

Andreas Marek's avatar
Andreas Marek committed
147 148 149
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 test/shared_sources/prepare_matrix.F90

Andreas Marek's avatar
Andreas Marek committed
150
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
151
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
152
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
153

Andreas Marek's avatar
Andreas Marek committed
154 155 156 157 158 159 160 161 162 163 164 165 166 167
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)
168
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
169

Andreas Marek's avatar
Andreas Marek committed
170
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
171 172
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

173 174
#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
175 176

elpa2_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2.F90 $(shared_sources) $(redirect_sources)
177

178
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
179

Andreas Marek's avatar
Andreas Marek committed
180
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel.F90 $(shared_sources) $(redirect_sources)
181

182
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
183

Andreas Marek's avatar
Andreas Marek committed
184
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
185 186 187

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

Andreas Marek's avatar
Andreas Marek committed
188
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_choose_kernel_with_api.F90 $(shared_sources) $(redirect_sources)
189

190
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
191

Andreas Marek's avatar
Andreas Marek committed
192
elpa1_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex.F90 $(shared_sources) $(redirect_sources)
193

194
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
195

Andreas Marek's avatar
Andreas Marek committed
196
elpa2_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2.F90 $(shared_sources) $(redirect_sources)
197

198
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
199

Andreas Marek's avatar
Andreas Marek committed
200
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_default_kernel.F90 $(shared_sources) $(redirect_sources)
201

202
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
203

Andreas Marek's avatar
Andreas Marek committed
204
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90 $(shared_sources) $(redirect_sources)
205

206
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
207

Andreas Marek's avatar
Andreas Marek committed
208
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 $(shared_sources) $(redirect_sources)
209

210
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
211

212
check_SCRIPTS = \
213
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
214 215
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
Andreas Marek's avatar
Andreas Marek committed
216 217 218
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
219 220 221 222 223
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
224
  elpa2_test_real_default_kernel_qr_decomposition.sh \
225 226 227
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
228 229

TESTS = $(check_SCRIPTS)
230
elpa1_test_real.sh:
231
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
232
	chmod +x elpa1_test_real.sh
233

Andreas Marek's avatar
Andreas Marek committed
234 235 236 237
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
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
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

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

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
253
elpa2_test_real.sh:
254
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
255
	chmod +x elpa2_test_real.sh
256

257
elpa2_test_real_default_kernel.sh:
258
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
259
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
260

261
elpa2_test_real_default_kernel_qr_decomposition.sh:
262
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
263 264
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

265
elpa2_test_real_choose_kernel_with_api.sh:
266
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
267
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
268

269
elpa1_test_complex.sh:
270
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
271
	chmod +x elpa1_test_complex.sh
272

273
elpa2_test_complex.sh:
274
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
275
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
276

277
elpa2_test_complex_default_kernel.sh:
278
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
279
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
280

281
elpa2_test_complex_choose_kernel_with_api.sh:
282
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
283
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
284

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

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

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

294
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
295
  elpa-generated.h \
296 297 298 299
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
300
  elpa2_test_real_default_kernel_qr_decomposition.sh \
301 302 303 304
  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
305 306 307 308 309
  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 \
310
  *.i
311 312

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
313 314 315 316
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
317 318 319
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
320
	-rm -rf ./elpa/elpa_generated.h
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
321
	-rmdir ./src/elpa2_kernels/
322 323
	-rmdir ./src
	-rmdir ./test
324
	-rmdir ./m4
325
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
326
	-rmdir .fortran_dependencies/
327

328 329 330 331 332 333
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
  src/redist_band.X90
334

335 336 337
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
338

339

340
@FORTRAN_MODULE_DEPS@
341 342 343 344 345

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

346
# $1  Object name
347
define require_elpa_lib
348
$1: libelpa@SUFFIX@.la
349 350

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