Makefile.am 8.46 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/elpa1.F90 src/elpa2.F90
13

14
15
16
17
18
19
20
21
22
23
24
25
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
26
if WITH_REAL_GENERIC_KERNEL
27
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
28
29
endif

Andreas Marek's avatar
Andreas Marek committed
30
if WITH_COMPLEX_GENERIC_KERNEL
31
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
32
33
endif

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

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

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

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

Andreas Marek's avatar
Andreas Marek committed
50
if WITH_REAL_SSE_KERNEL
51
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
52
53
else
if WITH_COMPLEX_SSE_KERNEL
54
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
55
56
endif
endif
Andreas Marek's avatar
Andreas Marek committed
57
58

if WITH_REAL_AVX_BLOCK2_KERNEL
59
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
60
61
endif

Andreas Marek's avatar
Andreas Marek committed
62
if WITH_REAL_AVX_BLOCK4_KERNEL
63
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
64
65
endif

Andreas Marek's avatar
Andreas Marek committed
66
if WITH_REAL_AVX_BLOCK6_KERNEL
67
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
68
69
endif

Andreas Marek's avatar
Andreas Marek committed
70
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
71
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
72
73
endif

Andreas Marek's avatar
Andreas Marek committed
74
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
75
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
76
77
endif

Andreas Marek's avatar
Andreas Marek committed
78
#if WITH_AVX_SANDYBRIDGE
79
#  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
80
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
81
82
#endif

83
# install any .mod files in the include/ dir
84
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
85
86
87
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
88
filesdir = $(docdir)/examples
89
dist_files_DATA = \
90
91
92
93
94
95
96
97
98
99
100
101
102
  test/read_real.F90 \
  test/read_real_gen.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_complex_gen.F90 \
  test/test_real2.F90 \
  test/test_real2_default_kernel.F90 \
  test/test_real2_choose_kernel_with_api.F90 \
  src/print_available_elpa2_kernels.F90 \
  test/test_real.F90 \
  test/test_real_gen.F90
103

104
105
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

106
107
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
108
pkgconfig_DATA = @PKG_CONFIG_FILE@
109

110
111
# programs
bin_PROGRAMS = \
112
113
114
115
116
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
117
118

noinst_PROGRAMS = \
119
120
121
122
  elpa2_test_real_default_kernel@SUFFIX@ \
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@
123

124
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
125

126
127
128
129
130
131
132
if HAVE_REDIRECT
  redirect_sources = test/redir.c test/redirect.F90
else
  redirect_sources =
endif

elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 test/util.F90 $(redirect_sources)
133
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
134

135
136
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90 test/util.F90 $(redirect_sources)

137
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
138

139
140
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90 test/util.F90 $(redirect_sources)

141
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
142

143
144
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90 test/util.F90 $(redirect_sources)

145
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
146

147
148
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90 test/util.F90 $(redirect_sources)

149
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
150

151
152
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90 test/util.F90 $(redirect_sources)

153
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
154

155
156
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90 test/util.F90 $(redirect_sources)

157
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
158

159
160
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90 test/util.F90 $(redirect_sources)

161
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
162

163
164
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 test/util.F90 $(redirect_sources)

165
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
166

167
check_SCRIPTS = \
168
169
170
171
172
173
174
175
176
  elpa1_test_real.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  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 \
  elpa2_print_kernels@SUFFIX@
177
178
179

TESTS = $(check_SCRIPTS)

180
elpa1_test_real.sh:
181
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
182
	chmod +x elpa1_test_real.sh
183

184
elpa2_test_real.sh:
185
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
186
	chmod +x elpa2_test_real.sh
187

188
elpa2_test_real_default_kernel.sh:
189
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
190
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
191

192
elpa2_test_real_choose_kernel_with_api.sh:
193
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
194
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
195

196
elpa1_test_complex.sh:
197
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
198
	chmod +x elpa1_test_complex.sh
199

200
elpa2_test_complex.sh:
201
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
202
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
203

204
elpa2_test_complex_default_kernel.sh:
205
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
206
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
207

208
elpa2_test_complex_choose_kernel_with_api.sh:
209
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
210
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
211
212
213

elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
214

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

218
CLEANFILES = \
219
220
221
222
223
224
225
226
227
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  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
228
229

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
230
231
232
233
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
234
235
236
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
237
	-rmdir ./src/elpa2_kernels/
238
239
	-rmdir ./src
	-rmdir ./test
240
	-rmdir ./m4
241
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
242
	-rmdir .fortran_dependencies/
243
244

EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk
245

246
247
248
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
249

250

251
@FORTRAN_MODULE_DEPS@
252
253
254
255
256

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

257
# $1  Object name
258
define require_elpa_lib
259
$1: libelpa@SUFFIX@.la
260
261

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