From ed72b0d61a56f25ea6c69c1f13fd3e84bcf7af22 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Wed, 20 Dec 2023 12:36:33 +0100 Subject: [PATCH] Fedora 38: petsc compilation --- applications/SALOME-9.12.0-native.pyconf | 1 + applications/SALOME-master-native.pyconf | 1 + .../patches/petsc-3.16-fd38-makeflags.patch | 32 +++++++++++++++++++ products/petsc.pyconf | 7 ++++ 4 files changed, 41 insertions(+) create mode 100644 products/patches/petsc-3.16-fd38-makeflags.patch diff --git a/applications/SALOME-9.12.0-native.pyconf b/applications/SALOME-9.12.0-native.pyconf index 2531def..79ca126 100644 --- a/applications/SALOME-9.12.0-native.pyconf +++ b/applications/SALOME-9.12.0-native.pyconf @@ -349,6 +349,7 @@ __overwrite__ : 'APPLICATION.products.nlopt' : '2.6.0' 'APPLICATION.products.netcdf' : '4.6.2' 'APPLICATION.products.swig' : '4.0.2' + 'APPLICATION.products.petsc' : {tag: '3.16.0', base: 'no', section: 'version_3_16_0_FD38' } 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_FD38' } 'APPLICATION.products.medfile' : {tag: '4.1.1', base: 'no', section: 'version_4_1_1_FD38' } 'APPLICATION.products.catalyst' : {tag: '2.0', base: 'no', section: 'version_2_0_FD38' } diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index b1717f5..56d2511 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -349,6 +349,7 @@ __overwrite__ : 'APPLICATION.products.nlopt' : '2.6.0' 'APPLICATION.products.netcdf' : '4.6.2' 'APPLICATION.products.swig' : '4.0.2' + 'APPLICATION.products.petsc' : {tag: '3.16.0', base: 'no', section: 'version_3_16_0_FD38' } 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_FD38' } 'APPLICATION.products.medfile' : {tag: '4.1.1', base: 'no', section: 'version_4_1_1_FD38' } 'APPLICATION.products.catalyst' : {tag: '2.0', base: 'no', section: 'version_2_0_FD38' } diff --git a/products/patches/petsc-3.16-fd38-makeflags.patch b/products/patches/petsc-3.16-fd38-makeflags.patch new file mode 100644 index 0000000..9b6492f --- /dev/null +++ b/products/patches/petsc-3.16-fd38-makeflags.patch @@ -0,0 +1,32 @@ +--- petsc-3.16.0-ref/makefile 2021-09-30 04:15:07.000000000 +0200 ++++ petsc-3.16.0-dev/makefile 2023-12-20 12:02:30.248623882 +0100 +@@ -50,7 +50,7 @@ + @echo "Finishing make run at `date +'%a, %d %b %Y %H:%M:%S %z'`" >> ${PETSC_ARCH}/lib/petsc/conf/make.log + @if test -s ${PETSC_ARCH}/lib/petsc/conf/error.log; then exit 1; fi + +-all-local: info libs matlabbin petsc4py-build libmesh-build mfem-build slepc-build hpddm-build amrex-build bamg-build ++all-local: info print_before_fix fix_makeflags print_after_fix libs matlabbin petsc4py-build libmesh-build mfem-build slepc-build hpddm-build amrex-build bamg-build + + # + # Prints information about the system and version of PETSc being compiled +@@ -130,6 +130,20 @@ + -@echo "==========================================" + + # ++# ++# ++fix_makeflags: ++ -@echo "Remove w option from MAKEFLAGS" ++ $(eval MAKEFLAGS:=$(filter-out w,$(MAKEFLAGS))) ++ ++print_before_fix: ++ -@echo "Value of MAKEFLAGS (before):" ++ -@echo $(MAKEFLAGS) ++ ++print_after_fix: ++ -@echo "Value of MAKEFLAGS (after):" ++ -@echo $(MAKEFLAGS) ++# + # Build MatLab binaries + # + matlabbin: diff --git a/products/petsc.pyconf b/products/petsc.pyconf index b5a7be5..78fa630 100644 --- a/products/petsc.pyconf +++ b/products/petsc.pyconf @@ -48,6 +48,13 @@ version_3_16_0 : patches: ['petsc-3.16-mpi4py.patch'] } +version_3_16_0_FD38 : +{ + compil_script : "petsc-3.16.0.sh" + depend : ["hdf5", "Python"] + patches: ['petsc-3.16-mpi4py.patch', 'petsc-3.16-fd38-makeflags.patch'] +} + version_3_15_0 : { compil_script : "petsc-3.15.0.sh" -- 2.39.2