2017-06-08 10:50:26 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2017-07-13 10:13:19 +02:00
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%nil
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-07-03 16:41:27 +02:00
|
|
|
%if "%{flavor}" != ""
|
2017-06-26 12:20:27 +02:00
|
|
|
%define pack_suff -%{flavor}
|
2017-07-03 16:41:27 +02:00
|
|
|
%else
|
|
|
|
%define pack_suff %{nil}
|
2017-06-26 12:20:27 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%flavor" == "testsuite"
|
|
|
|
%define testsuite 1
|
2017-06-14 15:16:46 +02:00
|
|
|
%endif
|
|
|
|
|
2017-06-27 10:56:46 +02:00
|
|
|
%define module_name mvapich2%{pack_suff}
|
|
|
|
%define _prefix /usr/%_lib/mpi/gcc/%{module_name}
|
2017-06-14 15:16:46 +02:00
|
|
|
%define _libexecdir %{_prefix}/%{_lib}
|
|
|
|
%define _benchmarkdir %{_libexecdir}/osu-micro-benchmarks
|
2017-06-27 10:56:46 +02:00
|
|
|
%define _moduledir /usr/share/modules/gnu-%{module_name}
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
Name: mvapich2%{pack_suff}
|
2017-06-08 10:50:26 +02:00
|
|
|
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
|
2017-06-26 12:20:27 +02:00
|
|
|
Source3: _multibuild
|
2017-06-09 09:27:29 +02:00
|
|
|
Patch0: mvapich2-s390_get_cycles.patch
|
2017-06-08 10:50:26 +02:00
|
|
|
Patch1: mvapich2-pthread_yield.patch
|
2017-06-09 09:27:29 +02:00
|
|
|
Patch2: mvapich2-arm-support.patch
|
2017-06-08 10:50:26 +02:00
|
|
|
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
|
2017-06-23 17:51:26 +02:00
|
|
|
BuildRequires: infiniband-diags-devel
|
2017-06-08 13:42:42 +02:00
|
|
|
BuildRequires: libibumad-devel
|
|
|
|
BuildRequires: libibverbs-devel
|
|
|
|
BuildRequires: librdmacm-devel
|
2017-06-09 09:27:29 +02:00
|
|
|
%ifnarch s390 s390x armv7hl
|
2017-06-08 10:50:26 +02:00
|
|
|
BuildRequires: libnuma-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: mpi-selector
|
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: sysfsutils
|
|
|
|
BuildRequires: xorg-x11-devel
|
2017-06-26 12:20:27 +02:00
|
|
|
%if "%{flavor}" == "psm"
|
2017-06-08 10:50:26 +02:00
|
|
|
ExclusiveArch: %ix86 x86_64
|
|
|
|
BuildRequires: infinipath-psm-devel
|
|
|
|
%endif
|
2017-06-27 10:56:46 +02:00
|
|
|
%if "%{flavor}" == "psm2"
|
|
|
|
ExclusiveArch: x86_64
|
|
|
|
BuildRequires: libpsm2-devel
|
2017-06-08 10:50:26 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
Requires: mpi-selector
|
|
|
|
|
|
|
|
%description
|
|
|
|
This is an MPI-3 implementation which includes all MPI-1 features. It
|
|
|
|
is based on MPICH2 and MVICH.
|
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%if 0%{!?testsuite:1}
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: OSU MVAPICH2 MPI package
|
|
|
|
Group: Development/Libraries/Parallel
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: libibumad-devel
|
|
|
|
Requires: libibverbs-devel
|
|
|
|
Requires: librdmacm-devel
|
2017-06-26 12:20:27 +02:00
|
|
|
%if "%{flavor}" == "psm"
|
2017-06-08 10:50:26 +02:00
|
|
|
Requires: infinipath-psm-devel
|
|
|
|
%endif
|
2017-06-27 10:56:46 +02:00
|
|
|
%if "%{flavor}" == "psm2"
|
|
|
|
Requires: libpsm2-devel
|
2017-06-08 10:50:26 +02:00
|
|
|
%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
|
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%endif # ! testsuite
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n mvapich2-%{version}%{?rc_ver}
|
|
|
|
%patch0
|
|
|
|
%patch1
|
2017-06-09 09:27:29 +02:00
|
|
|
%patch2
|
2017-06-08 10:50:26 +02:00
|
|
|
cp /usr/share/automake*/config.* .
|
|
|
|
|
|
|
|
%build
|
|
|
|
#./autogen.sh
|
2017-07-06 09:18:09 +02:00
|
|
|
%configure \
|
2017-07-13 10:13:19 +02:00
|
|
|
--disable-wrapper-rpath \
|
2017-06-26 12:20:27 +02:00
|
|
|
%if "%{flavor}" == "psm"
|
2017-06-08 10:50:26 +02:00
|
|
|
--with-device=ch3:psm \
|
2017-06-27 10:56:46 +02:00
|
|
|
--with-psm=/usr \
|
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == "psm2"
|
|
|
|
--with-device=ch3:psm \
|
|
|
|
--with-psm2=/usr \
|
2017-06-08 10:50:26 +02:00
|
|
|
%endif
|
|
|
|
--without-mpe
|
|
|
|
make %{?_smp_mflags} V=1
|
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%if 0%{?testsuite}
|
2017-06-08 10:50:26 +02:00
|
|
|
%check
|
|
|
|
make V=1 check
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=%{buildroot} V=1 install
|
|
|
|
# make and install mpivars files
|
2017-07-13 17:51:59 +02:00
|
|
|
sed -e 's,prefix,%_prefix,g' -e 's,libdir,%{_libdir},g' %{S:1} > %{buildroot}%{_bindir}/mpivars.sh
|
|
|
|
sed -e 's,prefix,%_prefix,g' -e 's,libdir,%{_libdir},g' %{S:2} > %{buildroot}%{_bindir}/mpivars.csh
|
2017-06-08 10:50:26 +02:00
|
|
|
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
|
2017-06-14 15:16:46 +02:00
|
|
|
install -m 0644 COPYRIGHT* %{buildroot}%{_datadir}/doc/mvapich2
|
|
|
|
install -m 0644 CHANGE* %{buildroot}%{_datadir}/doc/mvapich2
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%if 0%{?testsuite}
|
2017-06-14 15:16:46 +02:00
|
|
|
# Remove everything from testsuite package
|
|
|
|
# It is all contained by mvapich2 packages
|
|
|
|
rm -rf %{buildroot}/*
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%else
|
2017-06-27 10:56:46 +02:00
|
|
|
mkdir -p %{buildroot}%{_moduledir}
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-06-27 10:56:46 +02:00
|
|
|
cat << EOF > %{buildroot}%{_moduledir}/%{version}
|
2017-06-08 10:50:26 +02:00
|
|
|
#%%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
|
|
|
|
|
2017-06-27 10:56:46 +02:00
|
|
|
cat << EOF > %{buildroot}%{_moduledir}/.version
|
2017-06-08 10:50:26 +02:00
|
|
|
#%%Module1.0
|
|
|
|
set ModulesVersion "%{version}"
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
|
|
|
/usr/bin/mpi-selector \
|
2017-06-27 10:56:46 +02:00
|
|
|
--register %{name}%{pack_suff}-%{version} \
|
2017-06-08 10:50:26 +02:00
|
|
|
--source-dir %{_bindir} \
|
|
|
|
--yes
|
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
2017-06-27 10:56:46 +02:00
|
|
|
/usr/bin/mpi-selector --unregister %{name}%{pack_suff}-%{version} --yes --silent
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc %{_datadir}/doc
|
|
|
|
%dir /usr/%_lib/mpi
|
|
|
|
%dir /usr/%_lib/mpi/gcc
|
|
|
|
%dir %{_prefix}
|
|
|
|
%dir %{_bindir}
|
|
|
|
%dir %{_datadir}
|
|
|
|
%dir %{_includedir}
|
2017-06-27 10:56:46 +02:00
|
|
|
%dir /usr/share/modules
|
|
|
|
%dir %{_moduledir}
|
2017-06-08 10:50:26 +02:00
|
|
|
%dir %{_mandir}
|
|
|
|
%dir %{_mandir}/man1
|
|
|
|
%dir %{_mandir}/man3
|
|
|
|
%dir %{_libdir}
|
|
|
|
%dir %{_libexecdir}
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_libexecdir}/osu-micro-benchmarks
|
2017-06-27 10:56:46 +02:00
|
|
|
%{_moduledir}
|
2017-06-08 10:50:26 +02:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%endif # !testsuite
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%changelog
|