File mpich.spec of Package mpich
#
# spec file for package mpich (Version 1.2.7p1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: mpich
BuildRequires: gcc-c++ gcc-fortran gdb
%if %suse_version > 1020
BuildRequires: fdupes
%endif
License: Any permissive
Group: Development/Libraries/Parallel
Url: http://www-unix.mcs.anl.gov/mpi/mpich/
Version: 1.2.7p1
Release: 126
Summary: A Portable Implementation of MPI
Source: mpich-%{version}.tar.bz2
Source2: machines.LINUX
#Source3: permissions
Source4: mpich-ch_p4.module
Source5: mpich-ch_p4mpd.module
Patch: mpich-1.2.6.dif
Patch2: mpich-1.2.6-limits.patch
Patch3: gcc4.dif
Patch4: alog-bufferoverflow.patch
Patch5: mpich-1.2.6_implicit_declarations.diff
Patch6: mpeinstall.patch
#Patch10: mpich-1.2.5-sysconfdir.patch
#Patch13: mpich-1.2.5-destdir.patch
#Patch15: patch.all
Patch10: mpich-mpiman.patch
Patch11: mpich-1.2.7_bsendutil2.c_uninitialized_variables.patch
Patch12: gfortran.patch
Patch13: mpich-1.2.7p1-iostream.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: openssh, Modules
AutoReqProv: on
%define _mpich_root /opt/mpich
%define gnu 1
%define absoft 0
%define intel 0
%define pgi 0
%define lahey 0
%define nag 0
%define debug 0
#
# Pick the device. The ch_p4mpd device is recommended for clusters of
# uniprocessors; the ch_p4 device with comm=shared is appropriate for
# clusters of SMPs.
%define devices ch_p4mpd ch_p4
%define other_device_opts %{nil}
#
# Define this to +pvfs if pvfs is available.
%define other_file_systems %{nil}
%define rel 1
#
# These definitions are approximate. They are taken in part from the
# mpich-scyld.spec file, though the choices here rely more on the MPICH
# configure to find the correct options for the compilers. Not all have
# been tested (we don't have access to the Lahey compiler, for example).
%if %{gnu}
%define c_compiler gcc
%define compiler_path /usr/bin
%define setenvs export FC=gfortran; export F77_GETARGDECL="intrinsic GETARG"
%define fopts %{nil}
%define extralibs %{nil}
%define extraldopts %{nil}
%endif
%if %{intel}
%define c_compiler icc
%define compiler_path /opt/intel/compiler50/ia32
%define setenvs export PATH=$PATH:%{compiler_path}/bin; export LD_LIBRARY_PATH=%{compiler_path}/lib; export FC=%{compiler_path}/bin/ifc; export F90=$FC
%define fopts -fflags="-Vaxlib "
%define extralibs %{nil}
%define extraldopts -L%{compiler_path}/lib -lPEPCF90 -lIEPCF90 -lF90 %{compiler_path}/lib/libintrins.a
%endif
%if %{pgi}
%define c_compiler pgicc
%define compiler_path /usr/pgi/linux86
%define setenvs export PATH=$PATH:%{compiler_path}/bin; export PGI=%{compiler_path}/..; export CC="%{compiler_path}/bin/pgcc"; export FC="/usr/pgi/linux86/bin/pgf77"; export F90="%{compiler_path}/bin/pgf90"
%define fopts %{nil}
%define extralibs -L%{compiler_path}/lib -lpgc
%define extraldopts -L%{compiler_path}/lib -lpgc
%endif
%description
MPICH is a freely available, portable implementation of MPI, the
standard for message-passing libraries.
Authors:
--------
Bill Gropp <gropp@mcs.anl.gov>
Rusty Lusk <lusk@mcs.anl.gov>
%package devel
Summary: A Portable Implementation of MPI
Group: Development/Libraries/Parallel
AutoReqProv: on
Requires: mpich
Provides: mpich-doc
Obsoletes: mpich-doc
%description devel
MPICH is a freely available, portable implementation of MPI, the
Standard for message-passing libraries. This package contains manpages,
headers and libraries needed for developing MPI applications
Authors:
--------
Bill Gropp <gropp@mcs.anl.gov>
Rusty Lusk <lusk@mcs.anl.gov>
%prep
%setup -q
%patch
%patch2
%patch3
%patch4
%patch5
%patch6
%patch10
%patch11
%patch12
%patch13
%build
%setenvs
# update
DIRS=$(find -type d)
%{?suse_update_config:%{suse_update_config -f $DIRS}}
[ -f configure.in ] && libtoolize --copy --force;
autoreconf --force --install
# configure options
for device in %{devices}; do
INST=$(echo $device| sed -e "s@_@-@")
test -d image_$device || mkdir image_$device; cd image_$device
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
../configure \
-rsh=/usr/bin/ssh \
--enable-c++ \
-cflags="$RPM_OPT_FLAGS -fno-strict-aliasing -Impid/mpd/ -Iinclude" \
--with-common-prefix=/opt/mpich \
--libdir=/opt/mpich/$INST/%_lib \
--includedir=/opt/mpich/include \
-mpe_opts="--libdir=/opt/mpich/$INST/%_lib" \
--with-romio=--with-file-system=nfs+ufs%{other_file_systems} \
%if %{debug}
--enable-devdebug \
--enable-debug \
%endif
--with-device=$device \
-prefix=/opt/mpich/$INST \
--enable-sharedlib
# make
make
cd ../
done
%install
install -d $RPM_BUILD_ROOT/var/log/mpich
# install the normal version.
for device in %{devices}; do
INST=$(echo $device| sed -e "s@_@-@");
(cd image_$device && \
DESTDIR=$RPM_BUILD_ROOT make install MPIINSTALL_OPTS="-manpath=%{_mpich_root}/man -datapath=%{_mpich_root}/share" -libdir=%{_mpich_root}/%_lib
)
done
# NOW: We have all the dirs up, and working.
install -d $RPM_BUILD_ROOT/%_defaultdocdir/mpich
cp -a $RPM_BUILD_ROOT/%{_mpich_root}/ch-p4/doc/* $RPM_BUILD_ROOT/%_defaultdocdir/mpich
cp -a $RPM_BUILD_ROOT/%{_mpich_root}/ch-p4/share/examples $RPM_BUILD_ROOT/%_defaultdocdir/mpich/
# fix things up for MPICH ... it installs files in a very ugly way
for device in %{devices} ; do
INST=$(echo $device| sed -e "s@_@-@")
for A in mpiuninstall chkserv ; do rm -f $RPM_BUILD_ROOT/%{_mpich_root}/$INST/sbin/$A; done
rm -rf $RPM_BUILD_ROOT/%{_mpich_root}/$INST/www
cp $RPM_BUILD_ROOT/%{_mpich_root}/$INST/examples/Makefile $RPM_BUILD_ROOT/%_defaultdocdir/mpich/examples/Makefile.$INST
rm -rf $RPM_BUILD_ROOT/%{_mpich_root}/$INST/examples
rm -rf $RPM_BUILD_ROOT/%{_mpich_root}/$INST/share/examples
rm -rf $RPM_BUILD_ROOT/%{_mpich_root}/$INST/doc
rm -rf $RPM_BUILD_ROOT/%{_mpich_root}/$INST/include
ln -sf ../include $RPM_BUILD_ROOT/%{_mpich_root}/$INST/
done
cp %{SOURCE2} $RPM_BUILD_ROOT/%{_mpich_root}/share//machines.LINUX
# fixing mpd binaries.
for bin in mpdallexit mpdbomb mpdclean mpdcleanup mpddump mpdexit mpdhelp \
mpdkilljob mpdlistjobs mpdmandump mpdmpexec mpdringsize mpdringtest mpdshutdown mpdtrace mpigdb mpirun ; do \
ln -sf mpdcon $RPM_BUILD_ROOT/%{_mpich_root}/ch-p4mpd/bin/$bin; done
install -m 644 COPYRIGHT $RPM_BUILD_ROOT/%_defaultdocdir/mpich
## create file lists
find $RPM_BUILD_ROOT/opt/mpich/ch-*/etc -type f -print | sed "s@^$RPM_BUILD_ROOT@@g" > filelist
find $RPM_BUILD_ROOT/opt/mpich/ch-*/{bin,sbin} -type f -print | sed \
"s@^$RPM_BUILD_ROOT@%attr\(755,root,root\)@g" | grep -v mpicc | grep -v mpicxx | grep -v mpif77 | grep -v mpiuninstall >> filelist
find $RPM_BUILD_ROOT/opt/mpich/ch-*/{bin,sbin} -type l -print | sed "s@^$RPM_BUILD_ROOT@@g" >> filelist
install -d $RPM_BUILD_ROOT/usr/share/modules/modulefiles
install -m 644 %{S:4} $RPM_BUILD_ROOT/usr/share/modules/modulefiles/mpich-ch-p4
install -m 644 %{S:5} $RPM_BUILD_ROOT/usr/share/modules/modulefiles/mpich-ch-p4mpd
export manpath="$manpath /opt/mpich/man"
rm -f $RPM_BUILD_ROOT/%{_mpich_root}/{machines.LINUX,Makefile.sample}
rm -f $RPM_BUILD_ROOT/%{_mpich_root}/man/mandesc
rm -f $RPM_BUILD_ROOT/%{_mpich_root}/man/*/depcomp
%if %suse_version > 1020
%fdupes -s $RPM_BUILD_ROOT
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
%run_ldconfig
%postun
%run_ldconfig
%files -f filelist
%defattr(-,root,root,755)
%doc doc/*.pdf COPYRIGHT KnownBugs README
%dir /usr/share/modules
%dir /var/log/mpich
%dir /usr/share/modules/modulefiles
/usr/share/modules/modulefiles/mpich*
%dir %{_mpich_root}
%dir %{_mpich_root}/ch-*
%dir %{_mpich_root}/ch-*/bin
%dir %{_mpich_root}/ch-*/etc
%dir %{_mpich_root}/ch-*/%_lib
%dir %{_mpich_root}/ch-*/%_lib/shared
%dir %{_mpich_root}/ch-*//sbin
%{_mpich_root}/ch-*/%_lib/*.so.*
%dir %{_mpich_root}/share
%{_mpich_root}/share/*
%dir %{_mpich_root}/man
%dir %{_mpich_root}/man/man1
%doc %{_mpich_root}/man/man1/Jumpshots.1.gz
%doc %{_mpich_root}/man/man1/MPI.1.gz
%doc %{_mpich_root}/man/man1/chp4_servs.1.gz
%doc %{_mpich_root}/man/man1/cleanipcs.1.gz
%doc %{_mpich_root}/man/man1/mpiman.1.gz
%doc %{_mpich_root}/man/man1/mpireconfig.1.gz
%doc %{_mpich_root}/man/man1/mpirun.1.gz
%doc %{_mpich_root}/man/man1/tstmachines.1.gz
%files devel
%defattr(-,root,root,755)
%dir %{_mpich_root}/man/man3
%doc %{_mpich_root}/man/man3/*.3*
%dir %{_mpich_root}/man/man4
%doc %{_mpich_root}/man/man4/*.4*
%doc %{_mpich_root}/man/man1/mpiCC.1.gz
%doc %{_mpich_root}/man/man1/mpicc.1.gz
%doc %{_mpich_root}/man/man1/mpif77.1.gz
%doc %{_mpich_root}/man/man1/mpif90.1.gz
%doc COPYRIGHT www/*
%dir %{_mpich_root}/include
%dir %{_mpich_root}/include/mpi2c++
%dir %{_mpich_root}/include/f90base
%dir %{_mpich_root}/include/f90choice
%{_mpich_root}/include/mpi2c++/*.h
%{_mpich_root}/include/*.h
%{_mpich_root}/include/f90base/*.mod
%{_mpich_root}/include/f90choice/*.mod
# sym link
%{_mpich_root}/ch-*/include
%{_mpich_root}/ch-*/%_lib/*.a
%{_mpich_root}/ch-*/%_lib/*.o
%{_mpich_root}/ch-*/%_lib/*.so
%{_mpich_root}/ch-*/%_lib/shared/*.so*
%{_mpich_root}/ch-*/bin/mpicc
%{_mpich_root}/ch-*/bin/mpicxx
%{_mpich_root}/ch-*/bin/mpif77
%changelog
* Tue Jan 29 2008 aj@suse.de
- Fix c++ compilation.
* Thu May 24 2007 stbinner@suse.de
- add missing %%run_ldconfig calls
- use %%fdupes
* Sat Mar 31 2007 aj@suse.de
- Remove unnneeded BuildRequires.
* Wed Mar 08 2006 mrueckert@suse.de
- move the man pages for the compilers into the devel package
aswell (#132558)
* Fri Jan 27 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 24 2006 rguenther@suse.de
- make configury work with gfortran.
- re-enable fortran support and update packaged files.
* Mon Jan 16 2006 mrueckert@suse.de
- update to version 1.2.7p1
- added mpich-1.2.7_bsendutil2.c_uninitialized_variables.patch
* Wed Dec 21 2005 ro@suse.de
- addded library .so symlinks to filelist
* Mon Sep 19 2005 mrueckert@suse.de
- Fixed compiler warnings about implicit declarations.
- fixed patches to apply cleanly against 1.2.7
* Fri Aug 19 2005 mrueckert@suse.de
- mpiman now defaults to "man" instead of "xman"
now it works without passing any parameter too.
* Mon Jul 04 2005 mrueckert@suse.de
- Updated to version 1.2.7
- Added small patch against a buffer overflow in the log handler.
- Compile with -fno-strict-aliasing
- Use RPM_OPT_FLAGS
* Sun Apr 24 2005 aj@suse.de
- Compile with GCC4, disable g77.
* Mon Aug 16 2004 nashif@suse.de
- Update to 1.2.6
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Mon Jan 05 2004 nashif@suse.de
- update to 1.5.2.2
- fixed bug #33381: unnecessary s bit on mpdcon
* Fri Jun 13 2003 kukuk@suse.de
- Add missing directories to filelist
* Thu May 29 2003 nashif@suse.de
- Compile ch_p4mpd in addition to default ch_p4
- Reworked file list
* Thu Jan 09 2003 nashif@suse.de
- Update to 1.2.5
* Wed Nov 20 2002 ro@suse.de
- use java2
* Sun Aug 04 2002 nashif@suse.de
- Update to 1.2.4
- Move to /opt to avoid path problems with lib64
- re-added module file
* Mon Jun 24 2002 ro@suse.de
- fix permissions for doc directories
* Tue Jun 18 2002 mls@suse.de
- delete bogus config.* files in examples directory
* Thu May 16 2002 meissner@suse.de
- Another fix for lib64 (or we include %%buildroot paths in mpicc)
* Tue May 14 2002 ro@suse.de
- fix for lib64
* Sat Feb 09 2002 nashif@suse.de
- -doc provides and obsoletes -manpages
* Thu Feb 07 2002 nashif@suse.de
- Use RPM_BUILD_ROOT variable instead of actual value
* Sat Feb 02 2002 nashif@suse.de
- Removed rpm_build_root references from scripts
* Fri Feb 01 2002 nashif@suse.de
- Update to version 1.2.3
- splitted package to devel and doc
* Thu Apr 12 2001 nashif@suse.de
- Applied cummulative patches upto bug #5906
* Wed Mar 07 2001 nashif@suse.de
- Fixed order of patches in spec file
- Fixed script in spec to link binaries in /usr/bin
* Tue Mar 06 2001 nashif@suse.de
- Update with latest patches (patch.all)
- removed all mpi* from /usr/bin (Conflicts with other MPIs)
- Added mpich module configuration file for (module load mpich), which
requires environment-modules package.
- Fixed shared lib path in mpif77,90
* Tue Mar 06 2001 schwab@suse.de
- Build with --enable-sharedlib to get something that can be linked
into a shared library.
- Add %%suse_update_config.
* Sat Feb 17 2001 nashif@suse.de
- Fixed va_arg arguments
- Update to latest patchlevel
* Fri Nov 17 2000 nashif@suse.de
- Added mpe support
* Thu Nov 16 2000 nashif@suse.de
- Applied latest cummulative patch
- Changed sub-package name: mpichman -> mpich-manpages
* Sun Oct 29 2000 nashif@suse.de
- Update to version 1.2.1
* Fri Mar 31 2000 nadvornik@suse.cz
- removed directories owned by aaa_dir
* Tue Jan 25 2000 nashif@suse.de
- Applied patches 4992 and 4997
* Mon Jan 17 2000 nashif@suse.de
- Updated to 1.2.0
- moved manpages to /usr/share
* Sun Nov 07 1999 nashif@suse.de
- Organised spec file
- fixed spec file
* Thu Oct 07 1999 nashif@suse.de
- Minor link fixes and directory reloacation
* Thu Sep 30 1999 nashif@suse.de
- Added mpichman: a new subpackage for the manual pages to avoid
conflict with LAM
- moved configuration files to /etc/mpich
- Now it should work side by side with LAM
* Tue Sep 28 1999 nashif@suse.de
- Removed MPE from package: using old tk
* Mon Sep 27 1999 nashif@suse.de
- MPICH - Message Passing Interface Implementation 1.1.2