From eada8e54daf132d64d5114b56a6486cfe4e2cc5a Mon Sep 17 00:00:00 2001 From: Antonio T Date: Sat, 5 Dec 2020 11:12:49 +0100 Subject: [PATCH] Update/Rebuild for MUMPS-5.3.5 on EPEL7 --- ...=> petsc-3.14-hypre_2.11.2_reverting.patch | 28 ++--- petsc.spec | 103 +++++++----------- 2 files changed, 52 insertions(+), 79 deletions(-) rename petsc-3.11-hypre_2.11.2_reverting.patch => petsc-3.14-hypre_2.11.2_reverting.patch (54%) diff --git a/petsc-3.11-hypre_2.11.2_reverting.patch b/petsc-3.14-hypre_2.11.2_reverting.patch similarity index 54% rename from petsc-3.11-hypre_2.11.2_reverting.patch rename to petsc-3.14-hypre_2.11.2_reverting.patch index 8a54c90..2704d83 100644 --- a/petsc-3.11-hypre_2.11.2_reverting.patch +++ b/petsc-3.14-hypre_2.11.2_reverting.patch @@ -3,7 +3,7 @@ From: Satish Balay Date: Fri, 30 Mar 2018 09:53:12 -0500 Subject: [PATCH] hypre: update to version 2.14.0 -Reported-by: Antonio Trande +Reported-by: Antonio Trande --- config/BuildSystem/config/packages/hypre.py | 2 +- src/mat/impls/hypre/mhypre.c | 2 +- @@ -13,26 +13,22 @@ diff --git a/config/BuildSystem/config/packages/hypre.py b/config/BuildSystem/co index 1249b39..620e516 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): +@@ -5,7 +5,7 @@ def __init__(self, framework): config.package.GNUPackage.__init__(self, framework) -- self.gitcommit = 'v2.12.0' -+ self.gitcommit = 'v2.15.1' - self.download = ['git://https://github.com/LLNL/hypre','https://github.com/LLNL/hypre/archive/'+self.gitcommit+'.tar.gz'] - self.functions = ['HYPRE_IJMatrixCreate'] - self.includes = ['HYPRE.h'] -diff --git a/src/mat/impls/hypre/mhypre.c b/src/mat/impls/hypre/mhypre.c -index 8a51581..65595f2 100644 ---- a/src/mat/impls/hypre/mhypre.c + 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 -@@ -1450,6 +1450,6 @@ PETSC_EXTERN PetscErrorCode MatCreate_HYPRE(Mat B) +@@ -2131,6 +2131,6 @@ static PetscErrorCode hypre_array_destroy(void *ptr) { PetscFunctionBegin; -- hypre_TFree(ptr); -+ hypre_TFree(ptr,HYPRE_MEMORY_HOST); +- hypre_TFree(ptr,HYPRE_MEMORY_HOST); ++ hypre_TFree(ptr); PetscFunctionReturn(0); } --- -2.10.5 diff --git a/petsc.spec b/petsc.spec index 89f63eb..aeaa6b3 100644 --- a/petsc.spec +++ b/petsc.spec @@ -9,10 +9,8 @@ %{?el7:%global _pkgdocdir %{_docdir}/%{name}} # -%if 0%{?fedora} %bcond_without mpich %bcond_without openmpi -%endif %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 %bcond_without arch64 @@ -33,15 +31,6 @@ %global blasvar p %endif -%if 0%{?rhel} && 0%{?rhel} >= 7 -%bcond_without mpich -%bcond_without openmpi -%endif - -%if 0%{?rhel} == 7 -%global dts devtoolset-8- -%endif - # ## PETSC looks incompatible with serial MUMPS %bcond_without mumps_serial @@ -53,7 +42,7 @@ # ## Suitesparse -## Currently, suitesparse-5.4.0 is available on Fedora 32+, but this version of PETSc needs at least 5.6.0 +## Currently, suitesparse-5.4.0 is available on Fedora 32+, but this version of PETSc needs the 5.6.0 at least %bcond_with suitesparse %if 0%{?fedora} && 0%{?fedora} >= 32 %bcond_with suitesparse64 @@ -61,7 +50,19 @@ # ## SuperLUDIST needs parmetis +%if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without superludist +%bcond_without cgns +%bcond_without hdf5 +%else +# Needed superludist >= 6.1.1 +%bcond_with superludist + +# hdf5 is required by cgns +# and see rhbz#1904164 +%bcond_with cgns +%bcond_with hdf5 +%endif %bcond_with superlumt # @@ -72,10 +73,6 @@ %endif # -# hdf5' is required by 'cgns' -%bcond_without cgns -%bcond_without hdf5 - # 'scalapack' is required by 'mumps' %if %{with openmpi} %bcond_without mpi @@ -184,9 +181,10 @@ --with-shared-libraries=1 \\\ --with-fortran-interfaces=1 \\\ --with-windows-graphics=0 \\\ - --with-cc=mpicc \\\ - --with-cxx=mpicxx \\\ - --with-fc=mpif77 \\\ + --with-cc=${MPI_BIN}/mpicc \\\ + --with-cxx=${MPI_BIN}/mpicxx \\\ + --with-fc=${MPI_BIN}/mpif90 \\\ + --with-mpiexec="${MPI_BIN}/mpiexec -n `getconf _NPROCESSORS_ONLN` -env MPIEXEC_TIMEOUT 3000 --mca btl_base_warn_component_unused 0" \\\ --with-shared-ld=ld \\\ --with-pic=1 \\\ --with-clib-autodetect=0 \\\ @@ -262,7 +260,7 @@ Name: petsc Summary: Portable Extensible Toolkit for Scientific Computation Version: %{releasever}.1 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD URL: https://www.mcs.anl.gov/petsc Source0: https://www.mcs.anl.gov/petsc/mirror/release-snapshots/petsc-%{version}.tar.gz @@ -274,7 +272,7 @@ Patch0: %{name}-3.11-no-rpath.patch Patch1: %{name}-lib64.patch # Reverting patch for Hypre-2.11.2 -Patch2: %{name}-3.11-hypre_2.11.2_reverting.patch +Patch2: %{name}-3.14-hypre_2.11.2_reverting.patch Patch3: %{name}-3.13-fix_mumps_includes.patch Patch4: %{name}-3.13.0-fix_metis64.patch @@ -301,15 +299,12 @@ BuildRequires: suitesparse-devel >= 5.6.0 %if %{with blas} BuildRequires: %{blaslib}-devel %endif -BuildRequires: %{?dts}gcc, %{?dts}gcc-c++, cmake3 -BuildRequires: %{?dts}gcc-gfortran +BuildRequires: gcc, gcc-c++, cmake3 +BuildRequires: gcc-gfortran +BuildRequires: make BuildRequires: libX11-devel -%if 0%{?el7} -BuildRequires: python2-devel -%else BuildRequires: python3-devel BuildRequires: python3-setuptools -%endif BuildRequires: pcre-devel %if 0%{?el7} BuildRequires: pkgconfig @@ -346,11 +341,7 @@ Portable Extensible Toolkit for Scientific Computation (developer files). %package doc Summary: Portable Extensible Toolkit for Scientific Computation (documentation files) -%if 0%{?el7} -BuildRequires: python2-sphinx -%else BuildRequires: python3-sphinx -%endif BuildArch: noarch %description doc Portable Extensible Toolkit for Scientific Computation. @@ -507,15 +498,13 @@ pushd %{name}-%{version} %patch7 -p1 -%if 0%{?fedora} || 0%{?rhel} >= 8 find . -name 'setup.py' | xargs pathfix.py -pn -i "%{__python3}" find . -name 'configure' | xargs pathfix.py -pn -i "%{__python3}" find config -name '*.py' | xargs pathfix.py -pn -i "%{__python3}" find src/benchmarks/streams -name '*.py' | xargs pathfix.py -pn -i "%{__python3}" -%endif %if 0%{?el7} -%patch2 -R -p1 +%patch2 -p1 %endif popd @@ -549,12 +538,7 @@ popd %build pushd %{name}-%{version} -%if 0%{?el7} -%{?dts:source /opt/rh/devtoolset-8/enable} -%configure --with-cc=/opt/rh/devtoolset-8/root/usr/bin/gcc --with-cxx=/opt/rh/devtoolset-8/root/usr/bin/g++ --with-fc=/opt/rh/devtoolset-8/root/usr/bin/gfortran \ -%else %configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \ -%endif %{petsc_build_options} \ --with-64-bit-indices=0 \ %if %{with blas} @@ -587,12 +571,7 @@ popd %if %{with arch64} pushd build64 -%if 0%{?el7} -%{?dts:source /opt/rh/devtoolset-8/enable} -%configure --with-cc=/opt/rh/devtoolset-8/root/usr/bin/gcc --with-cxx=/opt/rh/devtoolset-8/root/usr/bin/g++ --with-fc=/opt/rh/devtoolset-8/root/usr/bin/gfortran \ -%else %configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \ -%endif %{petsc_build_options} \ --with-64-bit-indices=1 \ %if %{with metis64} @@ -621,14 +600,10 @@ popd %if %{with openmpi} pushd buildopenmpi_dir -%if 0%{?el7} -%{?dts:source /opt/rh/devtoolset-8/enable} -%endif - %{_openmpi_load} %configure \ --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lmpi_mpifh" \ - --LIBS=" -lmpi_mpifh" \ + --LIBS=" -lmpi -lmpi_mpifh" \ %{petsc_mpibuild_options} \ %if %{with metis} --with-metis=1 \ @@ -654,14 +629,10 @@ popd %if %{with mpich} pushd buildmpich_dir -%if 0%{?el7} -%{?dts:source /opt/rh/devtoolset-8/enable} -%endif - %{_mpich_load} %configure \ - --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lmpifort" \ - --LIBS=" -lmpifort" \ + --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lfmpich -lmpichf90" \ + --LIBS=" -lmpich -lfmpich -lmpichf90" \ %{petsc_mpibuild_options} \ %if %{with metis} --with-metis=1 \ @@ -836,17 +807,19 @@ cp -a %{name}-%{version}/docs/* $RPM_BUILD_ROOT%{_pkgdocdir} %if %{with check} %check + %if %{with openmpi} %{_openmpi_load} export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/buildopenmpi_dir/%{_arch}/lib export PETSC_DIR=%{_builddir}/%{name}-%{version}/buildopenmpi_dir export PETSC_ARCH=%{_arch} export MPI_INTERFACE_HOSTNAME=localhost +export OMPI_MCA_btl_base_warn_component_unused=0 %if %{with debug} export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins=yes" export CFLAGS="-O0 -g -Wl,-z,now -fPIC" export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" -export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" +export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" xvfb-run -a make all test -C buildopenmpi_dir V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/buildopenmpi_dir/lib/petsc/bin/petscmpiexec -valgrind' %else xvfb-run -a make all test -C buildopenmpi_dir V=1 @@ -854,25 +827,24 @@ xvfb-run -a make all test -C buildopenmpi_dir V=1 %{_openmpi_unload} %endif -%if 0%{?fedora} || 0%{?rhel} >= 7 %if %{with mpich} %{_mpich_load} export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/buildmpich_dir/%{_arch}/lib export PETSC_DIR=%{_builddir}/%{name}-%{version}/buildmpich_dir export PETSC_ARCH=%{_arch} export MPI_INTERFACE_HOSTNAME=localhost +export OMPI_MCA_btl_base_warn_component_unused=0 %if %{with debug} export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins=yes" export CFLAGS="-O0 -g -Wl,-z,now -fPIC" export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" -export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" +export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" xvfb-run -a make all test -C buildmpich_dir V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/buildmpich_dir/lib/petsc/bin/petscmpiexec -valgrind' %else xvfb-run -a make all test -C buildmpich_dir V=1 %endif %{_mpich_unload} %endif -%endif export LD_LIBRARY_PATH=%{_libdir}:%{_builddir}/%{name}-%{version}/%{name}-%{version}/%{_arch}/lib export PETSC_DIR=%{_builddir}/%{name}-%{version}/%{name}-%{version} @@ -883,9 +855,9 @@ export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins= export CFLAGS="-O0 -g -Wl,-z,now -fPIC" export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" -xvfb-run -a make all test -C %{name}-%{version} V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/%{name}-%{version}/lib/petsc/bin/petscmpiexec -valgrind' +xvfb-run -a make all test -C %{name}-%{version} V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/%{name}-%{version}/lib/petsc/bin/petscmpiexec -n `getconf _NPROCESSORS_ONLN` -valgrind' %else -xvfb-run -a make all test -C %{name}-%{version} V=1 +xvfb-run -a make all test -C %{name}-%{version} V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/%{name}-%{version}/lib/petsc/bin/petscmpiexec -n `getconf _NPROCESSORS_ONLN`' %endif %if %{with arch64} @@ -902,9 +874,9 @@ export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins= export CFLAGS="-O0 -g -Wl,-z,now -fPIC" export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" -xvfb-run -a make all test -C build64 V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/build64/lib/petsc/bin/petscmpiexec -valgrind' +xvfb-run -a make all test -C build64 V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/build64/lib/petsc/bin/petscmpiexec -n `getconf _NPROCESSORS_ONLN` -valgrind' %else -xvfb-run -a make all test -C build64 V=1 +xvfb-run -a make all test -C build64 V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/build64/lib/petsc/bin/petscmpiexec -n `getconf _NPROCESSORS_ONLN`' %endif %endif %endif @@ -976,6 +948,11 @@ xvfb-run -a make all test -C build64 V=1 %endif %changelog +* Sat Dec 05 2020 Antonio Trande - 3.14.1-3 +- Update/Rebuild for MUMPS-5.3.5 on EPEL7 +- Exclude superludist support on EPEL7 +- Add Make BR + * Fri Nov 20 2020 Antonio Trande - 3.14.1-2 - Fix pkg-config files