2017-06-08 10:50:26 +02:00
|
|
|
#
|
|
|
|
# spec file for package mvapich2
|
|
|
|
#
|
2019-03-21 13:59:45 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-06-08 10:50:26 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-21 13:59:45 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-08 10:50:26 +02:00
|
|
|
#
|
|
|
|
|
2017-07-13 10:13:19 +02:00
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
|
|
|
%define pname mvapich2
|
2019-05-13 12:06:42 +02:00
|
|
|
%define vers 2.3.1
|
|
|
|
%define _vers 2_3_1
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{flavor}" == ""
|
2017-10-06 08:44:19 +02:00
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%{bcond_with hpc}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "standard"
|
2017-09-11 14:09:49 +02:00
|
|
|
%define build_flavor verbs
|
2017-10-06 08:44:19 +02:00
|
|
|
%{bcond_with hpc}
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == "testsuite"
|
|
|
|
%define build_flavor verbs
|
|
|
|
%define testsuite 1
|
2017-10-06 08:44:19 +02:00
|
|
|
%{bcond_with hpc}
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "psm"
|
|
|
|
%define build_flavor psm
|
2017-10-06 08:44:19 +02:00
|
|
|
%{bcond_with hpc}
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == "psm-testsuite"
|
|
|
|
%define build_flavor psm
|
|
|
|
%define testsuite 1
|
2017-10-06 08:44:19 +02:00
|
|
|
%{bcond_with hpc}
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "psm2"
|
|
|
|
%define build_flavor psm2
|
2017-10-06 08:44:19 +02:00
|
|
|
%{bcond_with hpc}
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == "psm2-testsuite"
|
|
|
|
%define build_flavor psm2
|
|
|
|
%define testsuite 1
|
2017-10-06 08:44:19 +02:00
|
|
|
%{bcond_with hpc}
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
%if "%flavor" == "gnu-hpc"
|
|
|
|
%define compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%define build_flavor verbs
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
|
|
|
%if "%flavor" == "gnu-hpc-testsuite"
|
|
|
|
%define compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%define testsuite 1
|
|
|
|
%define build_flavor verbs
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%flavor" == "gnu-hpc-psm"
|
|
|
|
%define compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%define build_flavor psm
|
|
|
|
%{bcond_without hpc}
|
2017-06-26 12:20:27 +02:00
|
|
|
%endif
|
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
%if "%flavor" == "gnu-hpc-psm2"
|
|
|
|
%define compiler_family gnu
|
|
|
|
%undefine c_f_ver
|
|
|
|
%define build_flavor psm2
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
|
|
|
|
2018-01-08 10:46:26 +01:00
|
|
|
%if "%flavor" == "gnu7-hpc"
|
2017-10-06 08:44:19 +02:00
|
|
|
%define compiler_family gnu
|
2018-01-08 10:46:26 +01:00
|
|
|
%define c_f_ver 7
|
2017-10-06 08:44:19 +02:00
|
|
|
%define build_flavor verbs
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
2018-01-08 10:46:26 +01:00
|
|
|
%if "%flavor" == "gnu7-hpc-testsuite"
|
2017-10-06 08:44:19 +02:00
|
|
|
%define compiler_family gnu
|
2018-01-08 10:46:26 +01:00
|
|
|
%define c_f_ver 7
|
2017-10-06 08:44:19 +02:00
|
|
|
%define testsuite 1
|
|
|
|
%define build_flavor verbs
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
|
|
|
|
2018-01-08 10:46:26 +01:00
|
|
|
%if "%flavor" == "gnu7-hpc-psm"
|
2017-10-06 08:44:19 +02:00
|
|
|
%define compiler_family gnu
|
2018-01-08 10:46:26 +01:00
|
|
|
%define c_f_ver 7
|
2017-10-06 08:44:19 +02:00
|
|
|
%define build_flavor psm
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
|
|
|
|
2018-01-08 10:46:26 +01:00
|
|
|
%if "%flavor" == "gnu7-hpc-psm2"
|
2017-10-06 08:44:19 +02:00
|
|
|
%define compiler_family gnu
|
2018-01-08 10:46:26 +01:00
|
|
|
%define c_f_ver 7
|
2017-10-06 08:44:19 +02:00
|
|
|
%define build_flavor psm2
|
|
|
|
%{bcond_without hpc}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{build_flavor}" != "verbs"
|
|
|
|
%define pack_suff %{?build_flavor:-%{build_flavor}}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
%define module_name mvapich2%{?pack_suff}
|
|
|
|
%define p_prefix /usr/%_lib/mpi/gcc/%{module_name}
|
|
|
|
%define p_bindir %{p_prefix}/bin
|
|
|
|
%define p_datadir %{p_prefix}/share
|
|
|
|
%define p_includedir %{p_prefix}/include
|
|
|
|
%define p_mandir %{p_datadir}/man
|
|
|
|
%define p_libdir %{p_prefix}/%{_lib}
|
|
|
|
%define p_libexecdir %{p_prefix}/%{_lib}
|
2017-06-27 10:56:46 +02:00
|
|
|
%define _moduledir /usr/share/modules/gnu-%{module_name}
|
2017-10-06 08:44:19 +02:00
|
|
|
%define package_name mvapich2%{?pack_suff}
|
|
|
|
%else
|
|
|
|
%{hpc_init -M -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} -m mvapich2 %{?pack_suff:-e %{build_flavor}}}
|
|
|
|
%define p_prefix %{hpc_prefix}
|
|
|
|
%define p_bindir %{hpc_bindir}
|
|
|
|
%define p_datadir %{hpc_datadir}
|
|
|
|
%define p_includedir %{hpc_includedir}
|
|
|
|
%define p_mandir %{hpc_mandir}
|
|
|
|
%define p_libdir %{hpc_libdir}
|
|
|
|
%define p_libexecdir %{hpc_libexecdir}
|
|
|
|
%define package_name %{hpc_package_name %{_vers}}
|
|
|
|
|
|
|
|
%global hpc_mvapich2_dep_version %(VER=%{?m_f_ver}; echo -n ${VER})
|
|
|
|
%global hpc_mvapich2_dir mvapich2
|
|
|
|
%global hpc_mvapich2_pack_version %{hpc_mvapich2_dep_version}
|
|
|
|
%endif
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2018-06-14 18:00:23 +02:00
|
|
|
# Disable hpc builds for SLE12
|
|
|
|
%if 0%{?sle_version} > 120200 && 0%{?sle_version} < 150000 && %{with hpc}
|
|
|
|
%{bcond_with skip_hpc_build}
|
|
|
|
%else
|
|
|
|
%{bcond_without skip_hpc_build}
|
|
|
|
%endif
|
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
Name: %{package_name}
|
2017-06-08 10:50:26 +02:00
|
|
|
Summary: OSU MVAPICH2 MPI package
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/Parallel
|
2017-10-06 08:44:19 +02:00
|
|
|
Version: %{vers}
|
2017-06-08 10:50:26 +02:00
|
|
|
Release: 0
|
2017-10-06 08:44:19 +02:00
|
|
|
Source0: mvapich2-%{version}.tar.gz
|
2017-06-08 10:50:26 +02:00
|
|
|
Source1: mpivars.sh
|
|
|
|
Source2: mpivars.csh
|
2017-10-06 08:44:19 +02:00
|
|
|
Source3: macros.hpc-mvapich2
|
|
|
|
Source100: _multibuild
|
2017-06-09 09:27:29 +02:00
|
|
|
Patch0: mvapich2-s390_get_cycles.patch
|
|
|
|
Patch2: mvapich2-arm-support.patch
|
2019-03-21 13:59:45 +01:00
|
|
|
# PATCH-FIX-UPSTREAM 0001-Drop-GCC-check.patch (bnc#1129421)
|
|
|
|
# It's been merged upstream, should be removed with the next release
|
|
|
|
Patch3: 0001-Drop-GCC-check.patch
|
2019-06-04 07:59:12 +02:00
|
|
|
Patch4: reproducible.patch
|
2019-08-02 14:14:19 +02:00
|
|
|
Patch5: mvapich2-make-sure-ibv_get_device_list-returned-one-before-freeing-it.patch
|
2017-06-08 10:50:26 +02:00
|
|
|
Url: http://mvapich.cse.ohio-state.edu/overview/mvapich2/
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2018-06-14 18:00:23 +02:00
|
|
|
|
|
|
|
%if %{without skip_hpc_build}
|
2018-06-14 15:46:56 +02:00
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
2018-06-14 18:00:23 +02:00
|
|
|
|
2017-06-08 10:50:26 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: bison
|
2018-03-26 16:24:11 +02:00
|
|
|
%ifnarch s390 s390x %{arm}
|
2017-06-08 10:50:26 +02:00
|
|
|
BuildRequires: libnuma-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: sysfsutils
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{without hpc}
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gcc-fortran
|
|
|
|
BuildRequires: mpi-selector
|
|
|
|
%else
|
|
|
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
|
|
|
BuildRequires: lua-lmod
|
|
|
|
BuildRequires: suse-hpc
|
|
|
|
%endif
|
2018-06-14 18:00:23 +02:00
|
|
|
%if "%{build_flavor}" == "psm" && %{with skip_hpc_build}
|
2017-06-08 10:50:26 +02:00
|
|
|
ExclusiveArch: %ix86 x86_64
|
|
|
|
BuildRequires: infinipath-psm-devel
|
|
|
|
%endif
|
2018-06-14 18:00:23 +02:00
|
|
|
%if "%{build_flavor}" == "psm2" && %{with skip_hpc_build}
|
2017-06-27 10:56:46 +02:00
|
|
|
ExclusiveArch: x86_64
|
|
|
|
BuildRequires: libpsm2-devel
|
2017-06-08 10:50:26 +02:00
|
|
|
%endif
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{build_flavor}" == "verbs"
|
|
|
|
BuildRequires: infiniband-diags-devel
|
|
|
|
BuildRequires: libibumad-devel
|
|
|
|
BuildRequires: libibverbs-devel
|
|
|
|
BuildRequires: librdmacm-devel
|
2017-10-06 08:44:19 +02:00
|
|
|
%if 0%{?sle_version} <= 120200
|
|
|
|
BuildRequires: libibmad-devel
|
|
|
|
%endif
|
2017-09-11 14:09:49 +02:00
|
|
|
%endif
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{without hpc}
|
2017-06-08 10:50:26 +02:00
|
|
|
Requires: mpi-selector
|
2017-10-06 08:44:19 +02:00
|
|
|
%else
|
2018-01-08 10:46:26 +01:00
|
|
|
%hpc_requires
|
2017-10-06 08:44:19 +02:00
|
|
|
%endif
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This is an MPI-3 implementation which includes all MPI-1 features. It
|
|
|
|
is based on MPICH2 and MVICH.
|
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
%{!?testsuite:%{?with_hpc:%{hpc_master_package -a -L}}}
|
|
|
|
|
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}
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{build_flavor}" == "psm"
|
2017-06-08 10:50:26 +02:00
|
|
|
Requires: infinipath-psm-devel
|
|
|
|
%endif
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{build_flavor}" == "psm2"
|
2017-06-27 10:56:46 +02:00
|
|
|
Requires: libpsm2-devel
|
2017-06-08 10:50:26 +02:00
|
|
|
%endif
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{build_flavor}" == "verbs"
|
|
|
|
Requires: libibumad-devel
|
|
|
|
Requires: libibverbs-devel
|
|
|
|
Requires: librdmacm-devel
|
|
|
|
%endif
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{without hpc}
|
|
|
|
Requires: gcc-c++
|
|
|
|
Requires: gcc-fortran
|
|
|
|
%else
|
|
|
|
%hpc_requires_devel
|
|
|
|
%endif
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This is an MPI-2 implementation which includes all MPI-1 features. It
|
|
|
|
is based on MPICH2 and MVICH.
|
|
|
|
|
2017-10-06 08:44:19 +02:00
|
|
|
%{?with_hpc:%{hpc_master_package -a devel}}
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%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-10-06 12:24:47 +02:00
|
|
|
%package doc
|
2017-10-06 08:44:19 +02:00
|
|
|
Summary: OSU MVAPICH2 MPI package - Documentation
|
|
|
|
Group: Development/Libraries/Parallel
|
2017-10-06 12:24:47 +02:00
|
|
|
Requires: %{name} = %{version}
|
2017-10-06 08:44:19 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
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
|
|
|
|
|
|
|
|
%{?with_hpc:%{hpc_master_package doc}}
|
|
|
|
|
2017-10-06 12:24:47 +02:00
|
|
|
%package macros-devel
|
2017-10-06 08:44:19 +02:00
|
|
|
Summary: OSU MVAPICH2 MPI package - HPC build macros
|
|
|
|
Group: Development/Libraries/Parallel
|
|
|
|
Requires: %{name}-devel = %{version}
|
2017-10-06 16:06:55 +02:00
|
|
|
Provides: %{pname}-hpc-macros-devel = %{version}
|
|
|
|
Conflicts: otherproviders(%{pname}-hpc-macros-devel)
|
2017-10-06 08:44:19 +02:00
|
|
|
|
|
|
|
%description macros-devel
|
|
|
|
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
|
|
|
|
|
|
|
|
%{?with_hpc:%{hpc_master_package macros-devel}}
|
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%endif # ! testsuite
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%prep
|
2017-10-06 08:44:19 +02:00
|
|
|
|
|
|
|
%{?with_hpc:%hpc_debug}
|
2017-06-08 10:50:26 +02:00
|
|
|
%setup -q -n mvapich2-%{version}%{?rc_ver}
|
|
|
|
%patch0
|
2017-06-09 09:27:29 +02:00
|
|
|
%patch2
|
2019-03-21 13:59:45 +01:00
|
|
|
%patch3
|
2019-06-04 07:59:12 +02:00
|
|
|
%patch4 -p1
|
2019-08-02 14:14:19 +02:00
|
|
|
%patch5
|
2017-06-08 10:50:26 +02:00
|
|
|
cp /usr/share/automake*/config.* .
|
|
|
|
|
|
|
|
%build
|
2019-03-21 13:59:45 +01:00
|
|
|
PERL_USE_UNSAFE_INC=1 ./autogen.sh
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%{hpc_setup}
|
|
|
|
%{hpc_configure} \
|
|
|
|
%else
|
2017-07-06 09:18:09 +02:00
|
|
|
%configure \
|
2017-10-06 08:44:19 +02:00
|
|
|
--prefix=%{p_prefix} \
|
|
|
|
--exec-prefix=%{p_prefix} \
|
|
|
|
--datadir=%{p_datadir} \
|
|
|
|
--bindir=%{p_bindir} \
|
|
|
|
--includedir=%{p_includedir} \
|
|
|
|
--libdir=%{p_libdir} \
|
|
|
|
--libexecdir=%{p_libexecdir} \
|
|
|
|
--mandir=%{p_mandir} \
|
|
|
|
%endif
|
|
|
|
--docdir=%{_datadir}/doc/%{name} \
|
|
|
|
--disable-wrapper-rpath \
|
2018-07-25 13:34:34 +02:00
|
|
|
--enable-yield=sched_yield \
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{build_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
|
2017-09-11 14:09:49 +02:00
|
|
|
%if "%{build_flavor}" == "psm2"
|
2017-06-27 10:56:46 +02:00
|
|
|
--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
|
|
|
|
|
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-10-06 08:44:19 +02:00
|
|
|
make DESTDIR=%{buildroot} V=1 install
|
|
|
|
|
|
|
|
rm -f %{buildroot}%{p_libdir}/libfmpich.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpich.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpichcxx.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpichf90.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpl.la \
|
|
|
|
%{buildroot}%{p_libdir}/libopa.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpi.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpicxx.la \
|
|
|
|
%{buildroot}%{p_libdir}/libmpifort.la
|
|
|
|
install -m 0755 -d %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
install -m 0644 COPYRIGHT* %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
install -m 0644 CHANGE* %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
# make and install mpivars files
|
|
|
|
install -m 0755 -d %{buildroot}%{_bindir}
|
|
|
|
sed -e 's,prefix,%p_prefix,g' -e 's,libdir,%{p_libdir},g' %{S:1} > %{buildroot}%{p_bindir}/mpivars.sh
|
|
|
|
sed -e 's,prefix,%p_prefix,g' -e 's,libdir,%{p_libdir},g' %{S:2} > %{buildroot}%{p_bindir}/mpivars.csh
|
|
|
|
|
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
|
2017-10-06 08:44:19 +02:00
|
|
|
prepend-path PATH %{%p_bindir}
|
|
|
|
prepend-path INCLUDE %{p_includedir}
|
|
|
|
prepend-path INCLUDE %{p_libdir}
|
|
|
|
prepend-path MANPATH %{p_mandir}
|
|
|
|
prepend-path LD_LIBRARY_PATH %{p_libdir}
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
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
|
2017-10-06 08:44:19 +02:00
|
|
|
%else # with hpc
|
|
|
|
|
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/rpm
|
|
|
|
cp %{S:3} %{buildroot}%{_sysconfdir}/rpm
|
|
|
|
|
|
|
|
%hpc_write_modules_files
|
|
|
|
#%%Module1.0#####################################################################
|
|
|
|
|
|
|
|
proc ModulesHelp { } {
|
|
|
|
|
|
|
|
puts stderr " "
|
|
|
|
puts stderr "This module loads the %{pname} library built with the %{compiler_family} toolchain."
|
|
|
|
puts stderr "\nVersion %{version}\n"
|
|
|
|
|
|
|
|
}
|
|
|
|
module-whatis "Name: %{pname} built with %{compiler_family} toolchain"
|
|
|
|
module-whatis "Version: %{version}"
|
|
|
|
module-whatis "Category: runtime library"
|
2018-02-09 14:57:04 +01:00
|
|
|
module-whatis "Description: %{SUMMARY:0}"
|
2017-10-06 08:44:19 +02:00
|
|
|
module-whatis "URL: %{url}"
|
|
|
|
|
|
|
|
set version %{version}
|
|
|
|
|
|
|
|
prepend-path PATH %{hpc_prefix}/bin
|
|
|
|
prepend-path MANPATH %{hpc_prefix}/man
|
|
|
|
prepend-path LD_LIBRARY_PATH %{hpc_prefix}/%_lib
|
|
|
|
prepend-path MODULEPATH %{hpc_modulepath}
|
|
|
|
prepend-path MPI_DIR %{hpc_prefix}
|
|
|
|
%{hpc_modulefile_add_pkgconfig_path}
|
|
|
|
|
|
|
|
family "MPI"
|
|
|
|
EOF
|
|
|
|
cat <<EOF > %{buildroot}/%{p_bindir}/mpivars.sh
|
2018-01-31 09:08:34 +01:00
|
|
|
%hpc_setup_compiler
|
|
|
|
module load %{hpc_mpi_family}%{?pack_suff}/%{version}
|
2017-10-06 08:44:19 +02:00
|
|
|
EOF
|
2018-01-31 09:08:34 +01:00
|
|
|
sed -e "s/export/setenv/" -e "s/=/ /" \
|
2018-01-31 11:08:01 +01:00
|
|
|
%{buildroot}/%{p_bindir}/mpivars.sh > \
|
|
|
|
%{buildroot}/%{p_bindir}/mpivars.csh
|
2018-01-31 09:08:34 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
2017-10-06 08:44:19 +02:00
|
|
|
|
|
|
|
%endif # with hpc
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{without hpc}
|
2018-09-06 17:42:12 +02:00
|
|
|
# Always register. We might be already registered in the case of an udate
|
|
|
|
# but mpi-selector handles it fine
|
2017-06-08 10:50:26 +02:00
|
|
|
/usr/bin/mpi-selector \
|
2018-09-06 17:42:12 +02:00
|
|
|
--register %{name}%{?pack_suff} \
|
2017-10-06 08:44:19 +02:00
|
|
|
--source-dir %{p_bindir} \
|
2017-06-08 10:50:26 +02:00
|
|
|
--yes
|
2017-10-06 08:44:19 +02:00
|
|
|
%endif
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{without hpc}
|
2018-09-06 17:42:12 +02:00
|
|
|
# Only unregister when uninstalling
|
2018-09-07 11:15:20 +02:00
|
|
|
if [ "$1" = "0" ]; then
|
2018-09-06 17:42:12 +02:00
|
|
|
/usr/bin/mpi-selector --unregister %{name}%{?pack_suff} --yes
|
|
|
|
# Deregister the default if we are uninstalling it
|
2018-09-17 11:24:22 +02:00
|
|
|
if [ "$(/usr/bin/mpi-selector --system --query)" = "%{name}%{?pack_suff}" ]; then
|
2018-09-06 17:42:12 +02:00
|
|
|
/usr/bin/mpi-selector --system --unset --yes
|
|
|
|
fi
|
|
|
|
fi
|
2017-10-06 08:44:19 +02:00
|
|
|
%else
|
|
|
|
%hpc_module_delete_if_default
|
|
|
|
%endif
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2017-10-06 08:44:19 +02:00
|
|
|
%if %{without hpc}
|
2017-06-08 10:50:26 +02:00
|
|
|
%dir /usr/%_lib/mpi
|
|
|
|
%dir /usr/%_lib/mpi/gcc
|
2017-06-27 10:56:46 +02:00
|
|
|
%dir /usr/share/modules
|
|
|
|
%dir %{_moduledir}
|
|
|
|
%{_moduledir}
|
2017-10-06 08:44:19 +02:00
|
|
|
%else
|
|
|
|
%hpc_mpi_dirs
|
|
|
|
%hpc_modules_files
|
|
|
|
%endif
|
|
|
|
%doc %{_datadir}/doc/%{name}/COPYRIGHT*
|
|
|
|
%doc %{_datadir}/doc/%{name}/CHANGE*
|
|
|
|
%dir %{p_prefix}
|
|
|
|
%dir %{p_bindir}
|
|
|
|
%dir %{p_datadir}
|
|
|
|
%dir %{p_includedir}
|
|
|
|
%dir %{p_mandir}
|
|
|
|
%dir %{p_mandir}/man1
|
|
|
|
%dir %{p_mandir}/man3
|
|
|
|
%dir %{p_libdir}
|
|
|
|
%dir %{p_libexecdir}
|
|
|
|
%{p_bindir}/*
|
|
|
|
%{p_libexecdir}/osu-micro-benchmarks
|
|
|
|
%{p_mandir}/man1/*
|
|
|
|
%{p_libdir}/*.so.*
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc %{_datadir}/doc/%{name}
|
|
|
|
%exclude /%{_datadir}/doc/%{name}/COPYRIGHT*
|
|
|
|
%exclude /%{_datadir}/doc/%{name}/CHANGE*
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2017-10-06 08:44:19 +02:00
|
|
|
%dir %{p_libdir}/pkgconfig
|
|
|
|
%{p_mandir}/man3/*
|
|
|
|
%{p_includedir}
|
|
|
|
%{p_libdir}/*.so
|
|
|
|
%{p_libdir}/pkgconfig/mvapich2.pc
|
|
|
|
%{p_libdir}/pkgconfig/openpa.pc
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root)
|
2017-10-06 08:44:19 +02:00
|
|
|
%{p_libdir}/*.a
|
|
|
|
|
|
|
|
%if %{with hpc}
|
|
|
|
%files macros-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config %{_sysconfdir}/rpm/macros.hpc-mvapich2
|
|
|
|
%endif # with hpc
|
2017-06-08 10:50:26 +02:00
|
|
|
|
2017-06-26 12:20:27 +02:00
|
|
|
%endif # !testsuite
|
2017-06-08 10:50:26 +02:00
|
|
|
|
|
|
|
%changelog
|