Makefile.am 9.22 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
9

# libelpa
if WITH_OPENMP
10
lib_LTLIBRARIES = libelpa-@PACKAGE_VERSION@_mt.la
11
else
12
lib_LTLIBRARIES = libelpa-@PACKAGE_VERSION@.la
13
14
15
16
17
18
19
endif

##rule to produce fortran config file:
#config_f90.h: ./config.h
#	grep "^#define" ./config.h > $@

if WITH_OPENMP
20
libelpa_@PACKAGE_VERSION@_mt_la_SOURCES = src/elpa1.F90 src/elpa2.F90
21
else
22
libelpa_@PACKAGE_VERSION@_la_SOURCES = src/elpa1.F90 src/elpa2.F90
23
24
endif

Andreas Marek's avatar
Andreas Marek committed
25
if WITH_REAL_GENERIC_KERNEL
26
if WITH_OPENMP
27
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
28
else
29
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real.f90
30
31
32
endif
endif

Andreas Marek's avatar
Andreas Marek committed
33
if WITH_COMPLEX_GENERIC_KERNEL
34
if WITH_OPENMP
35
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
36
else
37
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex.f90
38
39
40
endif
endif

Andreas Marek's avatar
Andreas Marek committed
41
if WITH_REAL_GENERIC_SIMPLE_KERNEL
42
if WITH_OPENMP
43
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
44
else
45
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
Andreas Marek's avatar
Andreas Marek committed
46
endif
47
48
endif

Andreas Marek's avatar
Andreas Marek committed
49
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
50
if WITH_OPENMP
51
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
52
else
53
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
54
55
56
endif
endif

Andreas Marek's avatar
Andreas Marek committed
57
if WITH_REAL_BGP_KERNEL
58
if WITH_OPENMP
59
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
60
else
61
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
62
endif
63
64
endif

Andreas Marek's avatar
Andreas Marek committed
65
if WITH_REAL_BGQ_KERNEL
66
if WITH_OPENMP
67
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
68
else
69
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
70
71
72
endif
endif

Andreas Marek's avatar
Andreas Marek committed
73
if WITH_REAL_SSE_KERNEL
74
if WITH_OPENMP
75
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
76
else
77
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
78
79
80
81
endif
else
if WITH_COMPLEX_SSE_KERNEL
if WITH_OPENMP
82
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
83
else
84
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
85
endif
86
87
endif
endif
Andreas Marek's avatar
Andreas Marek committed
88
89

if WITH_REAL_AVX_BLOCK2_KERNEL
90
if WITH_OPENMP
91
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
92
else
93
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
94
95
96
endif
endif

Andreas Marek's avatar
Andreas Marek committed
97
if WITH_REAL_AVX_BLOCK4_KERNEL
98
if WITH_OPENMP
99
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
100
else
101
 libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
102
103
104
endif
endif

Andreas Marek's avatar
Andreas Marek committed
105
if WITH_REAL_AVX_BLOCK6_KERNEL
106
if WITH_OPENMP
107
  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
108
else
109
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
110
111
112
endif
endif

Andreas Marek's avatar
Andreas Marek committed
113
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
114
if WITH_OPENMP
115
 libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
116
else
117
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
118
119
120
endif
endif

Andreas Marek's avatar
Andreas Marek committed
121
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
122
if WITH_OPENMP
123
 libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
124
else
125
  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
126
127
128
endif
endif

Andreas Marek's avatar
Andreas Marek committed
129
130
#if WITH_AVX_SANDYBRIDGE
#if WITH_OPENMP
131
132
#  libelpa_@PACKAGE_VERSION@_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
133
#else
134
135
#  libelpa_@PACKAGE_VERSION@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
136
137
138
#endif
#endif

139
if WITH_OPENMP
140
libelpa_@PACKAGE_VERSION@_mt_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
141
else
142
libelpa_@PACKAGE_VERSION@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
143
144
145
endif

# install any .mod files in the include/ dir
146
elpa_includedir = $(includedir)/elpa-@PACKAGE_VERSION@
147
148
149
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
150
151
filesdir = $(datadir)/@PACKAGE@-@PACKAGE_VERSION@/examples
dist_files_DATA = \
152
153
154
	test/read_real.F90 \
	test/read_real_gen.F90 \
	test/test_complex2.F90 \
Andreas Marek's avatar
Andreas Marek committed
155
156
	test/test_complex2_default_kernel.F90 \
	test/test_complex2_choose_kernel_with_api.F90 \
157
158
159
	test/test_complex.F90 \
	test/test_complex_gen.F90 \
	test/test_real2.F90 \
Andreas Marek's avatar
Andreas Marek committed
160
161
162
	test/test_real2_default_kernel.F90 \
	test/test_real2_choose_kernel_with_api.F90 \
	test/print_available_elpa2_kernels.F90 \
163
164
165
	test/test_real.F90 \
	test/test_real_gen.F90

Andreas Marek's avatar
Andreas Marek committed
166
167
# test programs
if WITH_OPENMP
168
build_lib = libelpa-@PACKAGE_VERSION@_mt.la
Andreas Marek's avatar
Andreas Marek committed
169
else
170
build_lib = libelpa-@PACKAGE_VERSION@.la
Andreas Marek's avatar
Andreas Marek committed
171
172
endif

173
174
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
175
pkgconfig_DATA = elpa-@PACKAGE_VERSION@.pc
176
177
178
179

# test programs

#bindir = $(abs_top_builddir)
180
181
182
183
testsdir = $(datadir)/@PACKAGE@-@PACKAGE_VERSION@/tests
tests_PROGRAMS = test_real test_real2 test_real2_default_kernel test_complex test_complex2 test_complex2_default_kernel test_real2_choose_kernel_with_api test_complex2_choose_kernel_with_api

