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

3
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4

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

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

Andreas Marek's avatar
Andreas Marek committed
12 13 14 15 16 17 18 19 20
libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 \
	                     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
21 22 23 24 25 26 27 28 29 30 31 32
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

33 34 35 36
if WITH_GPU_VERSION
  libelpa@SUFFIX@_la_SOURCES +=  src/interface_cuda.F90 src/interface_c_kernel.F90 src/ev_tridi_band_gpu_c_v2.cu src/cuUtils.cu
endif

Andreas Marek's avatar
Andreas Marek committed
37
if WITH_REAL_GENERIC_KERNEL
38
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
39 40
endif

Andreas Marek's avatar
Andreas Marek committed
41
if WITH_COMPLEX_GENERIC_KERNEL
42
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
43 44
endif

Andreas Marek's avatar
Andreas Marek committed
45
if WITH_REAL_GENERIC_SIMPLE_KERNEL
46
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
47 48
endif

Andreas Marek's avatar
Andreas Marek committed
49
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
50
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
51 52
endif

Andreas Marek's avatar
Andreas Marek committed
53
if WITH_REAL_BGP_KERNEL
54
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
55 56
endif

Andreas Marek's avatar
Andreas Marek committed
57
if WITH_REAL_BGQ_KERNEL
58
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
59 60
endif

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

if WITH_REAL_AVX_BLOCK2_KERNEL
70
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
71 72
endif

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

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

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

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

89 90
.cu.lo:
	NVCC="$(NVCC)" libtool --mode=compile --tag=CC $(top_srcdir)/nvcc_wrap $(NVCCFLAGS) $(LDFLAGS) -c $< -o $@
Andreas Marek's avatar
Andreas Marek committed
91

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

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

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

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

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

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

136

137
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
138

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

Andreas Marek's avatar
Andreas Marek committed
145 146 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

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

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

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
155
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
156 157 158
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

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

160
elpa2_test_real@SUFFIX@_LDFLAGS = -static
161
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
162

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

165
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
166

Andreas Marek's avatar
Andreas Marek committed
167
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
168 169 170

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

173
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
174

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

177
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
178

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

181
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
182

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

185
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
186

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

189
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
190

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

193
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
194

195
check_SCRIPTS = \
196
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
197 198
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
199 200 201 202 203
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
204
  elpa2_test_real_default_kernel_qr_decomposition.sh \
205 206 207
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
208 209

TESTS = $(check_SCRIPTS)
210
elpa1_test_real.sh:
211
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
212
	chmod +x elpa1_test_real.sh
213

Andreas Marek's avatar
Andreas Marek committed
214 215 216 217 218 219 220 221
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

222
elpa2_test_real.sh:
223
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
224
	chmod +x elpa2_test_real.sh
225

226
elpa2_test_real_default_kernel.sh:
227
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
228
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
229

230
elpa2_test_real_default_kernel_qr_decomposition.sh:
231
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
232 233
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

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

238
elpa1_test_complex.sh:
239
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
240
	chmod +x elpa1_test_complex.sh
241

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

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

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

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

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

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

263
CLEANFILES = \
264
  elpa/elpa-generated.h \
265 266 267 268
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
269
  elpa2_test_real_default_kernel_qr_decomposition.sh \
270 271 272 273 274
  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
275 276

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
277 278 279 280
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
281 282 283
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
284
	-rmdir ./src/elpa2_kernels/
285 286
	-rmdir ./src
	-rmdir ./test
287
	-rmdir ./m4
288
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
289
	-rmdir .fortran_dependencies/
290

Andreas Marek's avatar
Andreas Marek committed
291
EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk nvcc_wrap
292

293 294 295
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
296

297

298
@FORTRAN_MODULE_DEPS@
299 300 301 302 303

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

304
# $1  Object name
305
define require_elpa_lib
306
$1: libelpa@SUFFIX@.la
307 308

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