Makefile.am 8.1 KB
Newer Older
1
2
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4

3
AM_FCFLAGS = @AM_FCFLAGS@ @FC_MODINC@modules @FC_MODOUT@modules
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AM_LDFLAGS = @AM_LDFLAGS@ @BLACS_LDFLAGS@

BLACS_LDFLAGS = @BLACS_LDFLAGS@

# libelpa
if WITH_OPENMP
lib_LTLIBRARIES = libelpa_mt.la
else
lib_LTLIBRARIES = libelpa.la
endif

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

if WITH_OPENMP
libelpa_mt_la_SOURCES = src/elpa1.F90 src/elpa2.F90
else
libelpa_la_SOURCES = src/elpa1.F90 src/elpa2.F90
endif

Andreas Marek's avatar
Andreas Marek committed
26
if WITH_REAL_GENERIC_KERNEL
27
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
28
  libelpa_mt_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
29
else
Andreas Marek's avatar
Andreas Marek committed
30
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real.f90
31
32
33
endif
endif

Andreas Marek's avatar
Andreas Marek committed
34
if WITH_COMPLEX_GENERIC_KERNEL
35
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
36
  libelpa_mt_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
37
else
Andreas Marek's avatar
Andreas Marek committed
38
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex.f90
39
40
41
endif
endif

Andreas Marek's avatar
Andreas Marek committed
42
if WITH_REAL_GENERIC_SIMPLE_KERNEL
43
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
44
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
45
else
Andreas Marek's avatar
Andreas Marek committed
46
47
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
endif
48
49
endif

Andreas Marek's avatar
Andreas Marek committed
50
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
51
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
52
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
53
else
Andreas Marek's avatar
Andreas Marek committed
54
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
55
56
57
endif
endif

Andreas Marek's avatar
Andreas Marek committed
58
if WITH_REAL_BGP_KERNEL
59
if WITH_OPENMP
60
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
61
else
Andreas Marek's avatar
Andreas Marek committed
62
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
63
endif
64
65
endif

Andreas Marek's avatar
Andreas Marek committed
66
if WITH_REAL_BGQ_KERNEL
67
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
68
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
69
else
Andreas Marek's avatar
Andreas Marek committed
70
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
71
72
73
endif
endif

Andreas Marek's avatar
Andreas Marek committed
74
if WITH_REAL_SSE_KERNEL
75
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
76
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
77
else
Andreas Marek's avatar
Andreas Marek committed
78
79
80
81
82
83
84
85
86
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
endif
else
if WITH_COMPLEX_SSE_KERNEL
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
else
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
endif
87
88
endif
endif
Andreas Marek's avatar
Andreas Marek committed
89
90

if WITH_REAL_AVX_BLOCK2_KERNEL
91
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
92
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
93
else
Andreas Marek's avatar
Andreas Marek committed
94
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
95
96
97
endif
endif

Andreas Marek's avatar
Andreas Marek committed
98
if WITH_REAL_AVX_BLOCK4_KERNEL
99
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
100
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
101
else
Andreas Marek's avatar
Andreas Marek committed
102
 libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
103
104
105
endif
endif

Andreas Marek's avatar
Andreas Marek committed
106
if WITH_REAL_AVX_BLOCK6_KERNEL
107
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
108
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
109
else
Andreas Marek's avatar
Andreas Marek committed
110
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
111
112
113
endif
endif

Andreas Marek's avatar
Andreas Marek committed
114
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
115
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
116
 libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
117
else
Andreas Marek's avatar
Andreas Marek committed
118
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
119
120
121
endif
endif

Andreas Marek's avatar
Andreas Marek committed
122
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
123
if WITH_OPENMP
Andreas Marek's avatar
Andreas Marek committed
124
 libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
125
else
Andreas Marek's avatar
Andreas Marek committed
126
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
127
128
129
endif
endif

Andreas Marek's avatar
Andreas Marek committed
130
131
132
133
134
135
136
137
138
139
#if WITH_AVX_SANDYBRIDGE
#if WITH_OPENMP
#  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
#else
#  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
#endif
#endif

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
if WITH_OPENMP
libelpa_mt_la_LDFLAGS = -version-info $(ELPA_SO_VERSION)
else
libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION)
endif

# install any .mod files in the include/ dir
elpa_includedir = $(includedir)/elpa
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
filesdir = $(datarootdir)
files_DATA = \
	test/read_real.F90 \
	test/read_real_gen.F90 \
	test/test_complex2.F90 \
Andreas Marek's avatar
Andreas Marek committed
156
157
	test/test_complex2_default_kernel.F90 \
	test/test_complex2_choose_kernel_with_api.F90 \
158
159
160
	test/test_complex.F90 \
	test/test_complex_gen.F90 \
	test/test_real2.F90 \
Andreas Marek's avatar
Andreas Marek committed
161
162
163
	test/test_real2_default_kernel.F90 \
	test/test_real2_choose_kernel_with_api.F90 \
	test/print_available_elpa2_kernels.F90 \
164
165
166
	test/test_real.F90 \
	test/test_real_gen.F90

Andreas Marek's avatar
Andreas Marek committed
167
168
# test programs
if WITH_OPENMP
169
build_lib = libelpa_mt.la
Andreas Marek's avatar
Andreas Marek committed
170
else
171
build_lib = libelpa.la
Andreas Marek's avatar
Andreas Marek committed
172
173
endif

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

# test programs

#bindir = $(abs_top_builddir)
Andreas Marek's avatar
Andreas Marek committed
181
182
bin_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 print_available_elpa2_kernels

183
184
185

test_real_SOURCES = test/test_real.F90
test_real_LDADD = $(build_lib)
186
test_real_LDFLAGS = -static
187
188
189

test_real2_SOURCES = test/test_real2.F90
test_real2_LDADD = $(build_lib)
190
test_real2_LDFLAGS = -static
191

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

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

200
201
test_complex_SOURCES = test/test_complex.F90
test_complex_LDADD = $(build_lib)
202
test_complex_LDFLAGS = -static
203
204
205

test_complex2_SOURCES = test/test_complex2.F90
test_complex2_LDADD = $(build_lib)
206
test_complex2_LDFLAGS = -static
207

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

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

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

219
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
220
221
222
223
TESTS = $(check_SCRIPTS)

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

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

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

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
236
	chmod +x test_real2_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
237

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

test_complex2.sh:
	echo "mpiexec -n 2 ./test_complex2 > /dev/null 2>&1" > test_complex2.sh
244
	chmod +x test_complex2.sh
Andreas Marek's avatar
Andreas Marek committed
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
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 $@
260

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

264
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 elpa2.i
265
266

@FORTRAN_MODULE_DEPS@