Summary: An implementation of MPI Name: mpich2 Version: 1.0.6p1 Release: 1%{?dist} License: Freely redistributable without restriction Group: Development/Libraries URL: http://www.mcs.anl.gov/mpi/mpich2 Source: ftp://ftp.mcs.anl.gov/pub/mpi/%{name}-%{version}.tar.gz Source1: mpich2.module.in Patch0: mpich2-rpmbuild.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libXt-devel, e2fsprogs-devel, emacs-common BuildRequires: java-devel, gcc-gfortran, python Requires: %{name}-libs = %{version}-%{release} Requires: python Requires(post): /usr/sbin/alternatives Requires(preun):/usr/sbin/alternatives %description MPICH2 is an all-new implementation of MPI from the group at Argonne National Laboratory. It shares many goals with the original MPICH but no actual code. It is a portable, high-performance implementation of the entire MPI-2 standard. This release has all MPI-2 functions and features required by the standard with the exeption of support for the "external32" portable I/O format. It also currently supports only a few communication methods %package devel Summary: Development files for mpich2 Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig Requires: gcc-gfortran Requires(post): /usr/sbin/alternatives Requires(preun):/usr/sbin/alternatives %description devel Contains development headers and libraries for mpich2 %package libs Summary: Libraries and configuration files for mpich2 Group: Development/Libraries %description libs Contains the arch dependent libraries and their build configuration for mpich2 # We only compile with gcc, but other people may want other compilers. # Set the compiler here. %define opt_cc gcc %define opt_fc gfortran # Optional CFLAGS to use with the specific compiler...gcc doesn't need any, # so uncomment and undefine to NOT use %define opt_cc_cflags %{optflags} %define opt_fc_fflags %{optflags} %ifarch %{ix86} ppc %define mode 32 %define priority 40 %else %define mode 64 %define priority 41 %endif %prep %setup -q %patch0 -p0 -b .build %configure \ --enable-f90 --enable-sharedlibs=gcc \ --sysconfdir=%{_sysconfdir}/%{name}-%{mode} \ --includedir=%{_includedir}/%{name} \ --libdir=%{_libdir}/%{name} \ --datadir=%{_datadir}/%{name} \ --with-htmldir=%{_docdir}/%{name}-%{version}/www \ --with-docdir=%{_docdir}/%{name}-%{version} \ --with-java=%{_sysconfdir}/alternatives/java_sdk \ --with-device=ch3:dllchan:sock,shm,ssm \ F90=%{opt_fc} \ F77=%{opt_fc} \ CFLAGS="%{?opt_cc_cflags}" \ CXXFLAGS="%{optflags}" \ F90FLAGS="%{?opt_fc_fflags}" \ FFLAGS="%{?opt_fc_fflags}" \ LDFLAGS='-Wl,-z,noexecstack' %build #make %{?_smp_mflags} doesn't work make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install ## Resolve clashes with LAM/OPENMP: mpicxx mpicc mpif77 mpif90 mpiexec mpirun rm -f %{buildroot}%{_bindir}/{mpiexec,mpirun,mpdrun} mv %{buildroot}%{_mandir}/man1/{,mp-}mpiexec.1 pushd %{buildroot}%{_bindir}/ ln -s mpiexec.py mpdrun popd mkdir -p %{buildroot}%{_datadir}/%{name}/bin%{mode} for b in mpicxx mpicc mpif77 mpif90; do mv %{buildroot}%{_bindir}/$b %{buildroot}%{_bindir}/mp%{mode}-$b; mv %{buildroot}%{_mandir}/man1/$b.1 %{buildroot}%{_mandir}/man1/mp-$b.1; ln -s %{_bindir}/mp%{mode}-$b %{buildroot}%{_datadir}/%{name}/bin%{mode}/$b done mv %{buildroot}%{_libdir}/%{name}/pkgconfig %{buildroot}%{_libdir}/ chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc ## Create modules file sed 's#@DATADIR@#'%{_datadir}/%{name}'#;s#@LIBDIR@#'%{_libdir}/%{name}'#;s#@INCLUDEDIR@#'%{_includedir}/%{name}'#;s#@MODE@#'%{mode}'#' < %SOURCE1 > %{buildroot}%{_datadir}/%{name}/%{name}.module #:; # Manually copy doc file here instead of the %files section to prevent the rpm #build script from throwing the other things in there out cp -pr CHANGES COPYRIGHT README %{buildroot}%{_docdir}/%{name}-%{version}/ cp -pr src/mpe2/README %{buildroot}%{_docdir}/%{name}-%{version}/README.mpe # Silence rpmlint sed -i '/^#! \//,1 d' %{buildroot}%{_sysconfdir}/%{name}-%{mode}/{mpi*.conf,mpe_help.*} #Rename the MPI routine manpages, to avoid conflict with openmpi for man in %{buildroot}%{_mandir}/man3/*; do manf=`basename $man .3` mv %{buildroot}%{_mandir}/man3/$manf.3 %{buildroot}%{_mandir}/man4/$manf.4 sed s/3/4/1 -i %{buildroot}%{_mandir}/man4/$manf.4 done mv %{buildroot}%{_mandir}/man4/MPE*.* %{buildroot}%{_mandir}/man3/ # The uninstall script that is installed in this directory is not needed in rpm # packaging rm -rf %{buildroot}%{_sbindir}/mpe* find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' %clean rm -rf %{buildroot} %post /usr/sbin/alternatives \ --install %{_bindir}/mpirun mpi-run %{_bindir}/mpiexec.py 41 \ --slave %{_bindir}/mpiexec mpi-exec %{_bindir}/mpiexec.py \ --slave %{_mandir}/man1/mpiexec.1.gz mpi-exec-man \ %{_mandir}/man1/mp-mpiexec.1.gz \ --slave %{_mandir}/man1/mpif90.1.gz mpif90-man \ %{_mandir}/man1/mp-mpif90.1.gz \ --slave %{_mandir}/man1/mpif77.1.gz mpif77-man \ %{_mandir}/man1/mp-mpif77.1.gz \ --slave %{_mandir}/man1/mpicc.1.gz mpicc-man \ %{_mandir}/man1/mp-mpicc.1.gz \ --slave %{_mandir}/man1/mpic++.1.gz mpic++-man \ %{_mandir}/man1/mp-mpicxx.1.gz %preun /usr/sbin/alternatives --remove mpi-run %{_bindir}/mpiexec.py %post devel /usr/sbin/alternatives \ --install %{_bindir}/mpicc mpicc %{_bindir}/mp%{mode}-mpicc %{priority}\ --slave %{_bindir}/mpicxx mpicxx %{_bindir}/mp%{mode}-mpicxx \ --slave %{_bindir}/mpif90 mpif90 %{_bindir}/mp%{mode}-mpif90 \ --slave %{_bindir}/mpif77 mpif77 %{_bindir}/mp%{mode}-mpif77 %preun devel /usr/sbin/alternatives --remove mpicc %{_bindir}/mp%{mode}-mpicc %files %defattr(-,root,root,-) %{_bindir}/* %exclude %{_bindir}/mp*.pyc %exclude %{_bindir}/mp*.pyo %exclude %{_bindir}/mp%{mode}-mpicc %exclude %{_bindir}/mp%{mode}-mpicxx %exclude %{_bindir}/mp%{mode}-mpif90 %exclude %{_bindir}/mp%{mode}-mpif77 %doc %{_docdir}/%{name}-%{version}/ %{_mandir}/man1/* %dir %{_datadir}/%{name} %{_datadir}/%{name}/log* %files libs %defattr(-,root,root,-) %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.jar %{_libdir}/%{name}/mpe*.o %{_libdir}/%{name}/*.so.* %config %{_sysconfdir}/%{name}-%{mode}/ %files devel %defattr(-,root,root,-) %{_bindir}/mp%{mode}-mpicc %{_bindir}/mp%{mode}-mpicxx %{_bindir}/mp%{mode}-mpif90 %{_bindir}/mp%{mode}-mpif77 %{_includedir}/* %{_libdir}/%{name}/*.a %{_libdir}/%{name}/*.so %{_libdir}/%{name}/trace_rlog/libTraceInput.so %{_libdir}/pkgconfig/%{name}-ch3.pc %{_datadir}/%{name}/bin%{mode}/ %{_datadir}/%{name}/%{name}.module %{_datadir}/%{name}/examples* %{_mandir}/man3/*.gz %{_mandir}/man4/*.gz %doc README.testing README.romio README.developer %changelog * Mon Oct 15 2007 Deji Akingunola - 1.0.6p1-1 - Update to 1.0.6p1 * Mon Oct 15 2007 Deji Akingunola - 1.0.6-1 - New version upgrade * Mon Jul 31 2007 Deji Akingunola - 1.0.5p4-4 - Create a -mpi-manpages subpackage for the MPI routines manuals * Fri Jul 27 2007 Deji Akingunola - 1.0.5p4-3 - Fix java-gcj-compat BR - Handle upgrades in the post scripts * Mon Jun 12 2007 Deji Akingunola - 1.0.5p4-2 - Fix typos and make other adjustments arising from Fedora package reviews * Mon Jun 12 2007 Deji Akingunola - 1.0.5p4-1 - Patch #4 release * Mon Feb 12 2007 Deji Akingunola - 1.0.5p2-1 - Patch #2 release * Tue Jan 09 2007 Deji Akingunola - 1.0.5p1-1 - New release with manpages - Create a -libs subpackage as it's done in Fedora's openmpi to help with multi-libs packaging - Disable modules support (until I can properly figure it out) * Wed Dec 27 2006 Deji Akingunola - 1.0.5-1 - New release * Sat Nov 18 2006 Deji Akingunola - 1.0.4p1-2 - Set the java_sdk directory so all java bit work * Sat Sep 02 2006 Deji Akingunola - 1.0.4p1-1 - Update to version 1.0.4p1 - Cleanup up spec file to use alternatives similarly to FC's openmpi * Wed Aug 02 2006 Deji Akingunola - 1.0.4-1 - Update to version 1.0.4 * Thu May 18 2006 Deji Akingunola - 1.0.3-3 - Add missing BRs (Orion Polawski) * Mon Apr 10 2006 Deji Akingunola - 1.0.3-2 - Rewrite the spec, borrowing extensively from openmpi's spec by Jason Vas Dias - Allows use of environment modules and alternatives * Fri Nov 25 2005 Deji Akingunola - 1.0.3-1 - Update to new version * Sat Oct 15 2005 Deji Akingunola - 1.0.2p1-1 - Initial package