-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmvapich2.spec
371 lines (321 loc) · 11.9 KB
/
mvapich2.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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# We only compile with gcc, but other people may want other compilers.
# Set the compiler here.
%define opt_cc gcc
# Optional CFLAGS to use with the specific compiler...gcc doesn't need any,
# so uncomment and define to use
#define opt_cflags
%define opt_cxx g++
#define opt_cxxflags
%define opt_f77 gfortran
#define opt_fflags
%define opt_fc gfortran
#define opt_fcflags
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
#define _cc_name_suffix -gcc
%define namearch %{name}-%{_arch}%{?_cc_name_suffix}
%define namepsmarch %{name}-psm-%{_arch}%{?_cc_name_suffix}
%define opt_cflags -O3 -fno-strict-aliasing
%define opt_cxxflags -O3
%ifarch i386
%define opt_cflags -m32 -O3 -fno-strict-aliasing
%define opt_cxxflags -m32 -O3
%define opt_fflags -m32
%define opt_fcflags -m32
%endif
%ifarch x86_64
%define opt_cflags -m64 -O3 -fno-strict-aliasing
%define opt_cxxflags -m64 -O3
%define opt_fflags -m64
%define opt_fcflags -m64
%endif
Summary: OSU MVAPICH2 MPI package
License: BSD
Group: Development/Libraries
Name: mvapich2
Version: 1.6
Release: 3%{?dist}
Source: mvapich2-%{version}-r4751.tar.gz
Source1: mvapich2.module.in
Source2: macros.mvapich2
Source3: macros.mvapich2-psm
URL: http://mvapich.cse.ohio-state.edu/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran
BuildRequires: libibumad-devel, libibverbs-devel >= 1.1.3, librdmacm-devel
BuildRequires: python
BuildRequires: java
Requires: environment-modules
Requires: %{name}-common = %{version}-%{release}
ExcludeArch: s390 s390x
%description
This is an MPI-2 implementation which includes all MPI-1 features. It is
based on MPICH2 and MVICH.
%package common
Summary: Common files for mvapich2
Group: Development/Libraries
BuildArch: noarch
%description common
Contains files that are commen across installations of mvapich2
(Documentation, examples)
%package devel
Group: Development/Libraries
Summary: Development files for mvapich2
Requires: librdmacm-devel, libibverbs-devel, libibumad-devel
Requires: %{name} = %{version}-%{release}, gcc-gfortran
Provides: mpi-devel
%description devel
Contains development headers and libraries for mvapich2
%ifarch x86_64
%package psm
Group: Development/Libraries
Summary: OSU MVAPICH2 using infinipath package
Requires: librdmacm-devel, libibverbs-devel, libibumad-devel
BuildRequires: infinipath-psm-devel
%description psm
This is a version of mvapich2 that uses the QLogic Infinipath transport.
%package psm-devel
Group: Development/Libraries
Summary: Development files for mvapich2
Requires: librdmacm-devel, libibverbs-devel, libibumad-devel
Requires: %{name}-psm = %{version}-%{release}, gcc-gfortran
Provides: mpi-devel
%description psm-devel
Contains development headers and libraries for mvapich2 using Infinipath
%endif
%prep
rm -fr %{buildroot}
%setup -q -n %{name}-%{version}-r4751
%ifarch x86_64
mkdir .psm
cp -r * .psm
%endif
mkdir .non-psm
mv * .non-psm
mv .non-psm non-psm
cd non-psm
./configure \
--prefix=%{_libdir}/%{name} \
--sbindir=%{_libdir}/%{name}/bin \
--mandir=%{_mandir}/%{namearch} \
--includedir=%{_includedir}/%{namearch} \
--sysconfdir=%{_sysconfdir}/%{namearch} \
--datarootdir=%{_datadir} \
--enable-error-checking=runtime \
--enable-timing=none \
--enable-g=mem,dbg,meminit \
--enable-mpe \
--enable-sharedlibs=gcc \
--with-rdma=gen2 \
CC=%{opt_cc} CFLAGS="%{?opt_cflags} $RPM_OPT_FLAGS $XFLAGS" \
CXX=%{opt_cxx} CXXFLAGS="%{?opt_cxxflags} $RPM_OPT_FLAGS $XFLAGS" \
F90=%{opt_fc} F90FLAGS="%{?opt_fcflags} $RPM_OPT_FLAGS $XFLAGS" \
F77=%{opt_f77} FFLAGS="%{?opt_fflags} $RPM_OPT_FLAGS $XFLAGS"
%ifarch x86_64
cd ..
mv .psm psm
cd psm
./configure \
--prefix=%{_libdir}/%{name}-psm \
--sbindir=%{_libdir}/%{name}-psm/bin \
--mandir=%{_mandir}/%{namepsmarch} \
--includedir=%{_includedir}/%{namepsmarch} \
--sysconfdir=%{_sysconfdir}/%{namepsmarch} \
--datarootdir=%{_datadir} \
--enable-error-checking=runtime \
--enable-timing=none \
--enable-g=mem,dbg,meminit \
--enable-mpe \
--enable-sharedlibs=gcc \
--with-device=ch3:psm \
CC=%{opt_cc} CFLAGS="%{?opt_cflags} $RPM_OPT_FLAGS $XFLAGS" \
CXX=%{opt_cxx} CXXFLAGS="%{?opt_cxxflags} $RPM_OPT_FLAGS $XFLAGS" \
F90=%{opt_fc} F90FLAGS="%{?opt_fcflags} $RPM_OPT_FLAGS $XFLAGS" \
F77=%{opt_f77} FFLAGS="%{?opt_fflags} $RPM_OPT_FLAGS $XFLAGS"
%endif
%build
# The mvapich2 build script is not smp safe
cd non-psm
make
%ifarch x86_64
cd ../psm
make
%endif
%install
cd non-psm
make DESTDIR=%{buildroot} install
# find %{buildroot}%{_mandir}/%{namearch} -type f | xargs gzip -9
mkdir %{buildroot}%{_mandir}/%{namearch}/man{1,2,3,4,5,6,7,8,9,n}
# Make the environment-modules file
mkdir -p %{buildroot}%{_sysconfdir}/modulefiles
# Since we're doing our own substitution here, use our own definitions.
sed 's#@LIBDIR@#'%{_libdir}/%{name}'#g;s#@ETCDIR@#'%{_sysconfdir}/%{namearch}'#g;s#@FMODDIR@#'%{_fmoddir}/%{namearch}'#g;s#@INCDIR@#'%{_includedir}/%{namearch}'#g;s#@MANDIR@#'%{_mandir}/%{namearch}'#g;s#@PYSITEARCH@#'%{python_sitearch}/%{name}'#g;s#@COMPILER@#%{name}-'%{_arch}%{?_cc_name_suffix}'#g;s#@SUFFIX@#'%{?_cc_name_suffix}'_%{name}#g' < %SOURCE1 > %{buildroot}%{_sysconfdir}/modulefiles/%{namearch}
# make the rpm config file
mkdir -p %{buildroot}/%{_sysconfdir}/rpm
cp %SOURCE2 %{buildroot}/%{_sysconfdir}/rpm/macros.%{namearch}
mkdir -p %{buildroot}/%{_fmoddir}/%{namearch}
mkdir -p %{buildroot}/%{python_sitearch}/%{name}%{?_cc_name_suffix}
rm %{buildroot}%{_libdir}/%{name}/bin/mpeuninstall
# These are included in the mpitests rpm
# and they are built here with a bogus rpath
rm -r %{buildroot}%{_libdir}/%{name}/libexec/osu-micro-benchmarks
%ifarch x86_64
cd ../psm
make DESTDIR=%{buildroot} install
# find %{buildroot}%{_mandir}/%{namepsmarch} -type f | xargs gzip -9
mkdir %{buildroot}%{_mandir}/%{namepsmarch}/man{1,2,3,4,5,6,7,8,9,n}
# Make the environment-modules file
# Since we're doing our own substitution here, use our own definitions.
sed 's#@LIBDIR@#'%{_libdir}/%{name}-psm'#g;s#@ETCDIR@#'%{_sysconfdir}/%{namepsmarch}'#g;s#@FMODDIR@#'%{_fmoddir}/%{namepsmarch}'#g;s#@INCDIR@#'%{_includedir}/%{namepsmarch}'#g;s#@MANDIR@#'%{_mandir}/%{namepsmarch}'#g;s#@PYSITEARCH@#'%{python_sitearch}/%{name}-psm'#g;s#@COMPILER@#%{name}-psm-'%{_arch}%{?_cc_name_suffix}'#g;s#@SUFFIX@#'%{?_cc_name_suffix}'_%{name}-psm#g' < %SOURCE1 > %{buildroot}%{_sysconfdir}/modulefiles/%{namepsmarch}
# make the rpm config file
cp %SOURCE3 %{buildroot}/%{_sysconfdir}/rpm/macros.%{namepsmarch}
mkdir -p %{buildroot}/%{_fmoddir}/%{namepsmarch}
mkdir -p %{buildroot}/%{python_sitearch}/%{name}-psm%{?_cc_name_suffix}
rm %{buildroot}%{_libdir}/%{name}-psm/bin/mpeuninstall
# These are included in the mpitests rpm
# and they are built here with a bogus rpath
rm -r %{buildroot}%{_libdir}/%{name}-psm/libexec/osu-micro-benchmarks
%endif
rm -f %{buildroot}/%{_libdir}/%{name}*/lib/*.la
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}
%dir %{_sysconfdir}/%{namearch}
%dir %{_libdir}/%{name}/bin
%dir %{_libdir}/%{name}/lib
%dir %{_libdir}/%{name}/libexec
%dir %{_mandir}/%{namearch}
%dir %{_mandir}/%{namearch}/man*
%dir %{_fmoddir}/%{namearch}
%dir %{python_sitearch}/%{name}
%config(noreplace) %{_sysconfdir}/%{namearch}/*
%{_libdir}/%{name}/bin/*
%{_libdir}/%{name}/lib/*.so.*
%{_libdir}/%{name}/lib/*.jar
# %{_libdir}/%{name}/libexec/*
# %{_mandir}/%{namearch}/man1/*
# %{_mandir}/%{namearch}/man3/*
# %{_mandir}/%{namearch}/man4/*
%{_sysconfdir}/modulefiles/%{namearch}
%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/%{namearch}
%{_includedir}/%{namearch}/*
%{_sysconfdir}/rpm/macros.%{namearch}
%{_libdir}/%{name}/lib/mpe_prof.o
%{_libdir}/%{name}/lib/pkgconfig
%{_libdir}/%{name}/lib/*.a
%{_libdir}/%{name}/lib/*.so
%files common
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}
%dir %{_datadir}/doc/%{name}
%dir %{_datadir}/doc/openpa
%{_datadir}/%{name}/*
%{_datadir}/doc/%{name}/*
%{_datadir}/doc/openpa/*
%ifarch x86_64
%files psm
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}-psm
%dir %{_sysconfdir}/%{namepsmarch}
%dir %{_libdir}/%{name}-psm/bin
%dir %{_libdir}/%{name}-psm/lib
%dir %{_libdir}/%{name}-psm/libexec
%dir %{_mandir}/%{namepsmarch}
%dir %{_mandir}/%{namepsmarch}/man*
%dir %{_fmoddir}/%{namepsmarch}
%dir %{python_sitearch}/%{name}-psm
%config(noreplace) %{_sysconfdir}/%{namepsmarch}/*
%{_libdir}/%{name}-psm/bin/*
%{_libdir}/%{name}-psm/lib/*.so.*
%{_libdir}/%{name}-psm/lib/*.jar
# %{_libdir}/%{name}-psm/libexec/*
# %{_mandir}/%{namepsmarch}/man1/*
# %{_mandir}/%{namepsmarch}/man3/*
# %{_mandir}/%{namepsmarch}/man4/*
%{_sysconfdir}/modulefiles/%{namepsmarch}
%files psm-devel
%defattr(-,root,root,-)
%dir %{_includedir}/%{namepsmarch}
%{_includedir}/%{namepsmarch}/*
%{_sysconfdir}/rpm/macros.%{namepsmarch}
%{_libdir}/%{name}-psm/lib/mpe_prof.o
%{_libdir}/%{name}-psm/lib/pkgconfig
%{_libdir}/%{name}-psm/lib/*.a
%{_libdir}/%{name}-psm/lib/*.so
%endif
%changelog
* Fri Aug 19 2011 Jay Fenlason <[email protected]> 1.6-3.el6
- Change the requires on mvapich2-psm-devel to mvapich2-psm from mvapich2
so that mpitests will build
- clean up the build to not use .{non-}psm directories.
Related: rhbz725016
* Wed Aug 17 2011 Jay Fenlason <[email protected]> 1.6-2.el6
- Fix the psm RPM macros so that we can build a -psm variant of
mpitests
- remove the osu-micro-benchmarks, which are being installed with a
bogus rpath, and which are included in mpitests
Related: rhbz725016
* Mon Aug 15 2011 Jay Fenlason <[email protected]> 1.6-1.el6
- New upstream release, with different build process, and without
man pages, because we don't have the sowing package, and its
licensing status is unclear (no licence description of any kind in
the tarball).
Related: rhbz725016
* Mon Jun 7 2010 Jay Fenlason <[email protected]> 1.4-5.el6
- Forgot the BuildRequires
Related: rhbz570274
* Mon Jun 7 2010 Jay Fenlason <[email protected]>
- Add support for -psm subpackages on x86_64.
Related: rhbz570274
* Tue Mar 2 2010 Jay Fenlason <[email protected]> 1.4-4.el6
- Move -devel requires to the -devel subpackage.
Resolves: bz568450
- Add defattr as required by packaging guidelines
Related: bz555835
* Fri Jan 15 2010 Doug Ledford <[email protected]> - 1.4-3.el6
- Fix an issue with usage of _cc_name_suffix that caused a broken define in
our module file
Related: bz543948
* Fri Jan 15 2010 Jay Fenlason <[email protected]> 1.4-2.el6
- Add BuildRequires: python
- Add BuildRequires: java
- Remove the pkgconfig file entirely
Related: bz543948
* Thu Jan 14 2010 Jay Fenlason <[email protected]>
- Add Group: to -devel
- Split into subpackages as required by packaging guidelines
- cleanup BuildRequires
- attempt to build on ppc
- cleanup spec file
- cleanup mvapich2.pc, still not correct, but closer
Related: bz543948
* Thu Jan 14 2010 Jay Fenlason <[email protected]>
- New EnvironmentModules version for RHEL-6
Related: bz543948
* Tue Dec 22 2009 Doug Ledford <[email protected]> - 1.4-1.el5
- Update to latest upstream version
- Related: bz518218
* Mon Jun 22 2009 Doug Ledford <[email protected]> - 1.2-0.p1.3.el5
- Rebuild against libibverbs that isn't missing the proper ppc wmb() macro
- Related: bz506258
* Sun Jun 21 2009 Doug Ledford <[email protected]> - 1.2-0.p1.2.el5
- Compile against non-XRC libibverbs
- Related: bz506258
* Wed Apr 22 2009 Doug Ledford <[email protected]> - 1.2-0.p1.1
- Update to ofed 1.4.1-rc3 version
- Related: bz459652
* Thu Oct 16 2008 Doug Ledford <[email protected]> - 1.0.3-3
- Make sure MPD_BIN is set in the mpivars files
- Related: bz466390
* Fri Oct 03 2008 Doug Ledford <[email protected]> - 1.0.3-2
- Make scriptlets match mvapich
- Include a Requires(post) and Requires(preun) so installs work properly
- Resolves: bz465448
* Thu Sep 18 2008 Doug Ledford <[email protected]> - 1.0.3-1
- Initial rhel5 package
- Resolves: bz451477
* Sun May 04 2008 Jonathan Perkins <[email protected]>
- Created initial MVAPICH2 1.0.3 SRPM with IB and iWARP support.