Hello community, here is the log from the commit of package petsc for openSUSE:Factory checked in at 2019-07-05 13:48:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/petsc (Old) and /work/SRC/openSUSE:Factory/.petsc.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "petsc" Fri Jul 5 13:48:42 2019 rev:14 rq:688860 version:3.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/petsc/petsc.changes 2018-05-16 18:44:48.540321966 +0200 +++ /work/SRC/openSUSE:Factory/.petsc.new.4615/petsc.changes 2019-07-05 13:48:43.437453845 +0200 @@ -1,0 +2,26 @@ +Tue Mar 26 15:29:56 UTC 2019 - Stefan Brüns <[email protected]> + +- Disable pastix also in openmpi flavor, same as for serial and HPC flavors. + Pastix is only built with openmpi, and not available in Factory. + +------------------------------------------------------------------- +Wed Mar 20 18:15:58 UTC 2019 - Stefan Brüns <[email protected]> + +- Fix building non-MPI flavors of packages depending on petsc + Add petsc-fix-nonmpi.patch +- Do not move headers to /usr/include and symlink, causes problems with + -isystem + +------------------------------------------------------------------- +Wed Mar 13 23:34:19 UTC 2019 - Stefan Brüns <[email protected]> + +- Fix spec for non-HPC, reenable serial and non-HPC openmpi build. +- Disable HYPRE for non-HPC, same as for HPC. + +------------------------------------------------------------------- +Wed Feb 13 11:40:48 UTC 2019 - Egbert Eich <[email protected]> + +- Consolidate use of openmpi1, openmpi2, openmpi3. +- Do not build non-HPC on SLE. + +------------------------------------------------------------------- New: ---- petsc-fix-nonmpi.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ petsc.spec ++++++ --- /var/tmp/diff_new_pack.PX4j5W/_old 2019-07-05 13:48:44.473455443 +0200 +++ /var/tmp/diff_new_pack.PX4j5W/_new 2019-07-05 13:48:44.477455449 +0200 @@ -1,7 +1,7 @@ # # spec file for package petsc # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,7 +12,7 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -25,6 +25,11 @@ ExcludeArch: s390 s390x +# Fails to link during configure, as it omits SuperLU from the link libraries +%bcond_with hypre +# Only available as openmpi flavor, and not in Factory +%bcond_with pastix + %if 0%{?is_opensuse} || 0%{?is_backports} %undefine DisOMPI3 %else @@ -48,6 +53,13 @@ %if "%flavor" == "openmpi" %define mpi_family openmpi +%define mpi_vers 1 +%{bcond_with hpc} +%endif + +%if "%flavor" == "openmpi2" +%define mpi_family openmpi +%define mpi_vers 2 %{bcond_with hpc} %endif @@ -129,13 +141,22 @@ %{bcond_without hpc} %endif +%if !0%{?is_opensuse} && !0%{?with_hpc:1} +ExclusiveArch: do_not_build +%endif + %if %{without hpc} %if 0%{!?package_name:1} -%define package_name() %{pname}%{?with_mpi:-%{mpi_family}} +%define package_name() %{pname}%{?with_mpi:-%{mpi_family}%{?mpi_ext}} %endif -%define libname() lib%{pname}%{so_ver}%{?with_mpi:-%{mpi_family}} +%define libname() lib%{pname}%{so_ver}%{?with_mpi:-%{mpi_family}%{?mpi_ext}} %else -%{hpc_init -c %compiler_family -m %mpi_family %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}} %{?ext:-e %{ext}}} +%{hpc_init -c %compiler_family -m %mpi_family %{?c_f_ver:-v %{c_f_ver}} %{?mpi_vers:-V %{mpi_vers}} %{?ext:-e %{ext}}} + +# For compatibility package names +%if "%{mpi_family}" != "openmpi" || "%{mpi_ver}" != "1" +%define mpi_ext %{?mpi_ver} +%endif %define package_name() %{hpc_package_name %_vers} %define libname() lib%{pname}%{expand:%%{hpc_package_name_tail %{**}}} @@ -152,9 +173,9 @@ %if %{without mpi} %define p_base %{_prefix}/ %else -%{!?mpi_family:%global mpi_family openmpi} -%define p_base %{_libdir}/mpi/gcc/%{mpi_family}/ -%define n_pref %{?with_mpi:%{mpi_family}-} + %{?with_mpi:%{!?mpi_family:error "No MPI family specified!"}} + +%define p_base %{_libdir}/mpi/gcc/%{mpi_family}%{?mpi_ext}/ %endif # mpi %define p_prefix %{p_libdir}/petsc/%{version}/%petsc_arch %else # hpc @@ -163,7 +184,7 @@ %endif %define p_libdir %{p_base}%_lib -%define p_include %{p_base}include +%define p_include %{p_prefix}/include %define petsc_arch linux-gnu-c-opt @@ -181,6 +202,8 @@ Patch3: petsc-3.3-fix-error-detection-in-makefile.patch Patch4: petsc-3.7-fix-pastix-detection.patch Patch5: Python-Fix-a-number-of-scripts-to-by-Python-3-compliant.patch +# PATCH-FIX-UPSTREAM [rebased] -- Fix building non-MPI flavors of packages depending on petsc +Patch6: petsc-fix-nonmpi.patch Url: http://www.mcs.anl.gov/petsc/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{!?makedoc:1} @@ -198,18 +221,25 @@ BuildRequires: gcc-c++ BuildRequires: gcc-fortran BuildRequires: lapack-devel -BuildRequires: metis-devel BuildRequires: suitesparse-devel %if %{with mpi} -BuildRequires: %{mpi_family}-devel -BuildRequires: blacs-%{mpi_family}-devel -BuildRequires: hdf5-%{mpi_family}-devel -BuildRequires: hypre-%{mpi_family}-devel -BuildRequires: libptscotch-%{mpi_family}-devel -BuildRequires: libptscotch-parmetis-%{mpi_family}-devel -BuildRequires: pastix-%{mpi_family}-devel -BuildRequires: scalapack-%{mpi_family}-devel +BuildRequires: %{mpi_family}%{?mpi_ext}-devel +BuildRequires: blacs-%{mpi_family}%{?mpi_ext}-devel +BuildRequires: hdf5-%{mpi_family}%{?mpi_ext}-devel +%if %{with hypre} +BuildRequires: hypre-%{mpi_family}%{?mpi_ext}-devel +BuildRequires: superlu-devel +%endif +BuildRequires: ptscotch-%{mpi_family}%{?mpi_ext}-devel +BuildRequires: ptscotch-parmetis-%{mpi_family}%{?mpi_ext}-devel +#!BuildIgnore: metis-devel +%if %{with pastix} +BuildRequires: pastix-%{mpi_family}%{?mpi_ext}-devel +%endif +BuildRequires: scalapack-%{mpi_family}%{?mpi_ext}-devel + %else +BuildRequires: metis-devel %endif %else BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel @@ -258,12 +288,12 @@ Requires: metis-devel %else Requires: %{libname %_vers} = %{version} -Requires: blacs-%{mpi_family}-devel -Requires: hdf5-%{mpi_family}-devel -Requires: hypre-%{mpi_family}-devel -Requires: libptscotch-%{mpi_family}-devel -Requires: libptscotch-parmetis-%{mpi_family}-devel -Requires: scalapack-%{mpi_family}-devel +Requires: blacs-%{mpi_family}%{?mpi_ext}-devel +Requires: hdf5-%{mpi_family}%{?mpi_ext}-devel +Requires: hypre-%{mpi_family}%{?mpi_ext}-devel +Requires: ptscotch-%{mpi_family}%{?mpi_ext}-devel +Requires: ptscotch-parmetis-%{mpi_family}%{?mpi_ext}-devel +Requires: scalapack-%{mpi_family}%{?mpi_ext}-devel %endif %else # with hpc Requires: %{libname %_vers} = %{version} @@ -310,6 +340,7 @@ %patch3 -p1 -b .error-detect %patch4 -p1 -b .pastix-detect %patch5 -p1 +%patch6 -p1 %if 0%{?makedoc:1} %files doc @@ -363,22 +394,27 @@ --with-mpi=1 \ --with-mpi-dir=%{p_base}\ --with-blacs=1 \ - --with-blacs-include=%{p_include} \ + --with-blacs-include=%{p_base}/include \ --with-blacs-lib=[%{p_libdir}/libblacs.so] \ + %if %{with pastix} --with-pastix=1 \ --with-pastix-pkg-config=%{p_libdir}/pkgconfig \ + %endif --with-ptscotch=1 \ - --with-ptscotch-include=%{p_include} \ + --with-ptscotch-include=%{p_base}/include \ --with-ptscotch-lib=[%{p_libdir}/libptscotch.so,%{p_libdir}/libptscotcherr.so,%{p_libdir}/libptscotcherrexit.so,%{p_libdir}/libptscotchparmetis.so] \ --with-scalapack=1 \ - --with-scalapack-include=%{p_include} \ + --with-scalapack-include=%{p_base}/include \ --with-scalapack-lib=[%{p_libdir}/libscalapack.so] \ + %if %{with hypre} + --with-superlu=1 \ --with-hypre=1 \ - --with-hypre-include=%{p_include}/hypre \ + --with-hypre-include=%{p_base}/include/hypre \ --with-hypre-lib=%{p_libdir}/libHYPRE.so \ + %endif --with-hdf5=1 \ --with-hdf5-lib=%{p_libdir}/libhdf5.so \ - --with-hdf5-include=%{p_include} + --with-hdf5-include=%{p_base}/include %endif %else # with hpc --with-blas-lapack-lib=$OPENBLAS_LIB/libopenblas.so \ @@ -415,10 +451,6 @@ rm -rf %{buildroot}%{p_prefix}/lib/petsc/conf/*.py rm -rf %{buildroot}%{p_prefix}/lib/petsc/conf/modules -# move include dirs outside ptesc dir -mv %{buildroot}%{p_prefix}/include %{buildroot}%{p_base}/ -ln -s %{p_include} %{buildroot}%{p_prefix}/include - # create symlink for libs between %%libdir and petscdir pushd %{buildroot}%{p_libdir} for f in petsc/%{version}/%petsc_arch/lib/*.so*; do @@ -428,7 +460,7 @@ # Module files mkdir -p %{buildroot}/usr/share/modules/%{name}-%{petsc_arch} -cat << EOF > %{buildroot}/usr/share/modules/%{name}-%{petsc_arch}/%version%{?with_mpi:-%{mpi_family}} +cat << EOF > %{buildroot}/usr/share/modules/%{name}-%{petsc_arch}/%version%{?with_mpi:-%{mpi_family}%{?mpi_ext}} #%%Module proc ModulesHelp { } { global dotversion @@ -494,13 +526,13 @@ puts stderr " " puts stderr "This module loads the PETSc library built with the %{compiler_family} compiler" -puts stderr "toolchain and the %{mpi_family} MPI stack." +puts stderr "toolchain and the %{mpi_family}%{?mpi_vers} MPI stack." puts stderr " " puts stderr "\nVersion %{version}\n" } -module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family} MPI" +module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family}%{?mpi_vers} MPI" module-whatis "Version: %{version}" module-whatis "Category: runtime library" module-whatis "Description: %{SUMMARY:0}" @@ -578,7 +610,6 @@ %{?with_hpc:%{hpc_module_delete_if_default}} %files -n %{libname %_vers} -%defattr(-,root,root,-) %doc docs/manual.pdf %if %{without hpc} %dir %{p_libdir}/petsc @@ -586,18 +617,17 @@ %else %hpc_dirs %hpc_modules_files +%{dirname:%{hpc_python_sitearch_no_singlespec}} %endif # with hpc %dir %{p_prefix} %dir %{p_prefix}/lib %{p_libdir}/*.so.* %{!?with_hpc:%{p_prefix}/lib/*.so.*} %{p_prefix}/share -%{dirname:%{hpc_python_sitearch_no_singlespec}} %exclude %{p_prefix}/share/petsc/examples %exclude %{p_prefix}/share/petsc/saws %files %{?n_pre}devel -%defattr(-,root,root,-) %{p_prefix}/bin %exclude %{p_prefix}/bin/saws %{p_prefix}/include @@ -608,13 +638,12 @@ %if %{without hpc} %{p_prefix}/lib/*.so %dir %{_datadir}/modules/%{name}-%{petsc_arch} -%{_datadir}/modules/%{name}-%{petsc_arch}/%version%{?with_mpi:-%{mpi_family}} +%{_datadir}/modules/%{name}-%{petsc_arch}/%version%{?with_mpi:-%{mpi_family}%{?mpi_ext}} %endif %{p_prefix}/share/petsc/examples %if %{with hpc} %files saws -%defattr(-,root,root,-) %{p_prefix}/bin/saws %{p_prefix}/share/petsc/saws %endif ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.PX4j5W/_old 2019-07-05 13:48:44.529455529 +0200 +++ /var/tmp/diff_new_pack.PX4j5W/_new 2019-07-05 13:48:44.529455529 +0200 @@ -1,7 +1,7 @@ <multibuild> <package>doc</package> - <!-- <package>serial</package> --> - <!-- <package>openmpi</package> --> + <package>serial</package> + <package>openmpi</package> <package>gnu-openmpi-hpc</package> <package>gnu-openmpi2-hpc</package> <package>gnu-openmpi3-hpc</package> ++++++ petsc-fix-nonmpi.patch ++++++ >From e771154c37bc6fe9f87d08fde802125c02a241e3 Mon Sep 17 00:00:00 2001 From: Jed Brown <[email protected]> Date: Wed, 25 Apr 2018 14:16:55 -0600 Subject: [PATCH] Include <petsc/mpiuni/mpi.h> instead of requiring extra -I on command-line This makes a PETSc --with-mpi=0 behave more predictably for people who do not want to know about MPI. --- include/petscsys.h | 6 +++++- src/benchmarks/streams/MPIVersion.c | 2 -- src/dm/examples/tests/ex42.c | 3 +-- src/tao/leastsquares/examples/tutorials/chwirut2.c | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/petscsys.h b/include/petscsys.h index 6d893c0a8e..43e07d644a 100644 --- a/include/petscsys.h +++ b/include/petscsys.h @@ -127,7 +127,11 @@ void assert_never_put_petsc_headers_inside_an_extern_c(int); void assert_never_p #if !defined(OMPI_WANT_MPI_INTERFACE_WARNING) # define OMPI_WANT_MPI_INTERFACE_WARNING 0 #endif -#include <mpi.h> +#if defined(PETSC_HAVE_MPIUNI) +# include <petsc/mpiuni/mpi.h> +#else +# include <mpi.h> +#endif /* Perform various sanity checks that the correct mpi.h is being included at compile time. diff --git a/src/benchmarks/streams/MPIVersion.c b/src/benchmarks/streams/MPIVersion.c index 569e107b21..6fe8a7aeec 100644 --- a/src/benchmarks/streams/MPIVersion.c +++ b/src/benchmarks/streams/MPIVersion.c @@ -73,8 +73,6 @@ static double bytes[4] = { 3 * sizeof(double) * N }; -#include <mpi.h> - int main(int argc,char **args) { int quantum, checktick(void); diff --git a/src/dm/examples/tests/ex42.c b/src/dm/examples/tests/ex42.c index 5e9d7a0200..216980c5b9 100644 --- a/src/dm/examples/tests/ex42.c +++ b/src/dm/examples/tests/ex42.c @@ -2,9 +2,8 @@ static char help[] = "Test VTK Rectilinear grid (.vtr) viewer support\n\n"; -#include <mpi.h> #include <petscdm.h> -#include "petscdmda.h" +#include <petscdmda.h> /* Write 3D DMDA vector with coordinates in VTK VTR format diff --git a/src/tao/leastsquares/examples/tutorials/chwirut2.c b/src/tao/leastsquares/examples/tutorials/chwirut2.c index 2868aee2cf..7c94e4f1d0 100644 --- a/src/tao/leastsquares/examples/tutorials/chwirut2.c +++ b/src/tao/leastsquares/examples/tutorials/chwirut2.c @@ -9,7 +9,6 @@ */ #include <petsctao.h> -#include <mpi.h> /*
