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

Andreas Marek's avatar
Andreas Marek committed
12
libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 \
Andreas Marek's avatar
Andreas Marek committed
13 14
	                     src/elpa1_compute.F90 \
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
15 16
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
17 18 19
			     src/check_for_gpu.F90 \
			     src/mod_cuda.F90 \
			     src/interface_c_kernel.F90 \
Andreas Marek's avatar
Andreas Marek committed
20 21 22 23 24 25
			     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
26 27 28 29 30 31 32 33 34 35 36 37
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

38
if WITH_GPU_VERSION
39 40
  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
41 42
endif

Andreas Marek's avatar
Andreas Marek committed
43
if WITH_REAL_GENERIC_KERNEL
44
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
45 46
endif

Andreas Marek's avatar
Andreas Marek committed
47
if WITH_COMPLEX_GENERIC_KERNEL
48
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
49 50
endif

Andreas Marek's avatar
Andreas Marek committed
51
if WITH_REAL_GENERIC_SIMPLE_KERNEL
52
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
53 54
endif

Andreas Marek's avatar
Andreas Marek committed
55
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
56
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
57 58
endif

Andreas Marek's avatar
Andreas Marek committed
59
if WITH_REAL_BGP_KERNEL
60
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
61 62
endif

Andreas Marek's avatar
Andreas Marek committed
63
if WITH_REAL_BGQ_KERNEL
64
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
65 66
endif

Andreas Marek's avatar
Andreas Marek committed
67
if WITH_REAL_SSE_KERNEL
68
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
69 70
else
if WITH_COMPLEX_SSE_KERNEL
71
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
72 73
endif
endif
Andreas Marek's avatar
Andreas Marek committed
74 75

if WITH_REAL_AVX_BLOCK2_KERNEL
76
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
77 78
endif

Andreas Marek's avatar
Andreas Marek committed
79
if WITH_REAL_AVX_BLOCK4_KERNEL
80
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
81 82
endif

Andreas Marek's avatar
Andreas Marek committed
83
if WITH_REAL_AVX_BLOCK6_KERNEL
84
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
85 86
endif

Andreas Marek's avatar
Andreas Marek committed
87
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
88
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
89 90
endif

Andreas Marek's avatar
Andreas Marek committed
91
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
92
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
93 94
endif

95
.cu.lo:
96
	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
97

98
# install any .mod files in the include/ dir
99
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
100
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
101
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
102 103

# other files to distribute
104
filesdir = $(docdir)/examples
105
dist_files_DATA = \
106 107 108 109 110 111 112
  test/read_real.F90 \
  test/test_complex2.F90 \
  test/test_complex2_default_kernel.F90 \
  test/test_complex2_choose_kernel_with_api.F90 \
  test/test_complex.F90 \
  test/test_real2.F90 \
  test/test_real2_default_kernel.F90 \
113
  test/test_real2_default_kernel_qr_decomposition.F90 \
114 115
  test/test_real2_choose_kernel_with_api.F90 \
  test/test_real.F90 \
Andreas Marek's avatar
Andreas Marek committed
116
  test/test_real_with_c.F90 \
117
  src/print_available_elpa2_kernels.F90
118

119 120
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

121 122
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
123
pkgconfig_DATA = @PKG_CONFIG_FILE@
124

125 126
# programs
bin_PROGRAMS = \
127 128 129 130 131
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
132 133

noinst_PROGRAMS = \
134
  elpa2_test_real_default_kernel@SUFFIX@ \
135
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
136 137
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
138
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
139 140
  elpa1_test_real_c_version@SUFFIX@ \
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
141

142

143
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
144

145
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
146
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
147 148 149 150
else
  redirect_sources =
endif

151 152 153 154 155 156
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
157 158 159

elpa1_test_real_c_version@SUFFIX@_SOURCES = test/test_real_c_version.c $(shared_sources) $(redirect_sources)
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
160
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
161 162

elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 $(shared_sources) $(redirect_sources)
163
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
164

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
165
elpa1_test_real_with_c@SUFFIX@_SOURCES = test/test_real_with_c.F90 test/shared_sources/mod_from_c.F90 test/shared_sources/call_elpa1_real.c  $(shared_sources) $(redirect_sources)
Andreas Marek's avatar
Andreas Marek committed
166 167 168
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

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

170
elpa2_test_real@SUFFIX@_LDFLAGS = -static
171
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
172

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

175
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
176

Andreas Marek's avatar
Andreas Marek committed
177
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
178 179 180

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

183
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
184

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

187
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
188

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

191
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
192

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

195
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
196

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

199
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
200

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

203
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
204

205
check_SCRIPTS = \
206
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
207 208
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
209 210 211 212 213
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
214
  elpa2_test_real_default_kernel_qr_decomposition.sh \
215 216 217
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
218 219

TESTS = $(check_SCRIPTS)
220
elpa1_test_real.sh:
221
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
222
	chmod +x elpa1_test_real.sh
223

Andreas Marek's avatar
Andreas Marek committed
224 225 226 227 228 229 230 231
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

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

232
elpa2_test_real.sh:
233
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
234
	chmod +x elpa2_test_real.sh
235

236
elpa2_test_real_default_kernel.sh:
237
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
238
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
239

240
elpa2_test_real_default_kernel_qr_decomposition.sh:
241
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
242 243
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

244
elpa2_test_real_choose_kernel_with_api.sh:
245
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
246
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
247

248
elpa1_test_complex.sh:
249
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
250
	chmod +x elpa1_test_complex.sh
251

252
elpa2_test_complex.sh:
253
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
254
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
255

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

260
elpa2_test_complex_choose_kernel_with_api.sh:
261
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
262
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
263

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

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

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

273
CLEANFILES = \
274
  elpa/elpa-generated.h \
275 276 277 278
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
279
  elpa2_test_real_default_kernel_qr_decomposition.sh \
280 281 282 283 284
  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 \
  *.i
285 286

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
287 288 289 290
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
291 292 293
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
294
	-rmdir ./src/elpa2_kernels/
295 296
	-rmdir ./src
	-rmdir ./test
297
	-rmdir ./m4
298
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
299
	-rmdir .fortran_dependencies/
300

Andreas Marek's avatar
Andreas Marek committed
301
EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk nvcc_wrap
302

303 304 305
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
306

307

308
@FORTRAN_MODULE_DEPS@
309 310 311 312 313

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

314
# $1  Object name
315
define require_elpa_lib
316
$1: libelpa@SUFFIX@.la
317 318

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