From bf9fe186bea770e03977f497b6b213c1f4acb94df034628bf77ef4d2cb791d1f Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Thu, 14 Feb 2019 06:46:56 +0000 Subject: [PATCH] Accepting request 674832 from home:eeich:branches:science - Consolidate use of openmpi1, openmpi2, openmpi3 for non-HPC builds. OBS-URL: https://build.opensuse.org/request/show/674832 OBS-URL: https://build.opensuse.org/package/show/science/hdf5?expand=0&rev=101 --- hdf5.changes | 5 +++++ hdf5.spec | 27 +++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/hdf5.changes b/hdf5.changes index 098df9d..f3993fe 100644 --- a/hdf5.changes +++ b/hdf5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 13 10:37:28 UTC 2019 - Egbert Eich + +- Consolidate use of openmpi1, openmpi2, openmpi3 for non-HPC builds. + ------------------------------------------------------------------- Fri Jan 25 19:14:31 UTC 2019 - eich@suse.com diff --git a/hdf5.spec b/hdf5.spec index 6dd9be4..4b29d67 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -53,19 +53,22 @@ ExclusiveArch: do_not_build %if "%{flavor}" == "openmpi" %{?DisOMPI1} -%global mpi_flavor %{flavor} +%global mpi_flavor openmpi +%define mpi_vers 1 %bcond_with hpc %endif %if "%{flavor}" == "openmpi2" %{?DisOMPI2} -%global mpi_flavor %{flavor} +%global mpi_flavor openmpi +%define mpi_vers 2 %bcond_with hpc %endif %if "%{flavor}" == "openmpi3" %{?DisOMPI3} -%global mpi_flavor %{flavor} +%global mpi_flavor openmpi +%define mpi_vers 3 %bcond_with hpc %endif @@ -166,15 +169,13 @@ ExclusiveArch: do_not_build %endif # Disable until resource issue is resolved. -%if "%mpi_flavor" == "openmpi" +%if "%mpi_flavor" == "openmpi" && 0%{?mpi_vers} == 1 %define _do_check 0 %endif %{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}} %{?with_hpc:%{!?compiler_family:%global compiler_family gnu}} -%{?with_mpi:%{!?mpi_flavor:%global mpi_flavor openmpi}} - -%{?with_mpi:%global my_suffix -%{mpi_flavor}} +%{?with_mpi:%{!?mpi_flavor:error "No MPI family specified!"}} # Magic for OBS Staging. Only build the flavors required by # other packages in the ring. @@ -184,8 +185,13 @@ ExclusiveArch: do_not_build %endif %endif +# For compatibility package names +%if "%{mpi_flavor}" != "openmpi" || "%{mpi_vers}" != "1" +%define mpi_ext %{?mpi_vers} +%endif + %if %{with hpc} -%{hpc_init -c %compiler_family %{?with_mpi:-m %mpi_flavor} %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}} %{?ext:-e %{ext}}} +%{hpc_init -c %compiler_family %{?with_mpi:-m %mpi_flavor} %{?c_f_ver:-v %{c_f_ver}} %{?mpi_vers:-V %{mpi_vers}} %{?ext:-e %{ext}}} %{?with_mpi:%global hpc_module_pname p%{pname}} %define my_prefix %hpc_prefix %define my_bindir %hpc_bindir @@ -201,7 +207,8 @@ ExclusiveArch: do_not_build %define my_libdir %_libdir %define my_incdir %_includedir %else - %define my_prefix %{_libdir}/mpi/gcc/%{mpi_flavor} + %define my_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_ext} + %define my_suffix -%{mpi_flavor}%{?mpi_ext} %define my_bindir %{my_prefix}/bin %define my_libdir %{my_prefix}/%{_lib}/ %define my_incdir %{my_prefix}/include/ @@ -252,7 +259,7 @@ BuildRequires: zlib-devel BuildRequires: gcc-c++ BuildRequires: gcc-fortran %if %{with mpi} -BuildRequires: %{flavor}-devel +BuildRequires: %{mpi_flavor}%{?mpi_ext}-devel %else Requires: lib%{pname}_cpp%{sonum_CXX} = %{version} Requires: lib%{pname}_hl_cpp%{sonum_HL_CXX} = %{version}