From 7d2e1c843b1e73da002d21b78e4f98dfdccad783 Mon Sep 17 00:00:00 2001 From: sagitter Date: Fri, 10 Apr 2020 17:49:10 +0200 Subject: [PATCH] Release 3.13.0 --- .gitignore | 1 + petsc-3.13-fix_mumps_includes.patch | 11 + petsc-3.13.0-fix_metis64.patch | 22 + petsc-3.13.0-fix_pkgconfig_file.patch | 11 + petsc-3.13.0-fix_sundials_version.patch | 13 + petsc.spec | 706 +++++++++++------------- sources | 2 +- 7 files changed, 372 insertions(+), 394 deletions(-) create mode 100644 petsc-3.13-fix_mumps_includes.patch create mode 100644 petsc-3.13.0-fix_metis64.patch create mode 100644 petsc-3.13.0-fix_pkgconfig_file.patch create mode 100644 petsc-3.13.0-fix_sundials_version.patch diff --git a/.gitignore b/.gitignore index df3ff3c..201829d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /petsc-3.12.2.tar.gz /petsc-3.12.3.tar.gz /petsc-3.12.4.tar.gz +/petsc-3.13.0.tar.gz diff --git a/petsc-3.13-fix_mumps_includes.patch b/petsc-3.13-fix_mumps_includes.patch new file mode 100644 index 0000000..aa7395e --- /dev/null +++ b/petsc-3.13-fix_mumps_includes.patch @@ -0,0 +1,11 @@ +--- a/config/BuildSystem/config/packages/MUMPS.orig.py 2020-03-30 05:33:12.000000000 +0200 ++++ b/config/BuildSystem/config/packages/MUMPS.py 2020-04-03 17:01:49.237255499 +0200 +@@ -14,7 +14,7 @@ + ['libcmumps.a','libdmumps.a','libsmumps.a','libzmumps.a','libmumps_common.a','libpord.a','libmpiseq.a'], + ['libcmumps.a','libdmumps.a','libsmumps.a','libzmumps.a','libmumps_common.a','libpord.a','libpthread.a','libmpiseq.a']] + self.functions = ['dmumps_c'] +- self.includes = ['dmumps_c.h'] ++ self.includes = ['MUMPS/dmumps_c.h'] + # + self.fc = 1 + self.precisions = ['single','double'] diff --git a/petsc-3.13.0-fix_metis64.patch b/petsc-3.13.0-fix_metis64.patch new file mode 100644 index 0000000..e29ae76 --- /dev/null +++ b/petsc-3.13.0-fix_metis64.patch @@ -0,0 +1,22 @@ +--- a/config/BuildSystem/config/packages/metis.orig.py 2020-03-29 16:29:06.000000000 +0200 ++++ b/config/BuildSystem/config/packages/metis.py 2020-04-03 18:00:37.013851959 +0200 +@@ -8,8 +8,8 @@ + self.download = ['git://https://bitbucket.org/petsc/pkg-metis.git','https://bitbucket.org/petsc/pkg-metis/get/'+self.gitcommit+'.tar.gz'] + self.downloaddirnames = ['petsc-pkg-metis'] + self.functions = ['METIS_PartGraphKway'] +- self.includes = ['metis.h'] +- self.liblist = [['libmetis.a'],['libmetis.a','libexecinfo.a']] ++ self.includes = ['metis64.h'] ++ self.liblist = [['libmetis64.a'],['libmetis64.a','libexecinfo.a']] + self.hastests = 1 + self.useddirectly = 0 + return +@@ -50,7 +50,7 @@ + config.package.Package.configureLibrary(self) + oldFlags = self.compilers.CPPFLAGS + self.compilers.CPPFLAGS += ' '+self.headers.toString(self.include) +- if not self.checkCompile('#include "metis.h"', '#if (IDXTYPEWIDTH != '+ str(self.getDefaultIndexSize())+')\n#error incompatible IDXTYPEWIDTH\n#endif'): ++ if not self.checkCompile('#include "metis64.h"', '#if (IDXTYPEWIDTH != '+ str(self.getDefaultIndexSize())+')\n#error incompatible IDXTYPEWIDTH\n#endif'): + if self.defaultIndexSize == 64: + msg= '--with-64-bit-indices option requires a metis build with IDXTYPEWIDTH=64.\n' + else: diff --git a/petsc-3.13.0-fix_pkgconfig_file.patch b/petsc-3.13.0-fix_pkgconfig_file.patch new file mode 100644 index 0000000..ff6fdfb --- /dev/null +++ b/petsc-3.13.0-fix_pkgconfig_file.patch @@ -0,0 +1,11 @@ +--- a/config/PETSc/Configure.orig.py 2020-03-30 05:33:12.000000000 +0200 ++++ b/config/PETSc/Configure.py 2020-04-04 22:58:19.770481378 +0200 +@@ -147,7 +147,7 @@ + if not os.path.exists(os.path.join(self.petscdir.dir,self.arch.arch,'lib','pkgconfig')): + os.makedirs(os.path.join(self.petscdir.dir,self.arch.arch,'lib','pkgconfig')) + fd = open(os.path.join(self.petscdir.dir,self.arch.arch,'lib','pkgconfig','PETSc.pc'),'w') +- cflags_inc = ['-I${includedir}'] ++ cflags_inc = ['-I${includedir}/petsc'] + if self.framework.argDB['prefix']: + fd.write('prefix='+self.installdir.dir+'\n') + else: diff --git a/petsc-3.13.0-fix_sundials_version.patch b/petsc-3.13.0-fix_sundials_version.patch new file mode 100644 index 0000000..82b0d0d --- /dev/null +++ b/petsc-3.13.0-fix_sundials_version.patch @@ -0,0 +1,13 @@ +--- a/config/BuildSystem/config/packages/sundials.orig.py 2019-09-30 01:36:08.000000000 +0200 ++++ b/config/BuildSystem/config/packages/sundials.py 2020-04-04 16:15:52.074244560 +0200 +@@ -3,8 +3,8 @@ + class Configure(config.package.GNUPackage): + def __init__(self, framework): + config.package.GNUPackage.__init__(self, framework) +- self.version = '2.5.0' +- self.maxversion = '2.5.100000' ++ self.version = '5.2.0' ++ self.maxversion = '5.2.000000' + self.versionname = 'SUNDIALS_PACKAGE_VERSION' + self.download = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/sundials-'+self.version+'p1.tar.gz'] + self.functions = ['CVSpgmr'] diff --git a/petsc.spec b/petsc.spec index 96e9c70..c304f94 100644 --- a/petsc.spec +++ b/petsc.spec @@ -36,21 +36,32 @@ # ## PETSC looks incompatible with serial MUMPS -%bcond_with mumps_serial +%bcond_without mumps_serial # -## Sundials needs mpi +## Sundials needs mpi ?? %bcond_with sundials_serial # %bcond_without superlu # +## Suitesparse +## Currently, that's the 5.4.0 on Fedora 32+, this version of PETSc needs at least 5.6.0 +%bcond_with suitesparse +%if 0%{?fedora} && 0%{?fedora} >= 32 +%bcond_with suitesparse64 +%endif +# + ## SuperLUDIST needs parmetis -%bcond_with superludist +%bcond_without superludist %bcond_with superlumt # +## Metis +%bcond_without metis +# + # hdf5' is required by 'cgns' -# hdf5 needs MPI %bcond_without cgns %bcond_without hdf5 @@ -67,7 +78,7 @@ %if %{with mpich} %bcond_without mpi -# PETSC-3.8.* is incompatible with Sundials 3+ +# PETSC-3.* is incompatible with Sundials 3+ %bcond_with sundials %bcond_without scalapack %bcond_without mumps @@ -75,15 +86,170 @@ %bcond_without hypre %endif -%global releasever 3.12 +%global releasever 3.13 + +%global petsc_build_options \\\ + %if %{with debug} \ + CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \\\ + CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I%{_libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -fPIC" \\\ + %else \ + CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \\\ + COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \\\ + %endif \ + --CC_LINKER_FLAGS="$LDFLAGS" \\\ + --FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \\\ + --with-default-arch=0 --with-make=1 \\\ + --with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \\\ + --with-single-library=1 \\\ + --with-precision=double \\\ + --with-petsc-arch=%{_arch} \\\ + --with-clanguage=C \\\ + --with-shared-libraries=1 \\\ + --with-fortran-interfaces=1 \\\ + --with-windows-graphics=0 \\\ + --CC=gcc \\\ + --FC=gfortran \\\ + --CXX=g++ \\\ + --with-shared-ld=ld \\\ + --with-pic=1 \\\ + --with-clib-autodetect=0 \\\ + --with-fortranlib-autodetect=0 \\\ + --with-threadsafety=0 --with-log=1 \\\ + %if 0%{?fedora} \ + --with-cxxlib-autodetect=0 \\\ + %endif \ + %if %{with debug} \ + --with-debugging=1 \\\ + %else \ + --with-debugging=0 \\\ + %endif \ + %if %{with mumps_serial} \ + --with-mumps-serial=1 \\\ + %endif \ + --with-mpi=0 \\\ + %if %{with hdf5} \ + --with-hdf5=1 \\\ + --with-hdf5-include= \\\ + --with-hdf5-lib="-lhdf5 -lhdf5_hl" \\\ + %endif \ + %if %{with cgns} \ + --with-cgns=1 \\\ + --with-cgns-include= \\\ + --with-cgns-lib=-lcgns \\\ + %endif \ + --with-x=1 \\\ + --with-openmp=0 \\\ + --with-hwloc=0 \\\ + --with-ssl=0 \\\ + %if %{with sundials_serial} \ + --with-sundials=1 \\\ + --with-sundials-include=%{_includedir} \\\ + --with-sundials-lib="-lsundials_nvecserial -lsundials_cvode" \\\ + %endif \ + %if %{with metis} \ + --with-metis=1 \\\ + %endif \ + --with-pthread=1 \\\ + --with-valgrind=1 + +%global petsc_mpibuild_options \\\ + %if %{with debug} \ + CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" COPTFLAGS="-O0 -g -Wl,-z,now" \\\ + CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I${MPI_FORTRAN_MOD_DIR}" LDFLAGS="$LDFLAGS -fPIC" \\\ + %else \ + CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \\\ + COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \\\ + %endif \ + --CC_LINKER_FLAGS="$LDFLAGS" \\\ + --with-default-arch=0 --with-make=1 \\\ + --with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \\\ + --with-single-library=1 \\\ + --with-precision=double \\\ + --with-petsc-arch=%{_arch} \\\ + --with-clanguage=C \\\ + --with-shared-libraries=1 \\\ + --with-fortran-interfaces=1 \\\ + --with-windows-graphics=0 \\\ + --with-cc=mpicc \\\ + --with-cxx=mpicxx \\\ + --with-fc=mpif77 \\\ + --with-shared-ld=ld \\\ + --with-pic=1 \\\ + --with-clib-autodetect=0 \\\ + --with-fortranlib-autodetect=0 \\\ + %if 0%{?fedora} \ + --with-cxxlib-autodetect=0 \\\ + %endif \ + --with-threadsafety=0 --with-log=1 \\\ + %if %{with debug} \ + --with-debugging=1 \\\ + %else \ + --with-debugging=0 \\\ + %endif \ + %if %{with scalapack} \ + --with-scalapack=1 \\\ + --with-scalapack-lib="-L$MPI_LIB -lscalapack" \\\ + --with-scalapck-include="" \\\ + %endif \ + %if %{with mpi} \ + --with-mpi=1 \\\ + %endif \ + %if %{with cgns} \ + --with-cgns=1 \\\ + --with-cgns-include= \\\ + --with-cgns-lib=-lcgns \\\ + %endif \ + %if %{with hdf5} \ + --with-hdf5=1 \\\ + --with-hdf5-include= \\\ + --with-hdf5-lib="-L$MPI_LIB -lhdf5 -lhdf5_hl" \\\ + %endif \ + %if %{with ptscotch} \ + --with-ptscotch=1 \\\ + --with-ptscotch-include= \\\ + --with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \\\ + %endif \ + %if %{with mumps} \ + --with-mumps=1 \\\ + %endif \ + %if %{with sundials} \ + --with-sundials=1 \\\ + --with-sundials-include=$MPI_INCLUDE \\\ + --with-sundials-lib=-lsundials_nvecparallel \\\ + %endif \ + %if %{with metis} \ + --with-metis=1 \\\ + %endif \ + %if %{with superludist} \ + --with-superlu_dist=1 \\\ + --with-superlu_dist-include=$MPI_INCLUDE/superlu_dist \\\ + --with-superlu_dist-lib=-lsuperlu_dist \\\ + %endif \ + --with-x=1 \\\ + --with-openmp=0 \\\ + --with-hwloc=0 \\\ + --with-ssl=0 \\\ + %if %{with hypre} \ + --with-hypre=1 \\\ + --with-hypre-include=$MPI_INCLUDE/hypre \\\ + --with-hypre-lib="-L$MPI_LIB -lHYPRE" \\\ + %endif \ + %if %{with fftw} \ + --with-fftw=1 \\\ + --with-fftw-include= \\\ + --with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \\\ + %endif \ + --with-pthread=1 \\\ + --with-valgrind=1 + Name: petsc Summary: Portable Extensible Toolkit for Scientific Computation -Version: %{releasever}.4 -Release: 3%{?dist} +Version: %{releasever}.0 +Release: 1%{?dist} License: BSD URL: https://www.mcs.anl.gov/petsc -Source0: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-%{version}.tar.gz +Source0: https://www.mcs.anl.gov/petsc/mirror/release-snapshots/petsc-%{version}.tar.gz ## Remove rpath flags Patch0: %{name}-3.11-no-rpath.patch @@ -94,6 +260,11 @@ Patch1: %{name}-lib64.patch # Reverting patch for Hypre-2.11.2 Patch2: %{name}-3.11-hypre_2.11.2_reverting.patch +Patch3: %{name}-3.13-fix_mumps_includes.patch +Patch4: %{name}-3.13.0-fix_metis64.patch +Patch5: %{name}-3.13.0-fix_sundials_version.patch +Patch6: %{name}-3.13.0-fix_pkgconfig_file.patch + %if %{with superlu} BuildRequires: SuperLU-devel >= 5.2.0 %endif @@ -101,13 +272,13 @@ BuildRequires: SuperLU-devel >= 5.2.0 BuildRequires: SuperLUMT-devel %endif %if %{with mumps_serial} -BuildRequires: MUMPS-devel +BuildRequires: MUMPS-devel >= 5.2.1 %endif -%if %{with sundials_serial} -BuildRequires: sundials-devel +%if %{with metis} +BuildRequires: metis-devel >= 5.1.0 %endif -%if 0%{?with_suitesparse} -BuildRequires: suitesparse-devel +%if %{with suitesparse} +BuildRequires: suitesparse-devel >= 5.6.0 %endif %if %{with blas} BuildRequires: openblas-devel, openblas-srpm-macros @@ -126,8 +297,16 @@ BuildRequires: pkgconfig %else BuildRequires: pkgconf-pkg-config %endif +%if %{with hdf5} +BuildRequires: hdf5-devel +%endif +%if %{with cgns} +BuildRequires: cgnslib-devel +BuildRequires: hdf5-devel +%endif BuildRequires: valgrind-devel BuildRequires: tcsh +BuildRequires: xorg-x11-server-Xvfb Requires: gcc-gfortran%{?_isa} %description @@ -163,6 +342,9 @@ PDF and HTML documentation files. Summary: Portable Extensible Toolkit for Scientific Computation (64bit INTEGER) BuildRequires: openblas-serial64 >= 0.2.19-1 BuildRequires: openblas-devel >= 0.2.19-1 +%if %{with metis} +BuildRequires: metis64-devel >= 5.1.0 +%endif Requires: gcc-gfortran%{?_isa} %description -n petsc64 @@ -196,7 +378,7 @@ BuildRequires: hdf5-openmpi-devel %endif %if %{with cgns} BuildRequires: cgnslib-devel -BuildRequires: hdf5-devel +BuildRequires: hdf5-openmpi-devel %endif %if %{with ptscotch} BuildRequires: ptscotch-openmpi-devel @@ -208,13 +390,13 @@ BuildRequires: blacs-openmpi-devel %endif %endif %if %{with mumps} -BuildRequires: MUMPS-openmpi-devel +BuildRequires: MUMPS-openmpi-devel >= 5.2.1 %endif %if %{with sundials} BuildRequires: sundials-openmpi-devel %endif %if %{with superludist} -BuildRequires: superlu_dist-openmpi-devel +BuildRequires: superlu_dist-openmpi-devel >= 6.1.1 %endif %if %{with fftw} BuildRequires: fftw-devel @@ -252,7 +434,7 @@ BuildRequires: hdf5-mpich-devel %endif %if %{with cgns} BuildRequires: cgnslib-devel -BuildRequires: hdf5-devel +BuildRequires: hdf5-mpich-devel %endif %if %{with ptscotch} BuildRequires: ptscotch-mpich-devel @@ -264,13 +446,13 @@ BuildRequires: blacs-mpich-devel %endif %endif %if %{with mumps} -BuildRequires: MUMPS-mpich-devel +BuildRequires: MUMPS-mpich-devel >= 5.2.1 %endif %if %{with sundials} BuildRequires: sundials-mpich-devel %endif %if %{with superludist} -BuildRequires: superlu_dist-mpich-devel +BuildRequires: superlu_dist-mpich-devel >= 6.1.1 %endif %if %{with hypre} BuildRequires: hypre-mpich-devel @@ -313,10 +495,10 @@ Portable Extensible Toolkit for Scientific Computation (developer files). pushd %{name}-%{version} %if 0%{?fedora} || 0%{?rhel} >= 8 -find . -name 'setup.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' -find . -name 'configure' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' -find config -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' -find src/benchmarks/streams -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' +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} @@ -328,11 +510,14 @@ popd cp -a %{name}-%{version} build64 pushd build64 %patch1 -p0 +%patch4 -p1 -b .metis64 popd %endif pushd %{name}-%{version} %patch0 -p0 +%patch5 -p1 +%patch6 -p1 popd %if %{with openmpi} @@ -342,6 +527,11 @@ cp -a %{name}-%{version} buildopenmpi_dir cp -a %{name}-%{version} buildmpich_dir %endif +# Do NOT move up this patch +pushd %{name}-%{version} +%patch3 -p1 +popd + %build pushd %{name}-%{version} %if 0%{?el7} @@ -350,78 +540,21 @@ pushd %{name}-%{version} %else %configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \ %endif -%if %{with debug} -CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \ - CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I%{_libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -fPIC" \ -%else -CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \ - COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \ -%endif - --CC_LINKER_FLAGS="$LDFLAGS" \ - --FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \ - --with-default-arch=0 --with-make=1 \ - --with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \ - --with-single-library=1 \ - --with-precision=double \ - --with-petsc-arch=%{_arch} \ - --with-clanguage=C \ - --with-shared-libraries=1 \ + %{petsc_build_options} \ --with-64-bit-indices=0 \ - --with-fortran-interfaces=1 \ - --with-windows-graphics=0 \ - --CC=gcc \ - --FC=gfortran \ - --CXX=g++ \ - --with-shared-ld=ld \ - --with-pic=1 \ - --with-clib-autodetect=0 \ - --with-fortranlib-autodetect=0 \ - --with-threadsafety=0 --with-log=1 \ -%if 0%{?fedora} - --with-cxxlib-autodetect=0 \ -%endif -%if %{with debug} - --with-debugging=1 \ -%else - --with-debugging=0 \ -%endif %if %{with blas} - --with-blas-lapack-lib=-lopenblas \ - --known-64-bit-blas-indices=0 \ + --with-blas-lapack-lib=-lopenblas --known-64-bit-blas-indices=0 \ %endif -%if %{with superlu} - --with-superlu=1 \ - --with-superlu-include=%{_includedir}/SuperLU \ - --with-superlu-lib=-lsuperlu \ + %if %{with superlu} + --with-superlu=1 \ + --with-superlu-include=%{_includedir}/SuperLU \ + --with-superlu-lib=-lsuperlu \ %endif -%if %{with mumps_serial} - --with-mumps-serial=1 \ - --with-mumps-include=%{_includedir}/MUMPS \ - --with-mumps-lib=-ldmumps \ -%endif - --with-mpi=0 \ - --with-x=1 \ - --with-openmp=0 \ - --with-metis=0 \ - --with-hwloc=0 \ - --with-ssl=0 \ -%if 0%{?with_suitesparse} +%if %{with suitesparse} --with-suitesparse=1 \ --with-suitesparse-include=%{_includedir}/suitesparse \ - --with-suitesparse-lib="-lumfpack -lklu -lcholmod -lamd" \ + --with-suitesparse-lib="-lumfpack -lklu -lcholmod -lamd" %endif -%if %{with sundials_serial} - --with-sundials=1 \ - --with-sundials-include= \ - --with-sundials-lib="-lsundials_nvecserial -lsundials_cvode" \ -%endif -%if %{with superlu} - --with-superlu=1 \ - --with-superlu-include=%{_includedir}/SuperLU \ - --with-superlu-lib=-lsuperlu \ -%endif - --with-pthread=1 \ - --with-valgrind=1 ## RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`" @@ -437,53 +570,17 @@ pushd build64 %else %configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \ %endif -%if %{with debug} -CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \ - CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -fPIC" \ -%else -CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \ - COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \ -%endif - --CC_LINKER_FLAGS="$LDFLAGS" \ - --FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \ - --with-default-arch=0 --with-make=1 \ - --with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \ - --with-single-library=1 \ - --with-precision=double \ - --with-petsc-arch=%{_arch} \ - --with-clanguage=C \ - --with-shared-libraries=1 \ + %{petsc_build_options} \ --with-64-bit-indices=1 \ - --with-fortran-interfaces=1 \ - --with-windows-graphics=0 \ - --CC=gcc \ - --FC=gfortran \ - --CXX=g++ \ - --with-shared-ld=ld \ - --with-pic=1 \ - --with-clib-autodetect=0 \ - --with-fortranlib-autodetect=0 \ -%if 0%{?fedora} - --with-cxxlib-autodetect=0 \ -%endif - --with-mpi=0 \ - --with-threadsafety=0 --with-log=1 \ -%if %{with debug} - --with-debugging=1 \ -%else - --with-debugging=0 \ -%endif %if %{with blas64} - --with-blas-lapack-lib=-lopenblas64 \ - --known-64-bit-blas-indices=1 \ + --with-blas-lapack-lib=-lopenblas64 --known-64-bit-blas-indices=1 \ %endif - --with-x=1 \ - --with-openmp=0 \ - --with-metis=0 \ - --with-hwloc=0 \ - --with-ssl=0 \ - --with-pthread=1 \ - --with-valgrind=1 +%if %{with suitesparse64} + --with-suitesparse=1 \ + --with-suitesparse-include=%{_includedir}/suitesparse \ + --with-suitesparse-lib="-lumfpack64 -lklu64 -lcholmod64 -lamd64" +%endif +## RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`" make \ @@ -500,100 +597,13 @@ pushd buildopenmpi_dir %{_openmpi_load} %configure \ -%if %{with debug} -CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" COPTFLAGS="-O0 -g -Wl,-z,now" \ - CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" LDFLAGS="$LDFLAGS -fPIC" \ -%else -CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \ - COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \ -%endif - --CC_LINKER_FLAGS="$LDFLAGS" \ - --FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \ - --with-default-arch=0 --with-make=1 \ - --with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \ - --with-single-library=1 \ - --with-precision=double \ - --with-petsc-arch=%{_arch} \ - --with-clanguage=C \ - --with-shared-libraries=1 \ + --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lmpi_mpifh" \ + --LIBS=" -lmpi_mpifh" \ + %{petsc_mpibuild_options} \ --with-64-bit-indices=0 \ - --with-fortran-interfaces=1 \ - --with-windows-graphics=0 \ - --with-cc=mpicc \ - --with-cxx=mpicxx \ - --with-fc=mpif77 \ - --with-shared-ld=ld \ - --with-pic=1 \ - --with-clib-autodetect=0 \ - --with-fortranlib-autodetect=0 \ -%if 0%{?fedora} - --with-cxxlib-autodetect=0 \ -%endif - --with-threadsafety=0 --with-log=1 \ -%if %{with debug} - --with-debugging=1 \ -%else - --with-debugging=0 \ -%endif %if %{with blas} - --with-blas-lapack-lib="-lopenblas" \ - --known-64-bit-blas-indices=0 \ + --with-blas-lapack-lib=-lopenblas --known-64-bit-blas-indices=0 %endif -%if %{with scalapack} - --with-scalapack=1 \ - --with-scalapack-lib="-L$MPI_LIB -lscalapack" \ - --with-scalapck-include="" \ -%endif -%if %{with mpi} - --with-mpi=1 \ -%endif -%if %{with cgns} - --with-cgns=1 \ - --with-cgns-include= \ - --with-cgns-lib="-L$MPI_LIB -lhdf5 -lcgns" \ -%endif -%if %{with hdf5} - --with-hdf5=1 \ - --with-hdf5-include= \ - --with-hdf5-lib="-L$MPI_LIB -lhdf5" \ -%endif -%if %{with ptscotch} - --with-ptscotch=1 \ - --with-ptscotch-include= \ - --with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \ -%endif -%if %{with mumps} - --with-mumps=1 \ - --with-mumps-include=$MPI_INCLUDE \ - --with-mumps-lib="-L$MPI_LIB -ldmumps" \ -%endif -%if %{with sundials} - --with-sundials=1 \ - --with-sundials-include=$MPI_INCLUDE \ - --with-sundials-lib="-L$MPI_LIB -lsundials_nvecparallel" \ -%endif -%if %{with superludist} - --with-superlu_dist=1 \ - --with-superlu_dist-include=$MPI_INCLUDE/superlu_dist \ - --with-superlu_dist-lib=-lsuperlu_dist \ -%endif - --with-x=1 \ - --with-openmp=0 \ - --with-metis=0 \ - --with-hwloc=0 \ - --with-ssl=0 \ -%if %{with hypre} - --with-hypre=1 \ - --with-hypre-include=$MPI_INCLUDE/hypre \ - --with-hypre-lib="-L$MPI_LIB -lHYPRE" \ -%endif -%if %{with fftw} - --with-fftw=1 \ - --with-fftw-include= \ - --with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \ -%endif - --with-pthread=1 \ - --with-valgrind=1 #cat config.log #exit 1 @@ -613,100 +623,13 @@ pushd buildmpich_dir %{_mpich_load} %configure \ -%if %{with debug} -CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" COPTFLAGS="-O0 -g -Wl,-z,now" \ - CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" LDFLAGS="$LDFLAGS -fPIC" \ -%else -CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \ - COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \ -%endif - --CC_LINKER_FLAGS="$LDFLAGS" \ - --FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \ - --with-default-arch=0 --with-make=1 \ - --with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \ - --with-single-library=1 \ - --with-precision=double \ - --with-petsc-arch=%{_arch} \ - --with-clanguage=C \ - --with-shared-libraries=1 \ + --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lmpifort" \ + --LIBS=" -lmpifort" \ + %{petsc_mpibuild_options} \ --with-64-bit-indices=0 \ - --with-fortran-interfaces=1 \ - --with-windows-graphics=0 \ - --with-cc=mpicc \ - --with-cxx=mpicxx \ - --with-fc=mpif77 \ - --with-shared-ld=ld \ - --with-pic=1 \ - --with-clib-autodetect=0 \ - --with-fortranlib-autodetect=0 \ -%if 0%{?fedora} - --with-cxxlib-autodetect=0 \ -%endif - --with-threadsafety=0 --with-log=1 \ -%if %{with debug} - --with-debugging=1 \ -%else - --with-debugging=0 \ -%endif %if %{with blas} - --with-blas-lapack-lib=-lopenblas \ - --known-64-bit-blas-indices=0 \ + --with-blas-lapack-lib=-lopenblas --known-64-bit-blas-indices=0 %endif -%if %{with scalapack} - --with-scalapack=1 \ - --with-scalapack-lib="-L$MPI_LIB -lscalapack" \ - --with-scalapck-include="" \ -%endif -%if %{with mpi} - --with-mpi=1 \ -%endif -%if %{with cgns} - --with-cgns=1 \ - --with-cgns-include= \ - --with-cgns-lib="-L$MPI_LIB -lhdf5 -lcgns" \ -%endif -%if %{with hdf5} - --with-hdf5=1 \ - --with-hdf5-include= \ - --with-hdf5-lib="-L$MPI_LIB -lhdf5" \ -%endif -%if %{with ptscotch} - --with-ptscotch=1 \ - --with-ptscotch-include="" \ - --with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \ -%endif -%if %{with mumps} - --with-mumps=1 \ - --with-mumps-include=$MPI_INCLUDE \ - --with-mumps-lib="-L$MPI_LIB -ldmumps" \ -%endif -%if %{with sundials} - --with-sundials=1 \ - --with-sundials-include=$MPI_INCLUDE \ - --with-sundials-lib="-L$MPI_LIB -lsundials_nvecparallel" \ -%endif -%if %{with superludist} - --with-superlu_dist=1 \ - --with-superlu_dist-include=$MPI_INCLUDE/superlu_dist \ - --with-superlu_dist-lib=-lsuperlu_dist \ -%endif - --with-x=1 \ - --with-openmp=0 \ - --with-metis=0 \ - --with-hwloc=0 \ - --with-ssl=0 \ -%if %{with hypre} - --with-hypre=1 \ - --with-hypre-include=$MPI_INCLUDE/hypre \ - --with-hypre-lib="-L$MPI_LIB -lHYPRE" \ -%endif -%if %{with fftw} - --with-fftw=1 \ - --with-fftw-include= \ - --with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \ -%endif - --with-pthread=1 \ - --with-valgrind=1 #cat config.log #exit 1 @@ -731,6 +654,11 @@ install -pm 644 %{_arch}/include/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/ install -pm 644 %{_arch}/include/*.mod $RPM_BUILD_ROOT%{_fmoddir}/%{name}/ cp -a include/* $RPM_BUILD_ROOT%{_includedir}/%{name}/ +cp -a %{_arch}/lib/pkgconfig $RPM_BUILD_ROOT%{_libdir}/ +pushd $RPM_BUILD_ROOT%{_libdir}/pkgconfig +ln -s PETSc.pc petsc.pc +popd + install -pm 644 %{_arch}/lib/petsc/conf/petscrules $RPM_BUILD_ROOT%{_libdir}/%{name}/conf/ install -pm 644 %{_arch}/lib/petsc/conf/petscvariables $RPM_BUILD_ROOT%{_libdir}/%{name}/conf/ install -pm 644 lib/petsc/conf/rules $RPM_BUILD_ROOT%{_libdir}/%{name}/conf/ @@ -743,30 +671,12 @@ sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|${PETSC_DIR}/%{_lib}|g' -i $RPM_BUILD_R sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|${PETSC_DIR}/%{_lib}|g' -i $RPM_BUILD_ROOT%{_libdir}/%{name}/conf/rules popd -##Make a .pc file -mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig -cat > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/%{name}.pc < $RPM_BUILD_ROOT%{_libdir}/pkgconfig/%{name}64.pc < - 3.13.0-1 +- Release 3.13.0 +- Fix hdf5/cgns support +- Fix pkgconfig cflags +- Enable superludist + * Fri Feb 21 2020 Sandro Mani - 3.12.4-3 - Rebuild (cgnslib) diff --git a/sources b/sources index d9b4522..95c1493 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (petsc-3.12.4.tar.gz) = c830894f8b261eb821f7341f56897270aa20c9d778a74e9f1bb9f9b75a9a6ccf9444980910864a4286d7c7f8dd46790ab8e78454e89f1e2dd1b815e2e91a164d +SHA512 (petsc-3.13.0.tar.gz) = 0590bb63d9c6dfd6ac03b1b88e5a8c11d42a0fd014084603d4d085060b126aa4341b4ec3a4d2b12146b971da327ccc7ede370e5633282bf44f269465aea32953