Patched for make-4.4.1

This commit is contained in:
Antonio Trande 2023-04-17 21:46:04 +02:00
parent df7dae1230
commit 5b88d84b24
4 changed files with 71 additions and 57 deletions

View File

@ -1,34 +0,0 @@
From e6de09342ce9c4562cc062ff2c1bac4bd956bda0 Mon Sep 17 00:00:00 2001
From: Satish Balay <balay@mcs.anl.gov>
Date: Fri, 30 Mar 2018 09:53:12 -0500
Subject: [PATCH] hypre: update to version 2.14.0
Reported-by: Antonio Trande <sagitter@fedoraproject.org>
---
config/BuildSystem/config/packages/hypre.py | 2 +-
src/mat/impls/hypre/mhypre.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/BuildSystem/config/packages/hypre.py b/config/BuildSystem/config/packages/hypre.py
index 1249b39..620e516 100644
--- a/config/BuildSystem/config/packages/hypre.py
+++ b/config/BuildSystem/config/packages/hypre.py
@@ -5,7 +5,7 @@
def __init__(self, framework):
config.package.GNUPackage.__init__(self, framework)
self.version = '2.19.0'
- self.minversion = '2.14'
+ self.minversion = '2.11.2'
self.versionname = 'HYPRE_RELEASE_VERSION'
self.versioninclude = 'HYPRE_config.h'
self.requiresversion = 1
--- a/src/mat/impls/hypre/mhypre.c
+++ b/src/mat/impls/hypre/mhypre.c
@@ -2131,6 +2131,6 @@
static PetscErrorCode hypre_array_destroy(void *ptr)
{
PetscFunctionBegin;
- hypre_TFree(ptr,HYPRE_MEMORY_HOST);
+ hypre_TFree(ptr);
PetscFunctionReturn(0);
}

View File

@ -0,0 +1,66 @@
From 5ef50a0f30184c572c1829d0a161b2eb8af8a6a3 Mon Sep 17 00:00:00 2001
From: Satish Balay <balay@mcs.anl.gov>
Date: Fri, 3 Mar 2023 11:10:06 -0600
Subject: [PATCH] GNUMake 4.4.1 requires MAKEFLAGS to be in the correct order.
Prepending -j results in errors when using --print-directory (as it gets
translated to 'w')
Fixed by not modifying MAKEFLAGS
Using MAKE: /home/balay/tmp/make-4.4.1/gmake
Using MAKEFLAGS: -j10 -l18.0 w -- PETSC_DIR=/home/balay/petsc PETSC_ARCH=arch-linux-c-debug
==========================================
gmake[3]: Entering directory '/home/balay/petsc'
/usr/bin/python3 ./config/gmakegen.py --petsc-arch=arch-linux-c-debug
/usr/bin/python3 /home/balay/petsc/config/gmakegentest.py --petsc-dir=/home/balay/petsc --petsc-arch=arch-linux-c-debug --testdir=./arch-linux-c-debug/tests
gmake[3]: *** No rule to make target 'w'. Stop.
---
lib/petsc/conf/rules | 16 +++++++++++++++-
makefile | 4 ++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/lib/petsc/conf/rules b/lib/petsc/conf/rules
index 7219d0274e7..a24e64130c4 100644
--- a/lib/petsc/conf/rules
+++ b/lib/petsc/conf/rules
@@ -53,7 +53,21 @@ ${PETSC_DIR}/${PETSC_ARCH}/tests/testfiles:
@${MKDIR} -p ${PETSC_DIR}/${PETSC_ARCH}/tests && touch -t 197102020000 ${PETSC_DIR}/${PETSC_ARCH}/tests/testfiles
libs: ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/files ${PETSC_DIR}/${PETSC_ARCH}/tests/testfiles
- +@cd ${PETSC_DIR} && MAKEFLAGS="-j$(MAKE_NP) -l$(MAKE_LOAD) $(MAKEFLAGS)" ${OMAKE_PRINTDIR} -f gmakefile ${MAKE_PAR_OUT_FLG} V=${V} libs
+ +@r=`echo "${MAKEFLAGS}" | grep ' \-j'`; \
+ if [ "$$?" = 0 ]; then \
+ make_j="";\
+ echo "Skipping adding -jMAKE_NP option as -j option is already specified"; \
+ else \
+ make_j="-j${MAKE_NP}"; \
+ fi; \
+ r=`echo "${MAKEFLAGS}" | grep ' \-l'`; \
+ if [ "$$?" = 0 ]; then \
+ make_l="";\
+ echo "Skipping adding -lMAKE_LOAD option as -l option is already specified"; \
+ else \
+ make_l="-l${MAKE_LOAD}"; \
+ fi; \
+ cd ${PETSC_DIR} && ${OMAKE_PRINTDIR} -f gmakefile $${make_j} $${make_l} ${MAKE_PAR_OUT_FLG} V=${V} libs
# Does nothing; needed for some rules that require actions.
foo:
diff --git a/makefile b/makefile
index a8329057970..8cdd2fc5af1 100644
--- a/makefile
+++ b/makefile
@@ -122,8 +122,8 @@ info:
-@echo "------------------------------------------"
-@echo "Using mpiexec: ${MPIEXEC}"
-@echo "------------------------------------------"
- -@echo "Using MAKE: $(MAKE)"
- -@echo "Using MAKEFLAGS: -j$(MAKE_NP) -l$(MAKE_LOAD) $(MAKEFLAGS)"
+ -@echo "Using MAKE: ${MAKE}"
+ -@echo "Default MAKEFLAGS: MAKE_NP:${MAKE_NP} MAKE_LOAD:${MAKE_LOAD} MAKEFLAGS:${MAKEFLAGS}"
-@echo "=========================================="
#
--
GitLab

