From a211c9fdc5b8f215a10b5b96563bfe04b108f2e4 Mon Sep 17 00:00:00 2001 From: Guytri KASTANE Date: Tue, 29 Oct 2024 16:57:05 +0100 Subject: [PATCH] spns #43007: updated petsc to 3.20.5 --- applications/SALOME-master-native.pyconf | 6 +++--- applications/SALOME-master.pyconf | 2 +- products/compil_scripts/petsc-3.20.5.sh | 6 +++++- products/fftw.pyconf | 4 ++-- products/patches/petsc-3.20.5-mpi4py.patch | 21 +++++++++++++++++++++ products/petsc.pyconf | 3 ++- 6 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 products/patches/petsc-3.20.5-mpi4py.patch diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 410d4a8..e6de32c 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -115,7 +115,7 @@ APPLICATION : patsy : 'native' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} PERSALYS : 'v16.0.1' - petsc : {tag : '3.16.0', base: 'no', section: 'version_3_16_0', hpc: 'yes'} + petsc : {tag : '3.20.5', base: 'no', section: 'version_3_20_5', hpc: 'yes'} Pillow : 'native' planegcs : '0.18-3cb6890' psutil : 'native' @@ -277,7 +277,7 @@ __overwrite__ : 'APPLICATION.products.opencv' : '3.2.0' 'APPLICATION.products.FMILibrary' : '2.4.1' 'APPLICATION.products.PyFMI' : '2.13.1' - 'APPLICATION.products.petsc' : '3.20.5' + 'APPLICATION.products.petsc' : {tag : '3.20.5', base: 'no', section: 'version_3_20_5', hpc: 'yes'} 'APPLICATION.products.swig' : '4.0.2' 'APPLICATION.products.cmake' : 'native' 'APPLICATION.products.cftime' : 'native' @@ -495,7 +495,7 @@ __overwrite__ : 'APPLICATION.products.swig' : '4.0.2' 'APPLICATION.products.meshio' : {tag: '5.3.5' , base: 'no', section: 'version_5_3_5_no_pip' } 'APPLICATION.products.opencv' : {tag: '3.2.0', base: 'no', section: 'version_3_2_0_FD38' } - 'APPLICATION.products.petsc' : {tag: '3.16.0', base: 'no', section: 'version_3_16_0_FD38', hpc: 'yes' } + 'APPLICATION.products.petsc' : {tag :'3.20.5', base: 'no', section: 'version_3_20_5', hpc: 'yes' } '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.pyconf b/applications/SALOME-master.pyconf index 3803fd9..e1f6783 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -118,7 +118,7 @@ APPLICATION : patsy : '0.5.4' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} PERSALYS: 'v16.0.1' - petsc : {tag : '3.16.0', base: 'no', section: 'version_3_16_0', hpc: 'yes'} + petsc : {tag : '3.20.5', base: 'no', section: 'version_3_20_5', hpc: 'yes'} Pillow : '8.4.0' planegcs : '0.18-3cb6890' poetry : {tag: '1.8.3', base: 'no', section: 'version_1_8_3_x86_64' } diff --git a/products/compil_scripts/petsc-3.20.5.sh b/products/compil_scripts/petsc-3.20.5.sh index 106bbab..1c3fd78 100755 --- a/products/compil_scripts/petsc-3.20.5.sh +++ b/products/compil_scripts/petsc-3.20.5.sh @@ -78,7 +78,11 @@ if [ -n "${SAT_HPC}" ]; then fi CONFIGURE_FLAGS+=" --with-mpi-dir=${MPI_ROOT_DIR}" - + if [ "$SAT_openmpi_IS_NATIVE" == "1" ] && [[ "DB UB" =~ "$DIST_NAME" ]]; then + CONFIGURE_FLAGS+=" --with-cc=${MPI_C_COMPILER}" + CONFIGURE_FLAGS+=" --with-cxx=${MPI_CXX_COMPILER}" + CONFIGURE_FLAGS+=" --with-fc=${MPI_FC_COMPILER}" + fi else CONFIGURE_FLAGS+=" --with-mpi=0" fi diff --git a/products/fftw.pyconf b/products/fftw.pyconf index 6b9f294..6915808 100644 --- a/products/fftw.pyconf +++ b/products/fftw.pyconf @@ -7,9 +7,9 @@ default : system_info : { rpm : ["fftw"] - rpm_dev : ["fftw-devel"] + rpm_dev : ["fftw-devel", "fftw-openmpi-devel"] apt : ["fftw"] - apt_dev : ["fftw-dev"] + apt_dev : ["fftw-dev", "libfftw3-mpi-dev"] } archive_info: { diff --git a/products/patches/petsc-3.20.5-mpi4py.patch b/products/patches/petsc-3.20.5-mpi4py.patch new file mode 100644 index 0000000..5fa359b --- /dev/null +++ b/products/patches/petsc-3.20.5-mpi4py.patch @@ -0,0 +1,21 @@ +diff -Naur petsc/config/BuildSystem/config/packages/mpi4py.py petsc_dev/config/BuildSystem/config/packages/mpi4py.py +--- petsc/config/BuildSystem/config/packages/mpi4py.py 2024-02-27 04:09:17.000000000 +0100 ++++ petsc_dev/config/BuildSystem/config/packages/mpi4py.py 2024-10-29 09:30:23.435270110 +0100 +@@ -22,7 +22,7 @@ + return + + def Install(self): +- installLibPath = os.path.join(self.installDir, 'lib') ++ installLibPath = os.path.join(self.installDir) + if self.setCompilers.isDarwin(self.log): + apple = 'You may need to\n (csh/tcsh) setenv MACOSX_DEPLOYMENT_TARGET 10.X\n (sh/bash) MACOSX_DEPLOYMENT_TARGET=10.X; export MACOSX_DEPLOYMENT_TARGET\nbefore running make on PETSc' + else: +@@ -74,7 +74,7 @@ + raise RuntimeError('mpi4py unreconginzed mode of building mpi4py! Suggest using --download-mpi4py!') + + if self.directory: +- installLibPath = os.path.join(self.directory, 'lib') ++ installLibPath = os.path.join(self.directory) + if not os.path.isfile(os.path.join(installLibPath,'mpi4py','__init__.py')): + raise RuntimeError('mpi4py not found at %s' % installLibPath) + self.addMakeMacro('PETSC_MPI4PY_PYTHONPATH',installLibPath) diff --git a/products/petsc.pyconf b/products/petsc.pyconf index 3eefc52..37f5cac 100644 --- a/products/petsc.pyconf +++ b/products/petsc.pyconf @@ -9,7 +9,7 @@ default : env_script : $name + ".py" } depend : ["hdf5"] - opt_depend : ["openmpi", "mpi4py"] + opt_depend : ["openmpi", "mpi4py", "fftw"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name install_dir : 'base' @@ -25,6 +25,7 @@ version_3_20_5 : { compil_script : "petsc-3.20.5.sh" depend : ["hdf5", "Python", "lapack","fftw", "llvm", "metis", "medfile", "mpi4py", "scotch" ] + patches: ['petsc-3.20.5-mpi4py.patch'] } version_3_19_4 : -- 2.39.2