SHA256
1
0
forked from pool/mvapich2
mvapich2/mvapich2.spec
Nicolas Morey-Chaisemartin 92e7148f57 Accepting request 501908 from home:NMoreyChaisemartin:branches:science:HPC
- Remove version dependencies to libibumad, libibverbs and librdmacm

- Remove version dependencies to libibumad, libibverbs and librdmacm

- Remove version dependencies to libibumad, libibverbs and librdmacm

OBS-URL: https://build.opensuse.org/request/show/501908
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=5
2017-06-08 11:42:42 +00:00

246 lines
7.0 KiB
RPMSpec

#
# spec file for package mvapich2
#
# Copyright (c) 2017 SUSE LINUX 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/
#
#############################################################################
# #
# NOTE: If you modify this spec file, or the .changes file you MUST run #
# 'bash ./pre_checkin.sh' to create spec and changes for #
# mvapich2-testuite. #
# #
#############################################################################
Name: mvapich2
Summary: OSU MVAPICH2 MPI package
License: BSD-3-Clause
Group: Development/Libraries/Parallel
Version: 2.2
Release: 0
Source0: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-%{version}.tar.gz
Source1: mpivars.sh
Source2: mpivars.csh
Patch0: mvapich-s390_get_cycles.patch
Patch1: mvapich2-pthread_yield.patch
Url: http://mvapich.cse.ohio-state.edu/overview/mvapich2/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: automake
BuildRequires: bison
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: libibmad-devel
BuildRequires: libibumad-devel
BuildRequires: libibverbs-devel
BuildRequires: librdmacm-devel
%ifnarch s390 s390x
BuildRequires: libnuma-devel
%endif
BuildRequires: libtool
BuildRequires: libtool
BuildRequires: mpi-selector
BuildRequires: python-devel
BuildRequires: sysfsutils
BuildRequires: xorg-x11-devel
# mvapich needs asm/timex.h which seems to be missing from the glibc kernel headers
ExcludeArch: aarch64 armv7hl
%if "%{name}" == "mvapich2-psm"
ExclusiveArch: %ix86 x86_64
BuildRequires: infinipath-psm-devel
%ifarch x86_64
BuildRequires: libpsm2-devel
%endif
%endif
Requires: mpi-selector
%define _prefix /usr/%_lib/mpi/gcc/mvapich2
%define _libexecdir %{_prefix}/%{_lib}
%define _benchmarkdir %{_libexecdir}/osu-micro-benchmarks
%description
This is an MPI-3 implementation which includes all MPI-1 features. It
is based on MPICH2 and MVICH.
%if "%{name}" == "mvapich2" || "%{name}" == "mvapich2-psm"
%package devel
Summary: OSU MVAPICH2 MPI package
Group: Development/Libraries/Parallel
Requires: %{name} = %{version}
Requires: libibumad-devel
Requires: libibverbs-devel
Requires: librdmacm-devel
%if "%{name}" == "mvapich2-psm"
Requires: infinipath-psm-devel
%ifarch x86_64
Requires: libpsm2-devel
%endif
%endif
%description devel
This is an MPI-2 implementation which includes all MPI-1 features. It
is based on MPICH2 and MVICH.
%package devel-static
Summary: OSU MVAPICH2 MPI package - static libraries
Group: Development/Libraries/Parallel
Requires: %{name}-devel = %{version}
%description devel-static
This is an MPI-3 implementation which includes all MPI-1 and MPI-2 features. It
is based on MPICH2 and MVICH. This package contains the static libraries
%endif
%prep
%setup -q -n mvapich2-%{version}%{?rc_ver}
%patch0
%patch1
cp /usr/share/automake*/config.* .
%build
#./autogen.sh
%configure --prefix=%_prefix --libdir=%_libdir --mandir=%_mandir --sysconfdir=%_sysconfdir --libexecdir=%{_libexecdir} \
%if "%{name}" == "mvapich2-psm"
--with-device=ch3:psm \
%endif
--without-mpe
make %{?_smp_mflags} V=1
%if "%{name}" == "mvapich2-testsuite"
%check
make V=1 check
%endif
%install
make DESTDIR=%{buildroot} V=1 install
# make and install mpivars files
sed 's,prefix,%_prefix,g' %{S:1} > %{buildroot}%{_bindir}/mpivars.sh
sed 's,prefix,%_prefix,g' %{S:2} > %{buildroot}%{_bindir}/mpivars.csh
rm -f %{buildroot}%{_libdir}/libfmpich.la \
%{buildroot}%{_libdir}/libmpich.la \
%{buildroot}%{_libdir}/libmpichcxx.la \
%{buildroot}%{_libdir}/libmpichf90.la \
%{buildroot}%{_libdir}/libmpl.la \
%{buildroot}%{_libdir}/libopa.la \
%{buildroot}%{_libdir}/libmpi.la \
%{buildroot}%{_libdir}/libmpicxx.la \
%{buildroot}%{_libdir}/libmpifort.la
%if "%{name}" == "mvapich2-testsuite"
rm -rf %{buildroot}%{_libdir}/pkgconfig
rm -rf %{buildroot}%{_includedir}
rm -rf %{buildroot}%{_mandir}/man3/*
rm -rf %{buildroot}%{_libdir}/*.so
rm -rf %{buildroot}%{_libdir}/pkgconfig/mvapich2.pc
rm -rf %{buildroot}%{_libdir}/pkgconfig/openpa.pc
rm -rf %{buildroot}%{_libdir}/*.a
%endif
install -m 0644 COPYRIGHT* %{buildroot}%{_datadir}/doc/mvapich2
install -m 0644 CHANGE* %{buildroot}%{_datadir}/doc/mvapich2
%if "%{name}" != "mvapich2-testsuite"
mkdir -p %{buildroot}/usr/share/modules/gnu-mvapich2
cat << EOF > %{buildroot}/usr/share/modules/gnu-mvapich2/%{version}
#%%Module
proc ModulesHelp { } {
global dotversion
puts stderr "\tLoads the gnu - mvapich2 %{version} Environment"
}
module-whatis "Loads the gnu mvapich2 %{version} Environment."
conflict gnu-mvapich2
prepend-path PATH %{_bindir}
prepend-path INCLUDE %{_includedir}
prepend-path INCLUDE %{_libdir}
prepend-path MANPATH %{_mandir}
prepend-path LD_LIBRARY_PATH %{_libdir}
EOF
cat << EOF > %{buildroot}/usr/share/modules/gnu-mvapich2/.version
#%%Module1.0
set ModulesVersion "%{version}"
EOF
%endif
%post
/sbin/ldconfig
/usr/bin/mpi-selector \
--register %{name}-%{version} \
--source-dir %{_bindir} \
--yes
%postun
/sbin/ldconfig
/usr/bin/mpi-selector --unregister %{name}-%{version} --yes --silent
%files
%defattr(-, root, root)
%doc %{_datadir}/doc
%dir /usr/%_lib/mpi
%dir /usr/%_lib/mpi/gcc
%dir /usr/%_lib/mpi/gcc/mvapich2
%dir %{_prefix}
%dir %{_bindir}
%dir %{_datadir}
%if "%{name}" == "mvapich2" || "%{name}" == "mvapich2-psm"
%dir /usr/share/modules
%endif
%if "%{name}" == "mvapich2"
%dir %{_includedir}
%endif
%dir %{_mandir}
%dir %{_mandir}/man1
%dir %{_mandir}/man3
%dir %{_libdir}
%dir %{_libexecdir}
%{_bindir}/*
%{_libexecdir}/osu-micro-benchmarks
%if "%{name}" == "mvapich2" || "%{name}" == "mvapich2-psm"
/usr/share/modules/gnu-mvapich2
%endif
%{_mandir}/man1/*
%{_libdir}/*.so.*
%if "%{name}" == "mvapich2" || "%{name}" == "mvapich2-psm"
%files devel
%defattr(-,root,root)
%dir %{_libdir}/pkgconfig
%{_mandir}/man3/*
%{_includedir}
%{_libdir}/*.so
%{_libdir}/pkgconfig/mvapich2.pc
%{_libdir}/pkgconfig/openpa.pc
%files devel-static
%defattr(-,root,root)
%{_libdir}/*.a
%endif
%changelog