View File

@ -1,11 +0,0 @@
--- a/src/petsc4py.PETSc.origin.c 2022-01-06 03:57:32.000000000 +0100
+++ b/src/petsc4py.PETSc.c 2022-01-12 20:44:44.434469854 +0100
@@ -193,7 +193,7 @@
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
- #include "longintrepr.h"
+ #include "cpython/longintrepr.h"
#undef SHIFT
#undef BASE
#undef MASK

View File

@ -8,13 +8,13 @@
%global _lto_cflags %{nil}
# Testing libpetsc ?
%bcond_with check
%bcond_without check
#
# Python binding and its testing
%bcond_without python
%ifnarch %{power64} %{arm}
%bcond_with pycheck
%bcond_without pycheck
%endif
%global pymodule_name petsc4py
%global pymodule_version %{version}
@ -299,16 +299,12 @@ Patch0: %{name}-3.11-no-rpath.patch
## Rename library name for 64-bit integer package
Patch1: %{name}-lib64.patch
# Reverting patch for Hypre-2.11.2
Patch2: %{name}-3.14-hypre_2.11.2_reverting.patch
Patch2: %{name}-3.18.5-fix_make_compatibility.patch
Patch3: %{name}-3.18.0-fix_mumps_includes.patch
Patch4: %{name}-3.18.0-fix_metis64.patch
Patch5: %{name}-3.15.0-fix_sundials_version.patch
Patch6: %{name}-3.14.1-fix_pkgconfig_file.patch
Patch7: %{name}-3.17.0-avoid_fake_MKL_detection.patch
Patch8: %{name}-porting_to_python311.patch
%if %{with superlu}
BuildRequires: SuperLU-devel >= 5.2.0
@ -519,7 +515,7 @@ BuildRequires: ptscotch-mpich-devel
%endif
%if %{with scalapack}
BuildRequires: scalapack-mpich-devel
%if 0%{?rhel} || 0%{?fedora} < 32
%if 0%{?rhel}
BuildRequires: blacs-mpich-devel
%endif
%endif
@ -568,7 +564,7 @@ rm -rf petsc4py-%{version}
%endif
pushd %{name}-%{version}
%patch 2 -p1 -b .backup
%patch 7 -p1 -b .backup
%if 0%{?fedora}
@ -598,9 +594,6 @@ pushd %{name}-%{version}
%patch 0 -p0 -b .backup
%patch 5 -p1 -b .backup
%patch 6 -p1 -b .backup
%if 0%{?python3_version_nodots} >= 311
#%%patch 8 -p1 -b .backup
%endif
popd
%if %{with openmpi}