%define name mpich %define version 1.2.4 %define release 22mdk %define lib_name_orig libmpich %define lib_major 1 %define lib_name %{lib_name_orig}%{lib_major} %define mpiname mpiname %define mpihome %{_localstatedir}/mpi Name: %{name} Summary: MPICH is a portable implementation of MPI. Version: %{version} Release: %{release} Source0: %{name}-%{version}.tar.bz2 #Source2: .bashrc #Source3: .bash_profile Source4: test_mpi.c Patch0: %{name}-%{version}-sysconfdir.patch.bz2 Patch1: %{name}-%{version}-datadir.patch.bz2 Patch2: %{name}-%{version}-patch-all.patch.bz2 URL: http://www-unix.mcs.anl.gov/mpi/mpich/ License: BSD style Group: Cluster/Message Passing BuildRoot: %{_tmppath}/%{name}-root Prefix: %{_prefix} Requires: rsh, xinetd, rsh-server Conflicts: lam-runtime BuildRequires: gcc = 3.2, gcc-g77 = 3.2 %description MPICH is a freely available, portable implementation of MPI, the Standard for message-passing libraries. MPICH-A Portable Implementation of MPI is a MPI Standard conforming library that was developed by the Argonne National Laboratory. It allows different processes across a network of workstations to communicate using specific message passing functions. It includes librairies, parallel debuging tools and docs. This package provides the libraries that use the standard p4 device. %package -n mpich-doc Summary: Documentation for developing programs that will use MPICH Group: Development/Other Requires: mpich = %{version}-%{release} Source1: rhosts.mpi %description -n mpich-doc MPICH is a freely available, portable implementation of MPI, the Standard for message-passing libraries. MPICH-A Portable Implementation of MPI is a MPI Standard conforming library that was developed by the Argonne National Laboratory. It allows different processes across a network of workstations to communicate using specific message passing functions. It includes librairies, parallel debuging tools and docs. This package provides the documentation needed to develop applications using the MPICH libraries. %package -n %{lib_name} Summary: Shared Librairies for MPICH Group: Development/Other Requires: mpich = %{version}-%{release} %description -n %{lib_name} Shared Librairies for MPICH %package -n %{lib_name}-devel Summary: Headers for developing programs that will use MPICH Group: Development/Other Requires: mpich = %{version}-%{release}, %{lib_name} Conflicts: liblam0-devel Provides: %{lib_name_orig}-devel %description -n %{lib_name}-devel MPICH is a freely available, portable implementation of MPI, the Standard for message-passing libraries. MPICH-A Portable Implementation of MPI is a MPI Standard conforming library that was developed by the Argonne National Laboratory. It allows different processes across a network of workstations to communicate using specific message passing functions. It includes librairies, parallel debuging tools and docs. This package provides the static libraries and header files needed to compile applications using the MPICH libraries. %package -n mpicc Summary: The MPICH wrapper over the C compiler Group: Development/C Requires: gcc = 3.2, %{lib_name}-devel = %{version}-%{release} Conflicts: lam-devel %description -n mpicc MPICH is a freely available, portable implementation of MPI, the Standard for message-passing libraries. MPICH-A Portable Implementation of MPI is a MPI Standard conforming library that was developed by the Argonne National Laboratory. It allows different processes across a network of workstations to communicate using specific message passing functions. It includes librairies, parallel debuging tools and docs. This package provides the shell script mpicc, with headers, which allows to compile C programs using the MPICH libraries. %package -n mpic++ Summary: The MPICH wrapper over the C++ compiler Group: Development/C++ Requires: gcc-c++ = 3.2, %{lib_name}-devel = %{version}-%{release} Conflicts: lam-devel %description -n mpic++ MPICH is a freely available, portable implementation of MPI, the Standard for message-passing libraries. MPICH-A Portable Implementation of MPI is a MPI Standard conforming library that was developed by the Argonne National Laboratory. It allows different processes across a network of workstations to communicate using specific message passing functions. It includes librairies, parallel debuging tools and docs. This package provides the shell script mpiCC, with headers, which allows to compile C++ programs using the MPICH libraries. %package -n mpif77 Summary: The MPICH wrapper over the Fortran 77 compiler Group: Development/Other Requires: gcc-g77 = 3.2, %{lib_name}-devel = %{version}-%{release} Conflicts: lam-devel %description -n mpif77 MPICH is a freely available, portable implementation of MPI, the Standard for message-passing libraries. MPICH-A Portable Implementation of MPI is a MPI Standard conforming library that was developed by the Argonne National Laboratory. It allows different processes across a network of workstations to communicate using specific message passing functions. It includes librairies, parallel debuging tools and docs. This package provides the shell script mpif77, with headers, which allows to compile Fortran 77 (NOT Fortran 90!) programs using the MPICH libraries. %prep rm -rf $RPM_BUILD_ROOT %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p0 find -name .cvsignore | xargs rm -rf find -name CVS -type d | xargs rm -rf %pre /usr/sbin/groupadd -g 12384 -r -f mpi > /dev/null 2>&1 ||: /usr/sbin/useradd -u 12384 -g mpi -d %{mpihome} -r -s /bin/bash mpi -p "" -m > /dev/null 2>&1 ||: %postun /usr/sbin/userdel mpi %post STATUS=$(cat /etc/xinetd.d/rsh | grep disable | cut -d "=" -f 2) if [ $STATUS == "yes" ]; then echo "Warning !!" echo "The rsh daemon is disabled in your xinetd config file(/etc/xinetd.d/rsh), please activate it." fi echo "Remember that you should create a .rhosts in your home directory." echo "Look at .rhosts in the doc directory for a sample configuration" echo "A mpi user has been created, change it's home directory to a network file system with the other nodes" # automatically set mpi variable TEST_MPI_ENV=`grep MPI /etc/bashrc` if [ -z "$TEST_MPI_ENV" ] ; then echo "# MPI environement" >> /etc/bashrc echo "MPIRUN_HOME=/usr/bin" >> /etc/bashrc echo "export MPIRUN_HOME" >> /etc/bashrc fi %build CFLAGS=$RPM_OPT_FLAGS; export CFLAGS; [ -f configure.in ] && libtoolize --copy --force; ./configure --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --datadir=%{_datadir}/mpich/ \ --includedir=%{_includedir} \ --libdir=%{_libdir} \ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir}\ --sharedlib=%{_libdir}\ --enable-c++ \ --enable-f77 \ --with-arch=LINUX \ --with-device=ch_p4 \ --with-comm=ch_p4 \ --enable-sharedlib \ --enable-debug \ --disable-weak-symbols make %install rm -rf $RPM_BUILD_ROOT export MPICH_INCLUDE_PROFLIB="yes" make install PREFIX=$RPM_BUILD_ROOT%{_prefix}\ MPIINSTALL_OPTS="-manpath=$RPM_BUILD_ROOT/%{_mandir} \ -sysconfpath=$RPM_BUILD_ROOT/%{_sysconfdir}/mpich/ \ -datapath=$RPM_BUILD_ROOT/%{_datadir}/mpich/ \ -shliblocal=$RPM_BUILD_ROOT/%{_libdir} \ -soft " proot="$HOME/rpm/tmp/mpich-root" lrep="$proot/etc/mpich $proot/usr/bin $proot/usr/examples $proot/usr/sbin" for rep in $lrep do for file in $rep/* do if [ -f "$file" ]; then perl -pi -e 's|%buildroot||g' "$file" fi done done for i in $(ls $RPM_BUILD_ROOT/usr/bin/*); do perl -pi -e 's|MPI_WITH_PMPI\=\"yes\".*|MPI_WITH_PMPI\=yes \n MPICH_INCLUDE_PROFLIB\=yes|' $i done HOSTNAME=`hostname` perl -pi -e "s|$HOSTNAME||g" "$RPM_BUILD_ROOT%{_datadir}/mpich/machines.LINUX" mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{mpiname} mkdir -p $RPM_BUILD_ROOT/%{mpihome} install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_docdir}/%{mpiname}/rhosts install -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{mpihome}/.rhosts #install %{SOURCE2} $RPM_BUILD_ROOT/%{mpihome} #install %{SOURCE3} $RPM_BUILD_ROOT/%{mpihome} mkdir -p $RPM_BUILD_ROOT/usr/adm find $RPM_BUILD_ROOT -name CVS -type d | xargs rm -rf # A sample mpi program (hello world) $RPM_BUILD_DIR/%{name}-%{version}/bin/mpicc -I$RPM_BUILD_ROOT/usr/include -L$RPM_BUILD_ROOT/usr/lib %{SOURCE4} -o $RPM_BUILD_ROOT/%{mpihome}/test_mpi.%{name} $RPM_BUILD_DIR/%{name}-%{version}/bin/mpicc -I$RPM_BUILD_ROOT/usr/include -L$RPM_BUILD_ROOT/usr/lib %{SOURCE4} -o $RPM_BUILD_ROOT%{_docdir}/%{mpiname}/test_mpi.%{name} cd $RPM_BUILD_ROOT/%{_libdir} rm libpmpich.so* ln -sf libmpich.so.1.0 libmpich.so ln -sf libfmpich.so.1.0 libfmpich.so %clean rm -rf $RPM_BUILD_ROOT %postun -n %{lib_name} /sbin/ldconfig %post -n %{lib_name} /sbin/ldconfig %files %defattr(-,root,root,755) %doc COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{mpiname}/* %{_sbindir}/* %{_bindir}/mpirun* %{_bindir}/mpereconfig %{_bindir}/mpereconfig.dat %{_bindir}/mpereconfig.in %{_bindir}/mpiman %{_bindir}/mpireconfig %{_bindir}/mpireconfig.dat %{_bindir}/tarch %{_bindir}/tdevice %{_bindir}/serv_p4 %{_bindir}/clog2alog %{_bindir}/clog2slog %{_bindir}/clog_print %{_bindir}/slog_print %{_bindir}/logviewer #%dir %{_sysconfdir}/mpich/ %config(noreplace) %{_sysconfdir}/mpich/* #%dir %{_datadir}/mpich/ %config(noreplace) %{_datadir}/mpich/* %{_mandir}/man1/mpirun.1.bz2 %{_mandir}/man1/mpiman.1.bz2 %{_mandir}/man1/mpireconfig.1.bz2 %{_mandir}/man1/tstmachines.1.bz2 %{_mandir}/man1/chp4_servs.1.bz2 %{_mandir}/man1/cleanipcs.1.bz2 %{_mandir}/man1/MPI.1.bz2 %config(noreplace) %attr(644,mpi,mpi) %{mpihome}/.rhosts #%attr(644,mpi,mpi) %{mpihome}/.bashrc #%attr(644,mpi,mpi) %{mpihome}/.bash_profile %attr(755,mpi,mpi) %{mpihome}/test_mpi.%{name} /usr/adm %files -n %{lib_name} %defattr(-,root,root,755) %{_libdir}/*.so.* %files -n mpich-doc %defattr(-,root,root,755) %doc doc/* examples www %files -n %{lib_name}-devel %defattr(-,root,root) %doc COPYRIGHT %{_mandir}/man3/*.3* %{_mandir}/man4/*.4* %dir %{_includedir}/mpi2c++ %{_includedir}/mpi2c++/*.h %{_includedir}/*.h %{_libdir}/*.a %{_libdir}/*.o %{_libdir}/*.so %files -n mpicc %defattr(-,root,root,755) %doc COPYRIGHT %{_bindir}/mpicc %{_mandir}/man1/mpicc.1.bz2 %files -n mpic++ %defattr(-,root,root,755) %doc COPYRIGHT %{_bindir}/mpiCC %{_mandir}/man1/mpiCC.1.bz2 %files -n mpif77 %defattr(-,root,root,755) %doc COPYRIGHT %{_bindir}/mpif77 %{_mandir}/man1/mpif77.1.bz2 %{_mandir}/man1/mpif90.1.bz2 %changelog * Mon Aug 26 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-22mdk - Re-adding mpi user - Applying officials mpich patches - Fixing buildrequires - Enable debug for TotalView - Separting mpi and pmpi libs - Using -soft tag (avoid install mpich to build mpich) * Thu Aug 08 2002 Antoine Ginies <aginies@mandrakesoft.com> 1.2.4-21mdk - correct requires (thx Goetz Waschk) - remove mpi user * Tue Aug 06 2002 Antoine Ginies <aginies@mandrakesoft.com> 1.2.4-20mdk - build with gcc 3.2 * Wed Jul 10 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-19mdk - Changing exports from /etc/profile to /etc/bashc * Tue Jul 09 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-18mdk - Changing gcc requires to 2.96 * Tue Jul 09 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-17mdk - Fixing MPICH_INCLUDE_PROFLIB problem in mpicc,mpiCC,mpicxx, mpif90 and mpif77 * Sat Jul 06 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-16mdk - Suse merge - Removing libpmpi.so.* - Spliting libs in sub packages * Sat Jul 06 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-15mdk - Adding pmpi lib ! * Sat Jul 06 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-14mdk - Fixing specfile for building & installing lib*.so * Thu Jul 04 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-13mdk - Removing bashrc & bash profile - Moving testmpi.mpich in docdir * Tue Jun 25 2002 Antoine Ginies <aginies@mandrakesoft.com> 1.2.4-12mdk - adjust environement variable in /etc/profile * Mon Jun 17 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-11mdk - Adding noreplace on configuration files - Removing building hostname on machines.LINUX * Thu Jun 06 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-10mdk - Setting mpi user id * Wed Jun 05 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-9mdk - Fixing typo in .bashrc of mpi user * Tue Jun 04 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-8mdk - Fixing wrong perm on sample script - Using another sample script program * Tue Jun 04 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-7mdk - Removing gcc require on main mpich package - Removing virtual Mpi provide * Mon Jun 03 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-6mdk - Fixing stupid friday mistake * Fri May 31 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-5mdk - Adding hello world sample mpi test program - Adding ch_p4 option * Thu May 30 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-4mdk - Adding /usr/adm for serv_p4 process - Adding MPIRUN_HOME in default environment of mpi user * Tue May 28 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-3mdk - Adding more conflicts with lam * Fri May 24 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-2mdk - Provides virtual Mpi - Fixing spec file * Wed May 22 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.4-1mdk - New release - Bug-fix and improved-SMP performance release - Other new features include better support for Intel compilers, particularly for IA64 Linux, better support for various Fortran compilers, and some fixes for rare race conditions in the ch_p4 device. * Wed May 22 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.2.2-7mdk - Fixing home dir for MPI user - Gcc 3.1 build * Tue Apr 23 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.2.2-6mdk - Fixing stupid places of man pages - Fixing forgoten dependencies - Adding rhosts example and warnings - Adding MPI user * Fri Apr 12 2002 Erwan Velu <erwan@mandrakesoft.com> 1.2.2.2-5mdk - Fixing stupid things * Fri Nov 23 2001 Ludovic Francois <lfrancois@mandrakesoft.com> 1.2.2.2-4mdk - Removed unresolved dependencies * Mon Nov 19 2001 Ludovic Francois <lfrancois@mandrakesoft.com> 1.2.2.2-3mdk - Added sub packages mpich-doc mpicc mpic++ mpif77 * Tue Oct 25 2001 Ludovic Francois <lfrancois@mandrakesoft.com> 1.2.2.2-2mdk - Rebuild for rpmlint * Fri Oct 12 2001 Ludovic Francois <lfrancois@mandrakesoft.com> 1.2.2.2-1mdk - Mpich package build for the first time. # end of file