[mvapich-discuss] Errors on Fedora 13
Vladimir Florinski
vaf0001 at uah.edu
Wed Jul 28 19:34:25 EDT 2010
On Wed, 2010-07-28 at 17:15 -0400, Jonathan Perkins wrote:
> Hi, can you forward us the spec file? There may be something peculiar
> in the spec that are leading to the issues since I don't see this with
> the release tarball.
>
It's basically a SPEC file from Redhat 5:
%define compiler gcc
%define mpidir %{_libdir}/%{name}/%{version}-%{compiler}
Summary: OSU MVAPICH2 MPI package
License: BSD
Group: Development/Libraries
Name: mvapich2
Version: 1.5
Release: 1%{?dist}
Source: mvapich2-%{version}.tgz
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.2-4.el5,
librdmacm-devel
Requires: mpi-selector, librdmacm-devel, libibverbs-devel,
libibumad-devel
Requires(post): mpi-selector, rpm
Requires(preun): mpi-selector, rpm
ExclusiveArch: i386 ia64 x86_64
%description
This is an MPI-2 implementation which includes all MPI-1 features. It
is based on MPICH2 and MVICH.
%prep
%setup -q -n %{name}-%{version}
export CC=gcc
export CXX=g++
export F77=gfortran
export F90=gfortran
export CFLAGS="-O3 -fno-strict-aliasing"
export CXXFLAGS="-O3"
export FFLAGS=""
export F90FLAGS=""
%ifarch i386
export CFLAGS="-m32 $CFLAGS"
export CXXFLAGS="-m32 $CXXFLAGS"
export FFLAGS="-m32 $FFLAGS"
export F90FLAGS="-m32 $F90FLAGS"
%endif
%ifarch x86_64
export CFLAGS="-m64 $CFLAGS"
export CXXFLAGS="-m64 $CXXFLAGS"
export FFLAGS="-m64 $FFLAGS"
export F90FLAGS="-m64 $F90FLAGS"
%endif
export LIBS="-ldl"
./configure --prefix=%{mpidir} --mandir=%{mpidir}/man
--enable-error-checking=runtime --enable-timing=none --enable-g=dbg
--enable-mpe --enable-sharedlibs=gcc --with-rdma=gen2
%build
make
%install
rm -fr %{buildroot}
make DESTDIR=%{buildroot} install
cd %{buildroot}%{mpidir}
rm -f sbin/mpeuninstall
cat >bin/mpivars.csh <<EOF
#!/bin/csh
if (\$?path) then
if ( "\${path}" !~ *%{mpidir}/bin* ) then
set path = ( %{mpidir}/bin \$path )
endif
else
set path = ( %{mpidir}/bin )
endif
if (\$?LD_CONFIG_PATH) then
if ( "\${LD_CONFIG_PATH}" !~ *%{mpidir}/lib* ) then
setenv LD_CONFIG_PATH %{mpidir}/lib:\$LD_CONFIG_PATH
endif
else
setenv LD_CONFIG_PATH %{mpidir}/lib:
endif
setenv MPD_BIN %{mpidir}/bin
EOF
cat >bin/mpivars.sh <<EOF
#!/bin/bash
if ! echo \${PATH} | grep -q %{mpidir}/bin ; then
PATH=%{mpidir}/bin:\${PATH}
fi
if ! echo \${LD_LIBRARY_PATH} | grep -q %{mpidir}/lib ; then
LD_CONFIG_PATH=%{mpidir}/lib:\${LD_CONFIG_PATH}
fi
export MPD_BIN=%{mpidir}/bin
EOF
%clean
rm -rf %{buildroot}
%post
mpi-selector --register %{name}-%{version}-%{compiler}-%{_arch} \
--source-dir %{mpidir}/bin --yes >/dev/null 2>&1
/bin/true
%preun
COUNT=`rpm -q %{name}-%{version}.%{_arch} | wc -l`
if [ $COUNT -eq 1 ]; then
mpi-selector --unregister %{name}-%{version}-%{compiler}-%{_arch} \
--yes >/dev/null 2>&1
fi
/bin/true
%files
%defattr(-,root,root,-)
%dir %{mpidir}
%{mpidir}/*
--
Vladimir Florinski <vaf0001 at uah.edu>
More information about the mvapich-discuss
mailing list