bin_PROGRAMS = print_available_elpa2_kernels
Andreas Marek's avatar
Andreas Marek committed
184

185
186
187

test_real_SOURCES = test/test_real.F90
test_real_LDADD = $(build_lib)
188
test_real_LDFLAGS = $(AM_LDFLAGS) -static
189
190
191

test_real2_SOURCES = test/test_real2.F90
test_real2_LDADD = $(build_lib)
192
test_real2_LDFLAGS = $(AM_LDFLAGS) -static
193

Andreas Marek's avatar
Andreas Marek committed
194
195
test_real2_default_kernel_SOURCES = test/test_real2_default_kernel.F90
test_real2_default_kernel_LDADD = $(build_lib)
196
test_real2_default_kernel_LDFLAGS = $(AM_LDFLAGS) -static
Andreas Marek's avatar
Andreas Marek committed
197
198
199

test_real2_choose_kernel_with_api_SOURCES = test/test_real2_choose_kernel_with_api.F90
test_real2_choose_kernel_with_api_LDADD = $(build_lib)
200
test_real2_choose_kernel_with_api_LDFLAGS = $(AM_LDFLAGS) -static
Andreas Marek's avatar
Andreas Marek committed
201

202
203
test_complex_SOURCES = test/test_complex.F90
test_complex_LDADD = $(build_lib)
204
test_complex_LDFLAGS = $(AM_LDFLAGS) -static
205
206
207

test_complex2_SOURCES = test/test_complex2.F90
test_complex2_LDADD = $(build_lib)
208
test_complex2_LDFLAGS = $(AM_LDFLAGS) -static
209

Andreas Marek's avatar
Andreas Marek committed
210
test_complex2_default_kernel_SOURCES = test/test_complex2_default_kernel.F90
211
test_complex2_default_kernel_LDADD = $(build_lib)
212
test_complex2_default_kernel_LDFLAGS = $(AM_LDFLAGS) -static
Andreas Marek's avatar
Andreas Marek committed
213
214
215

test_complex2_choose_kernel_with_api_SOURCES = test/test_complex2_choose_kernel_with_api.F90
test_complex2_choose_kernel_with_api_LDADD = $(build_lib)
216
test_complex2_choose_kernel_with_api_LDFLAGS = $(AM_LDFLAGS) -static
Andreas Marek's avatar
Andreas Marek committed
217
218
219

print_available_elpa2_kernels_SOURCES = test/print_available_elpa2_kernels.F90
print_available_elpa2_kernels_LDADD = $(build_lib)
220

221
check_SCRIPTS = test_real.sh test_real2.sh test_real2_default_kernel.sh test_complex.sh test_complex2.sh test_complex2_default_kernel.sh test_real2_choose_kernel_with_api.sh test_complex2_choose_kernel_with_api.sh print_available_elpa2_kernels.sh
222
223
224
225
TESTS = $(check_SCRIPTS)

test_real.sh:
	echo "mpiexec -n 2 ./test_real > /dev/null 2>&1" > test_real.sh
226
	chmod +x test_real.sh
227
228
229

test_real2.sh:
	echo "mpiexec -n 2 ./test_real2 > /dev/null 2>&1" > test_real2.sh
230
	chmod +x test_real2.sh
231

Andreas Marek's avatar
Andreas Marek committed
232
233
test_real2_default_kernel.sh:
	echo "mpiexec -n 2 ./test_real2_default_kernel > /dev/null 2>&1" > test_real2_default_kernel.sh
234
	chmod +x test_real2_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
235
236
237

test_real2_choose_kernel_with_api.sh:
	echo "mpiexec -n 2 ./test_real2_choose_kernel_with_api > /dev/null 2>&1" > test_real2_choose_kernel_with_api.sh
238
	chmod +x test_real2_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
239

240
241
test_complex.sh:
	echo "mpiexec -n 2 ./test_complex > /dev/null 2>&1" > test_complex.sh
242
	chmod +x test_complex.sh
243
244
245

test_complex2.sh:
	echo "mpiexec -n 2 ./test_complex2 > /dev/null 2>&1" > test_complex2.sh
246
	chmod +x test_complex2.sh
Andreas Marek's avatar
Andreas Marek committed
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
test_complex2_default_kernel.sh:
	echo "mpiexec -n 2 ./test_complex2_default_kernel > /dev/null 2>&1" > test_complex2_default_kernel.sh
	chmod +x test_complex2_default_kernel.sh

test_complex2_choose_kernel_with_api.sh:
	echo "mpiexec -n 2 ./test_complex2_choose_kernel_with_api > /dev/null 2>&1" > test_complex2_choose_kernel_with_api.sh
	chmod +x test_complex2_choose_kernel_with_api.sh

print_available_elpa2_kernels.sh:
	echo "./print_available_elpa2_kernels" > print_available_elpa2_kernels.sh
	chmod +x print_available_elpa2_kernels.sh


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

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

266
267
268
269
270
271
272
273
274
275
CLEANFILES = \
	test_real.sh \
	test_real2.sh \
	test_real2_default_kernel.sh \
	test_complex.sh test_complex2.sh \
	test_complex2_default_kernel.sh \
	test_real2_choose_kernel_with_api.sh \
	test_complex2_choose_kernel_with_api.sh \
	print_available_elpa2_kernels.sh \
	elpa2.i \
276
277
278
279
	config-f90.h

clean-local:
	-rm -rf modules .fortran_dependencies
280
281

EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk
282
@FORTRAN_MODULE_DEPS@