File openmpi.spec of Package openmpi

#
# spec file for package openmpi (Version 1.2.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           openmpi
Summary:        A powerful implementaion of MPI
Version:        1.2.8
Release:        2
License:        BSD 3-Clause
Group:          Development/Libraries/Parallel
Source0:        %{name}-%{version}.tar.bz2
Source1:        mpivars.sh
Source2:        mpivars.csh
# Patch0:         openmpi-new-ehca.patch
Url:            http://www.open-mpi.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++ gcc-fortran libibumad-devel libibverbs-devel mpi-selector sysfsutils
%ifnarch s390 s390x
BuildRequires:  compat-dapl-devel
%endif
%ifarch x86_64
BuildRequires:  numactl
%endif
Requires:       mpi-selector
%define _prefix /usr/%_lib/mpi/gcc/%name

%description
Open MPI is a project combining technologies and resources from several
other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to
build the best MPI library available.

This RPM contains all the tools necessary to compile, link, and run
Open MPI jobs.



Authors:
--------
    Andrew Friedley  
    Thara Angskun               
    George Bosilca              
    Brian Barrett               
    David Daniel                
    Edgar Gabriel               
    Graham Fagg                 
    Gleb Natapov                
    Galen Shipman               
    Greg Watson                 
    Sven Stork                  
    Josh Hursey                 
    Jeff Squyres                
    Mohamad Chaarawi            
    Craig Rasmussen             
    Ralph Castain               
    Rich Graham                 
    Rainer Keller               
    Sushant Sharma              
    Tim Woodall              

%package devel
License:        BSD 3-Clause
Group:          Development/Libraries/Parallel
Summary:        A powerful implementaion of MPI
Requires:       %{name} = %{version} libstdc++-devel libibverbs-devel libibumad-devel

%description devel
Open MPI is a project combining technologies and resources from several
other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to
build the best MPI library available.

This RPM contains all the tools necessary to compile, link, and run
Open MPI jobs.



Authors:
--------
    Andrew Friedley  
    Thara Angskun               
    George Bosilca              
    Brian Barrett               
    David Daniel                
    Edgar Gabriel               
    Graham Fagg                 
    Gleb Natapov                
    Galen Shipman               
    Greg Watson                 
    Sven Stork                  
    Josh Hursey                 
    Jeff Squyres                
    Mohamad Chaarawi            
    Craig Rasmussen             
    Ralph Castain               
    Rich Graham                 
    Rainer Keller               
    Sushant Sharma              
    Tim Woodall              

%prep
%setup -q
# %patch0

%build
%configure --with-devel-headers --with-udapl
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
# make and install mpivars files
sed -e 's,prefix,%_prefix,g' -e 's,libdir,%_prefix/%_lib,g' %{S:1} \
    > $RPM_BUILD_ROOT%_bindir/mpivars.sh
sed -e 's,prefix,%_prefix,g' -e 's,libdir,%_prefix/%_lib,g' %{S:2} \
    > $RPM_BUILD_ROOT%_bindir/mpivars.csh

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
/sbin/ldconfig
/usr/bin/mpi-selector \
        --register %{name}-%{version} \
        --source-dir %{_bindir} \
        --yes
if [ "`/usr/bin/mpi-selector --system --query`" = '' ]; then
  /usr/bin/mpi-selector \
	--system \
	--set %{name}-%{version}
fi

%preun
/usr/bin/mpi-selector --unregister %{name}-%{version} --yes

%postun
/sbin/ldconfig

%files
%defattr(-, root, root)
%dir %_prefix
%dir %_prefix/bin
%dir %_prefix/%_lib
%dir %_prefix/share
%dir %_prefix/share/man
%dir %_prefix/share/man/man1
%dir %_prefix/share/man/man3
%dir %_prefix/include
%config %_sysconfdir/*
%_bindir/*
%_mandir/man1/*
%_libdir/*.so.*
%_libdir/*.mod
%_datadir/%name

%files devel
%defattr(-,root,root)
%_libdir/*.la
%_libdir/*.so
%_libdir/openmpi
%_mandir/man3/*
%_includedir/*

%changelog
* Fri Nov 14 2008 aj@suse.de
- Fix setting of LD_LIBRARY_PATH.
* Tue Oct 28 2008 jjolly@suse.de
- Updated to version 1.2.8 from OFED 1.4 rc3
  - Tweaked one memory barrier in the openib component to be more conservative.
  May fix a problem observed on PPC machines.  See ticket #1532.
  - Fix OpenFabrics IB partition support. See ticket #1557.
  - Restore v1.1 feature that sourced .profile on remote nodes if the default
  shell will not do so (e.g. /bin/sh and /bin/ksh).  See ticket #1560.
  - Fix segfault in MPI_Init_thread() if ompi_mpi_init() fails. See ticket #1562.
  - Adjust SLURM support to first look for $SLURM_JOB_CPUS_PER_NODE instead of
  the deprecated $SLURM_TASKS_PER_NODE environment variable.  This change
  may be *required* when using SLURM v1.2 and above.  See ticket #1536.
  - Fix the MPIR_Proctable to be in process rank order. See ticket #1529.
  - Fix a regession introduced in 1.2.6 for the IBM eHCA. See ticket #1526.
* Mon Oct 27 2008 ro@suse.de
- buildreq compat-dapl-devel only on non-s390*
* Thu Sep 18 2008 jjolly@suse.de
- Moved mpi-select unregister to %%preun in spec (bnc#344966)
* Thu Sep 11 2008 jjolly@suse.de
- Updated to version 1.2.7 from OFED 1.4 RC1
* Mon May 12 2008 jjolly@suse.de
- Updated to v1.2.5 from OFED 1.3 GA
- Set %%config to files within the /etc directory (bnc#376940)
- Set libpath in mpivars scripts (bnc#376940)
- Set openMPI as the system MPI if none other is set (bnc#376940)
- Removed fix for open call (now found in base package)
* Tue Jan 29 2008 aj@suse.de
- Fix open call.
* Tue Oct 02 2007 pmullaney@suse.de
- openmpi components should be in the openmpi package
* Sat Jul 14 2007 aj@suse.de
- libnuma is x86-64 only.
* Fri Jul 13 2007 hvogel@suse.de
- build also against libnuma
* Thu Jul 12 2007 hvogel@suse.de
- build against dapl
* Wed Jul 11 2007 hvogel@suse.de
- Initial Package, Version 1.2.2