|
|
|
@ -13,7 +13,9 @@
|
|
|
|
|
|
|
|
|
|
# Python binding and its testing
|
|
|
|
|
%bcond_without python
|
|
|
|
|
%bcond_without pycheck
|
|
|
|
|
# Python tests need Cython
|
|
|
|
|
# Python tests need epydoc (no longer available)
|
|
|
|
|
%bcond_with pycheck
|
|
|
|
|
%global pymodule_name petsc4py
|
|
|
|
|
%global pymodule_version %{version}
|
|
|
|
|
#
|
|
|
|
@ -30,7 +32,15 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%bcond_without mpich
|
|
|
|
|
%if 0%{?fedora} >= 40
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
|
%bcond_with openmpi
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without openmpi
|
|
|
|
|
%endif
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without openmpi
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
|
|
|
|
|
%bcond_without arch64
|
|
|
|
@ -128,7 +138,7 @@
|
|
|
|
|
--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-cmake-exec=%{_bindir}/cmake --with-ctest-exec=%{_bindir}/ctest \\\
|
|
|
|
|
--with-single-library=1 \\\
|
|
|
|
|
--with-precision=double \\\
|
|
|
|
|
--with-petsc-arch=%{_arch} \\\
|
|
|
|
@ -176,8 +186,10 @@
|
|
|
|
|
--with-sundials-include=%{_includedir} \\\
|
|
|
|
|
--with-sundials-lib="-lsundials_nvecserial -lsundials_cvode" \\\
|
|
|
|
|
%endif \
|
|
|
|
|
--with-pthread=1 \\\
|
|
|
|
|
--with-valgrind=1
|
|
|
|
|
%ifarch %{valgrind_arches} \
|
|
|
|
|
--with-valgrind=1 \\\
|
|
|
|
|
%endif \
|
|
|
|
|
--with-pthread=1
|
|
|
|
|
|
|
|
|
|
%global petsc_mpibuild_options \\\
|
|
|
|
|
%if %{with debug} \
|
|
|
|
@ -191,7 +203,7 @@
|
|
|
|
|
%endif \
|
|
|
|
|
--CC_LINKER_FLAGS="$LDFLAGS" \\\
|
|
|
|
|
--with-default-arch=0 --with-make=1 \\\
|
|
|
|
|
--with-cmake-exec=%{_bindir}/cmake3 --with-ctest-exec=%{_bindir}/ctest3 \\\
|
|
|
|
|
--with-cmake-exec=%{_bindir}/cmake --with-ctest-exec=%{_bindir}/ctest \\\
|
|
|
|
|
--with-single-library=1 \\\
|
|
|
|
|
--with-precision=double \\\
|
|
|
|
|
--with-petsc-arch=%{_arch} \\\
|
|
|
|
@ -275,18 +287,20 @@
|
|
|
|
|
--with-fftw-include= \\\
|
|
|
|
|
--with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \\\
|
|
|
|
|
%endif \
|
|
|
|
|
--with-pthread=1 \\\
|
|
|
|
|
--with-valgrind=1
|
|
|
|
|
%ifarch %{valgrind_arches} \
|
|
|
|
|
--with-valgrind=1 \\\
|
|
|
|
|
%endif \
|
|
|
|
|
--with-pthread=1
|
|
|
|
|
|
|
|
|
|
%global mpichversion %(rpm -qi mpich | awk -F': ' '/Version/ {print $2}')
|
|
|
|
|
%global openmpiversion %(rpm -qi openmpi | awk -F': ' '/Version/ {print $2}')
|
|
|
|
|
%global majorver 3
|
|
|
|
|
%global releasever 3.19
|
|
|
|
|
%global releasever 3.20
|
|
|
|
|
|
|
|
|
|
Name: petsc
|
|
|
|
|
Summary: Portable Extensible Toolkit for Scientific Computation
|
|
|
|
|
Version: %{releasever}.4
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Version: %{releasever}.1
|
|
|
|
|
Release: %autorelease -e 0.riscv64
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: https://petsc.org/
|
|
|
|
|
Source0: https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-with-docs-%{version}.tar.gz
|
|
|
|
@ -305,7 +319,6 @@ Patch0: %{name}-3.11-no-rpath.patch
|
|
|
|
|
Patch1: %{name}-lib64.patch
|
|
|
|
|
Patch3: %{name}-3.19.4-fix_mumps_includes.patch
|
|
|
|
|
Patch4: %{name}-3.19.4-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
|
|
|
|
|
|
|
|
|
@ -328,7 +341,7 @@ BuildRequires: suitesparse-devel >= 5.6.0
|
|
|
|
|
BuildRequires: %{blaslib}-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: chrpath
|
|
|
|
|
BuildRequires: gcc, gcc-c++, cmake3
|
|
|
|
|
BuildRequires: gcc, gcc-c++, cmake
|
|
|
|
|
BuildRequires: gcc-gfortran
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: libX11-devel
|
|
|
|
@ -347,7 +360,9 @@ BuildRequires: tcsh
|
|
|
|
|
BuildRequires: tetgen-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: xorg-x11-server-Xvfb
|
|
|
|
|
%ifarch %{valgrind_arches}
|
|
|
|
|
BuildRequires: valgrind-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
PETSc, pronounced PET-see (the S is silent), is a suite of data structures
|
|
|
|
@ -442,7 +457,6 @@ Requires: openmpi-devel%{?_isa} = %{epoch}:%{openmpiversion}
|
|
|
|
|
Requires: hdf5-openmpi-devel%{?_isa}
|
|
|
|
|
%description openmpi-devel
|
|
|
|
|
Portable Extensible Toolkit for Scientific Computation (developer files).
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
%package -n python3-%{name}-openmpi
|
|
|
|
@ -456,11 +470,7 @@ BuildRequires: hdf5-openmpi-devel
|
|
|
|
|
BuildRequires: scalapack-openmpi-devel
|
|
|
|
|
BuildRequires: ptscotch-openmpi-devel
|
|
|
|
|
BuildRequires: python3-numpy
|
|
|
|
|
%if 0%{?rhel} || 0%{?fedora} < 39
|
|
|
|
|
BuildRequires: python3-Cython
|
|
|
|
|
%else
|
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
%endif
|
|
|
|
|
Requires: petsc-openmpi%{?_isa}
|
|
|
|
|
Requires: hdf5-openmpi%{?_isa}
|
|
|
|
|
Requires: scalapack-openmpi%{?_isa}
|
|
|
|
@ -477,39 +487,7 @@ Provides: %{pymodule_name}-openmpi = 0:%{pymodule_version}-%{release}
|
|
|
|
|
%description -n python3-%{name}-openmpi
|
|
|
|
|
This package provides Python3 bindings for OpenMPI PETSc,
|
|
|
|
|
the Portable, Extensible Toolkit for Scientific Computation.
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{name}-mpich
|
|
|
|
|
Summary: Python3 bindings for MPICH PETSc
|
|
|
|
|
%{?python_provide:%python_provide python3-%{name}-mpich}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-wheel
|
|
|
|
|
BuildRequires: hdf5-mpich-devel
|
|
|
|
|
BuildRequires: scalapack-mpich-devel
|
|
|
|
|
BuildRequires: ptscotch-mpich-devel
|
|
|
|
|
BuildRequires: python3-numpy
|
|
|
|
|
%if 0%{?rhel} || 0%{?fedora} < 39
|
|
|
|
|
BuildRequires: python3-Cython
|
|
|
|
|
%else
|
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
%endif
|
|
|
|
|
Requires: petsc-mpich%{?_isa}
|
|
|
|
|
Requires: hdf5-mpich%{?_isa}
|
|
|
|
|
Requires: scalapack-openmpi%{?_isa}
|
|
|
|
|
Requires: ptscotch-mpich%{?_isa}
|
|
|
|
|
Requires: mpich%{?_isa} = 0:%{mpichversion}
|
|
|
|
|
Requires: MUMPS-mpich%{?_isa}
|
|
|
|
|
|
|
|
|
|
Obsoletes: %{pymodule_name}-mpich < 0:3.14.0-3
|
|
|
|
|
Obsoletes: python3-%{pymodule_name}-mpich < 0:3.14.0-3
|
|
|
|
|
Provides: python3-%{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
|
|
|
|
|
Provides: python-%{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
|
|
|
|
|
Provides: %{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{name}-mpich
|
|
|
|
|
This package provides Python3 bindings for MPICH PETSc,
|
|
|
|
|
the Portable, Extensible Toolkit for Scientific Computation.
|
|
|
|
|
%endif
|
|
|
|
|
######
|
|
|
|
|
###############################################################################
|
|
|
|
@ -564,6 +542,37 @@ Requires: mpich-devel%{?_isa} = 0:%{mpichversion}
|
|
|
|
|
Requires: hdf5-mpich-devel%{?_isa}
|
|
|
|
|
%description mpich-devel
|
|
|
|
|
Portable Extensible Toolkit for Scientific Computation (developer files).
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
%package -n python3-%{name}-mpich
|
|
|
|
|
Summary: Python3 bindings for MPICH PETSc
|
|
|
|
|
%{?python_provide:%python_provide python3-%{name}-mpich}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-wheel
|
|
|
|
|
BuildRequires: hdf5-mpich-devel
|
|
|
|
|
BuildRequires: scalapack-mpich-devel
|
|
|
|
|
BuildRequires: ptscotch-mpich-devel
|
|
|
|
|
BuildRequires: python3-numpy
|
|
|
|
|
BuildRequires: python3-Cython
|
|
|
|
|
Requires: petsc-mpich%{?_isa}
|
|
|
|
|
Requires: hdf5-mpich%{?_isa}
|
|
|
|
|
Requires: scalapack-mpich%{?_isa}
|
|
|
|
|
Requires: ptscotch-mpich%{?_isa}
|
|
|
|
|
Requires: mpich%{?_isa} = 0:%{mpichversion}
|
|
|
|
|
Requires: MUMPS-mpich%{?_isa}
|
|
|
|
|
|
|
|
|
|
Obsoletes: %{pymodule_name}-mpich < 0:3.14.0-3
|
|
|
|
|
Obsoletes: python3-%{pymodule_name}-mpich < 0:3.14.0-3
|
|
|
|
|
Provides: python3-%{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
|
|
|
|
|
Provides: python-%{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
|
|
|
|
|
Provides: %{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{name}-mpich
|
|
|
|
|
This package provides Python3 bindings for MPICH PETSc,
|
|
|
|
|
the Portable, Extensible Toolkit for Scientific Computation.
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
######
|
|
|
|
|
#############################################################################
|
|
|
|
@ -587,7 +596,7 @@ popd
|
|
|
|
|
|
|
|
|
|
# Remove pregenerated Cython C sources
|
|
|
|
|
pushd %{name}-%{version}
|
|
|
|
|
#rm $(grep -rl '/\* Generated by Cython')
|
|
|
|
|
rm -vf $(grep -rl '/\* Generated by Cython')
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%if %{with arch64}
|
|
|
|
@ -602,26 +611,15 @@ popd
|
|
|
|
|
|
|
|
|
|
pushd %{name}-%{version}
|
|
|
|
|
%patch -P 0 -p0 -b .backup
|
|
|
|
|
%patch -P 5 -p1 -b .backup
|
|
|
|
|
%patch -P 6 -p1 -b .backup
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%if %{with openmpi}
|
|
|
|
|
cp -a %{name}-%{version} buildopenmpi_dir
|
|
|
|
|
%if 0%{?fedora} > 38
|
|
|
|
|
cp %{SOURCE2} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc.c
|
|
|
|
|
cp %{SOURCE3} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc.h
|
|
|
|
|
cp %{SOURCE4} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc_api.h
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with mpich}
|
|
|
|
|
cp -a %{name}-%{version} buildmpich_dir
|
|
|
|
|
%if 0%{?fedora} > 38
|
|
|
|
|
cp %{SOURCE2} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc.c
|
|
|
|
|
cp %{SOURCE3} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc.h
|
|
|
|
|
cp %{SOURCE4} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc_api.h
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Do NOT move up this patch
|
|
|
|
@ -1019,9 +1017,9 @@ xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C buildopenmpi_dir V=1
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
%if %{with pycheck}
|
|
|
|
|
pushd buildopenmpi_dir
|
|
|
|
|
pushd buildopenmpi_dir/src/binding/petsc4py
|
|
|
|
|
export PETSC_ARCH=%{_arch}
|
|
|
|
|
export PETSC_DIR=./
|
|
|
|
|
export PETSC_DIR=../../../
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
MPI_PYTHON3_SITEARCH=%{python3_sitearch}/openmpi
|
|
|
|
|
%endif
|
|
|
|
@ -1060,9 +1058,9 @@ xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C buildmpich_dir V=1
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
%if %{with pycheck}
|
|
|
|
|
pushd buildmpich_dir
|
|
|
|
|
pushd buildmpich_dir/src/binding/petsc4py
|
|
|
|
|
export PETSC_ARCH=%{_arch}
|
|
|
|
|
export PETSC_DIR=./
|
|
|
|
|
export PETSC_DIR=../../../
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
MPI_PYTHON3_SITEARCH=%{python3_sitearch}/mpich
|
|
|
|
|
%endif
|
|
|
|
|