diff --git a/petsc-3.12.0-hypre-2.18.0_compatibility_patch.patch b/petsc-3.12.0-hypre-2.18.0_compatibility_patch.patch new file mode 100644 index 0000000..73b725a --- /dev/null +++ b/petsc-3.12.0-hypre-2.18.0_compatibility_patch.patch @@ -0,0 +1,61 @@ +From 0e6427aaee0f47968cf0ac27aab894e1846afdba Mon Sep 17 00:00:00 2001 +From: Satish Balay +Date: Mon, 30 Sep 2019 19:32:42 -0500 +Subject: [PATCH] hypre: update to 2.18.1 - for xsdk-0.5.0 [retain + compatibility with older hypre versions. 12.18.0 is skipped for mixedint + build failure] + +--- + config/BuildSystem/config/packages/hypre.py | 2 +- + src/mat/impls/hypre/mhypre.c | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/config/BuildSystem/config/packages/hypre.py b/config/BuildSystem/config/packages/hypre.py +index ab9701ab6e..869a166138 100644 +--- a/config/BuildSystem/config/packages/hypre.py ++++ b/config/BuildSystem/config/packages/hypre.py +@@ -4,7 +4,7 @@ import os + class Configure(config.package.GNUPackage): + def __init__(self, framework): + config.package.GNUPackage.__init__(self, framework) +- self.version = '2.17.0' ++ self.version = '2.18.1' + self.minversion = '2.14' + self.versionname = 'HYPRE_RELEASE_VERSION' + self.versioninclude = 'HYPRE_config.h' +diff --git a/src/mat/impls/hypre/mhypre.c b/src/mat/impls/hypre/mhypre.c +index 98185417e5..8e8fe678f1 100644 +--- a/src/mat/impls/hypre/mhypre.c ++++ b/src/mat/impls/hypre/mhypre.c +@@ -15,6 +15,10 @@ + #include <_hypre_parcsr_ls.h> + #include <_hypre_sstruct_ls.h> + ++#if PETSC_PKG_HYPRE_VERSION_LT(2,18,0) ++#define hypre_ParCSRMatrixClone(A,B) hypre_ParCSRMatrixCompleteClone(A) ++#endif ++ + PETSC_INTERN PetscErrorCode MatPtAP_IS_XAIJ(Mat,Mat,MatReuse,PetscReal,Mat*); + + static PetscErrorCode MatHYPRE_CreateFromMat(Mat,Mat_HYPRE*); +@@ -1469,7 +1473,7 @@ PETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix *parcsr, MatT + hypre_ParCSRMatrix *new_parcsr; + hypre_CSRMatrix *hdiag,*hoffd,*ndiag,*noffd; + +- new_parcsr = hypre_ParCSRMatrixCompleteClone(parcsr); ++ new_parcsr = hypre_ParCSRMatrixClone(parcsr,0); + hdiag = hypre_ParCSRMatrixDiag(parcsr); + hoffd = hypre_ParCSRMatrixOffd(parcsr); + ndiag = hypre_ParCSRMatrixDiag(new_parcsr); +@@ -1882,7 +1886,7 @@ static PetscErrorCode MatDuplicate_HYPRE(Mat A,MatDuplicateOption op, Mat *B) + PetscFunctionBegin; + ierr = MatHYPREGetParCSR_HYPRE(A,&parcsr);CHKERRQ(ierr); + if (op == MAT_DO_NOT_COPY_VALUES || op == MAT_SHARE_NONZERO_PATTERN) { +- parcsr = hypre_ParCSRMatrixCompleteClone(parcsr); ++ parcsr = hypre_ParCSRMatrixClone(parcsr,0); + cpmode = PETSC_OWN_POINTER; + } else { + cpmode = PETSC_COPY_VALUES; +-- +2.22.0 + diff --git a/petsc.spec b/petsc.spec index 1ef7e0b..3ef59e4 100644 --- a/petsc.spec +++ b/petsc.spec @@ -80,7 +80,7 @@ Name: petsc Summary: Portable Extensible Toolkit for Scientific Computation Version: %{releasever}.0 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD URL: https://www.mcs.anl.gov/petsc Source0: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-%{version}.tar.gz @@ -94,6 +94,9 @@ Patch1: %{name}-lib64.patch # Reverting patch for Hypre-2.11.2 Patch2: %{name}-3.11-hypre_2.11.2_reverting.patch +# Compatibility patch for hypre-2.18.0 +Patch3: %{name}-%{version}-hypre-2.18.0_compatibility_patch.patch + %if %{with superlu} BuildRequires: SuperLU-devel >= 5.2.0 %endif @@ -319,6 +322,10 @@ find src/benchmarks/streams -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env pyth %patch2 -R -p1 %endif +%if 0%{?fedora} && 0%{?fedora} > 31 +%patch3 -p1 +%endif + popd %if %{with arch64} @@ -1010,6 +1017,9 @@ make -C buildmpich_dir test %endif %changelog +* Sun Oct 20 2019 Antonio Trande - 3.12.0-2 +- Patched for hypre-2.18.0 + * Fri Oct 18 2019 Antonio Trande - 3.12.0-1 - Release 3.12.0