-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfftw.spec
280 lines (246 loc) · 9.06 KB
/
fftw.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#
# This file is auto-generated. DO NOT EDIT
# Generated by: autospec.py
#
Name : fftw
Version : 3.3.8
Release : 32
URL : http://www.fftw.org/fftw-3.3.8.tar.gz
Source0 : http://www.fftw.org/fftw-3.3.8.tar.gz
Summary : fast Fourier transform library
Group : Development/Tools
License : GPL-2.0
Requires: fftw-bin = %{version}-%{release}
Requires: fftw-info = %{version}-%{release}
Requires: fftw-lib = %{version}-%{release}
Requires: fftw-license = %{version}-%{release}
Requires: fftw-man = %{version}-%{release}
BuildRequires : gfortran
BuildRequires : openmpi-dev
BuildRequires : openssh
BuildRequires : texinfo
Patch1: avx512-alignment.patch
%description
FFTW is a free collection of fast C routines for computing the
Discrete Fourier Transform in one or more dimensions. It includes
complex, real, symmetric, and parallel transforms, and can handle
arbitrary array sizes efficiently. FFTW is typically faster than
other publically-available FFT implementations, and is even
competitive with vendor-tuned libraries. (See our web page
http://fftw.org/ for extensive benchmarks.) To achieve this
performance, FFTW uses novel code-generation and runtime
self-optimization techniques (along with many other tricks).
%package bin
Summary: bin components for the fftw package.
Group: Binaries
Requires: fftw-license = %{version}-%{release}
%description bin
bin components for the fftw package.
%package dev
Summary: dev components for the fftw package.
Group: Development
Requires: fftw-lib = %{version}-%{release}
Requires: fftw-bin = %{version}-%{release}
Provides: fftw-devel = %{version}-%{release}
Requires: fftw = %{version}-%{release}
%description dev
dev components for the fftw package.
%package info
Summary: info components for the fftw package.
Group: Default
%description info
info components for the fftw package.
%package lib
Summary: lib components for the fftw package.
Group: Libraries
Requires: fftw-license = %{version}-%{release}
%description lib
lib components for the fftw package.
%package license
Summary: license components for the fftw package.
Group: Default
%description license
license components for the fftw package.
%package man
Summary: man components for the fftw package.
Group: Default
%description man
man components for the fftw package.
%prep
%setup -q -n fftw-3.3.8
cd %{_builddir}/fftw-3.3.8
%patch1 -p1
%build
export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/
export no_proxy=localhost,127.0.0.1,0.0.0.0
export LANG=C.UTF-8
export SOURCE_DATE_EPOCH=1586567660
export GCC_IGNORE_WERROR=1
export AR=gcc-ar
export RANLIB=gcc-ranlib
export NM=gcc-nm
export CFLAGS="$CFLAGS -O3 -ffat-lto-objects -flto=4 "
export FCFLAGS="$FFLAGS -O3 -ffat-lto-objects -flto=4 "
export FFLAGS="$FFLAGS -O3 -ffat-lto-objects -flto=4 "
export CXXFLAGS="$CXXFLAGS -O3 -ffat-lto-objects -flto=4 "
make %{?_smp_mflags} -n ||:
%install
export SOURCE_DATE_EPOCH=1586567660
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/package-licenses/fftw
cp %{_builddir}/fftw-3.3.8/COPYING %{buildroot}/usr/share/package-licenses/fftw/68c94ffc34f8ad2d7bfae3f5a6b996409211c1b1
cp %{_builddir}/fftw-3.3.8/COPYRIGHT %{buildroot}/usr/share/package-licenses/fftw/1179609f742d35f1bcbf4ad694f371d64ee257ea
cp %{_builddir}/fftw-3.3.8/doc/html/License-and-Copyright.html %{buildroot}/usr/share/package-licenses/fftw/417539058454b49d5d54dce3c6f2ce2d766fa902
cp %{_builddir}/fftw-3.3.8/doc/license.texi %{buildroot}/usr/share/package-licenses/fftw/ee99393637fb0b0a5df385deac9040c5305f38b2
:
## install_append content
CFLAGS_IN="$CFLAGS -ffunction-sections -falign-functions=32 -O3 -flto -fno-semantic-interposition "
CXXFLAGS_IN="$CXXFLAGS -ffunction-sections -falign-functions=32 -O3 -flto -fno-semantic-interposition "
for build in \
"single,--enable-float,--enable-sse2,--libdir=/usr/lib64" \
"double,--enable-sse2,--libdir=/usr/lib64" \
"long-double,--enable-long-double,--libdir=/usr/lib64" \
"single-avx2,--enable-float,--enable-avx2,--enable-fma,--libdir=/usr/lib64/haswell" \
"double-avx2,--enable-avx2,--enable-fma,--libdir=/usr/lib64/haswell" \
"single-avx512,--enable-float,--enable-avx2,--enable-avx512,--enable-fma,--libdir=/usr/lib64/haswell/avx512_1" \
"double-avx512,--enable-avx2,--enable-avx512,--enable-fma,--libdir=/usr/lib64/haswell/avx512_1" \
"single-mpi,--enable-mpi,--enable-float,--enable-sse2,--libdir=/usr/lib64" \
"double-mpi,--enable-mpi,--enable-sse2,--libdir=/usr/lib64" \
"long-double-mpi,--enable-mpi,--enable-long-double,--libdir=/usr/lib64" \
"single-avx2-mpi,--enable-mpi,--enable-float,--enable-avx2,--enable-fma,--libdir=/usr/lib64/haswell" \
"double-avx2-mpi,--enable-mpi,--enable-avx2,--enable-fma,--libdir=/usr/lib64/haswell" \
"single-avx512-mpi,--enable-mpi,--enable-float,--enable-avx2,--enable-avx512,--enable-fma,--libdir=/usr/lib64/haswell/avx512_1" \
"double-avx512-mpi,--enable-mpi,--enable-avx2,--enable-avx512,--enable-fma,--libdir=/usr/lib64/haswell/avx512_1" ; \
do
skip_test=0
dir=$(echo $build | cut -d, -f1)
flags=$(echo $build | cut -d, -f2- | sed 's/,/ /g')
lib_path=$(echo $build | cut -d= -f1 --complement)
if echo $flags | grep -q avx512; then
export CFLAGS="$CFLAGS_IN -march=skylake-avx512"
export CXXFLAGS="$CXXFLAGS_IN -march=skylake-avx512"
grep -q 'avx512[^ ]*' /proc/cpuinfo || skip_test=1
elif echo $flags | grep -q avx2; then
export CFLAGS="$CFLAGS_IN -march=haswell -mtune=haswell"
export CXXFLAGS="$CXXFLAGS_IN -march=haswell -mtune-haswell"
grep -q 'avx2[^ ]*' /proc/cpuinfo || skip_test=1
else
export CFLAGS="$CFLAGS_IN"
export CXXFLAGS="$CXXFLAGS_IN"
fi
mkdir build-$dir
pushd build-$dir
../configure --disable-static --enable-shared --enable-threads --enable-openmp \
--prefix=/usr --sysconfdir=/etc --localstatedir=/var \
$flags
make V=1 %{?_smp_mflags}
%make_install
if [ $skip_test -eq 0 ]; then
echo "**** Testing $dir CFLAGS:$CFLAGS "
LD_LIBRARY_PATH=%{buildroot}$lib_path make check
fi
popd
done
find %{buildroot}/usr/lib64 -name 'FFTW3*.cmake' -exec rm {} \;
## install_append end
%files
%defattr(-,root,root,-)
%files bin
%defattr(-,root,root,-)
/usr/bin/fftw-wisdom
/usr/bin/fftw-wisdom-to-conf
/usr/bin/fftwf-wisdom
/usr/bin/fftwl-wisdom
%files dev
%defattr(-,root,root,-)
/usr/include/fftw3-mpi.f03
/usr/include/fftw3-mpi.h
/usr/include/fftw3.f
/usr/include/fftw3.f03
/usr/include/fftw3.h
/usr/include/fftw3l-mpi.f03
/usr/include/fftw3l.f03
/usr/include/fftw3q.f03
/usr/lib64/haswell/avx512_1/libfftw3.so
/usr/lib64/haswell/avx512_1/libfftw3_mpi.so
/usr/lib64/haswell/avx512_1/libfftw3f.so
/usr/lib64/haswell/avx512_1/libfftw3f_mpi.so
/usr/lib64/haswell/libfftw3.so
/usr/lib64/haswell/libfftw3_mpi.so
/usr/lib64/haswell/libfftw3f.so
/usr/lib64/haswell/libfftw3f_mpi.so
/usr/lib64/libfftw3.so
/usr/lib64/libfftw3_mpi.so
/usr/lib64/libfftw3_omp.so
/usr/lib64/libfftw3_threads.so
/usr/lib64/libfftw3f.so
/usr/lib64/libfftw3f_mpi.so
/usr/lib64/libfftw3f_omp.so
/usr/lib64/libfftw3f_threads.so
/usr/lib64/libfftw3l.so
/usr/lib64/libfftw3l_mpi.so
/usr/lib64/libfftw3l_omp.so
/usr/lib64/libfftw3l_threads.so
/usr/lib64/pkgconfig/fftw3.pc
/usr/lib64/pkgconfig/fftw3f.pc
/usr/lib64/pkgconfig/fftw3l.pc
%files info
%defattr(0644,root,root,0755)
/usr/share/info/fftw3.info
/usr/share/info/fftw3.info-1
/usr/share/info/fftw3.info-2
%files lib
%defattr(-,root,root,-)
/usr/lib64/haswell/avx512_1/libfftw3.so.3
/usr/lib64/haswell/avx512_1/libfftw3.so.3.5.8
/usr/lib64/haswell/avx512_1/libfftw3_mpi.so.3
/usr/lib64/haswell/avx512_1/libfftw3_mpi.so.3.5.8
/usr/lib64/haswell/avx512_1/libfftw3f.so.3
/usr/lib64/haswell/avx512_1/libfftw3f.so.3.5.8
/usr/lib64/haswell/avx512_1/libfftw3f_mpi.so.3
/usr/lib64/haswell/avx512_1/libfftw3f_mpi.so.3.5.8
/usr/lib64/haswell/libfftw3.so.3
/usr/lib64/haswell/libfftw3.so.3.5.8
/usr/lib64/haswell/libfftw3_mpi.so.3
/usr/lib64/haswell/libfftw3_mpi.so.3.5.8
/usr/lib64/haswell/libfftw3f.so.3
/usr/lib64/haswell/libfftw3f.so.3.5.8
/usr/lib64/haswell/libfftw3f_mpi.so.3
/usr/lib64/haswell/libfftw3f_mpi.so.3.5.8
/usr/lib64/libfftw3.so.3
/usr/lib64/libfftw3.so.3.5.8
/usr/lib64/libfftw3_mpi.so.3
/usr/lib64/libfftw3_mpi.so.3.5.8
/usr/lib64/libfftw3_omp.so.3
/usr/lib64/libfftw3_omp.so.3.5.8
/usr/lib64/libfftw3_threads.so.3
/usr/lib64/libfftw3_threads.so.3.5.8
/usr/lib64/libfftw3f.so.3
/usr/lib64/libfftw3f.so.3.5.8
/usr/lib64/libfftw3f_mpi.so.3
/usr/lib64/libfftw3f_mpi.so.3.5.8
/usr/lib64/libfftw3f_omp.so.3
/usr/lib64/libfftw3f_omp.so.3.5.8
/usr/lib64/libfftw3f_threads.so.3
/usr/lib64/libfftw3f_threads.so.3.5.8
/usr/lib64/libfftw3l.so.3
/usr/lib64/libfftw3l.so.3.5.8
/usr/lib64/libfftw3l_mpi.so.3
/usr/lib64/libfftw3l_mpi.so.3.5.8
/usr/lib64/libfftw3l_omp.so.3
/usr/lib64/libfftw3l_omp.so.3.5.8
/usr/lib64/libfftw3l_threads.so.3
/usr/lib64/libfftw3l_threads.so.3.5.8
%files license
%defattr(0644,root,root,0755)
/usr/share/package-licenses/fftw/1179609f742d35f1bcbf4ad694f371d64ee257ea
/usr/share/package-licenses/fftw/417539058454b49d5d54dce3c6f2ce2d766fa902
/usr/share/package-licenses/fftw/68c94ffc34f8ad2d7bfae3f5a6b996409211c1b1
/usr/share/package-licenses/fftw/ee99393637fb0b0a5df385deac9040c5305f38b2
%files man
%defattr(0644,root,root,0755)
/usr/share/man/man1/fftw-wisdom-to-conf.1
/usr/share/man/man1/fftw-wisdom.1
/usr/share/man/man1/fftwf-wisdom.1
/usr/share/man/man1/fftwl-wisdom.1