cbab4bc
# Broken package_note links in rules and variables files
cbab4bc
# Disabling this functionality
cbab4bc
%undefine _package_note_file
cbab4bc
a5dd511
# Disable LTO
4cb045c
# undefined-non-weak-symbol libpetsc.so.3.*_glibcxx_assert_fail
a5dd511
%undefine _ld_as_needed
93af49f
%global _lto_cflags %{nil}
93af49f
ff23c78
# Testing libpetsc ?
05d358e
%bcond_without check
ff23c78
#
ff23c78
ff23c78
# Python binding and its testing
fe12645
%bcond_without python
234975d
# Python tests need Cython
d5b5ccd
# Python tests need epydoc (no longer available)
d5b5ccd
%bcond_with pycheck
ff23c78
%global pymodule_name petsc4py
8bd9c29
%global pymodule_version %{version}
ff23c78
#
ece75dc
1e5bc60
## Debug builds ?
471d88f
%bcond_with debug
ece75dc
#
ece75dc
2606434
## Fix Epoch in EPEL9
2606434
%if 0%{?el9}
2606434
%global epoch 1
2606434
%else
2606434
%global epoch 0
2606434
%endif
ece75dc
fe12645
%bcond_without mpich
862b561
%if 0%{?fedora} >= 40
862b561
%ifarch %{ix86}
ae33a35
%bcond_with openmpi
ae33a35
%else
e11f3e6
%bcond_without openmpi
ae33a35
%endif
862b561
%else
862b561
%bcond_without openmpi
862b561
%endif
9d9cb3d
9d9cb3d
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
fe12645
%bcond_without arch64
9d9cb3d
%else
9d9cb3d
%bcond_with arch64
4597712
%endif
b4a5b38
9d9cb3d
%bcond_without blas
9d9cb3d
%if %{with arch64}
9d9cb3d
%bcond_without blas64
9d9cb3d
%endif
c3c3682
48342c7
%global blaslib flexiblas
48342c7
%global blasvar %{nil}
48342c7
ece75dc
#
ece75dc
## PETSC looks incompatible with serial MUMPS
7d2e1c8
%bcond_without mumps_serial
ece75dc
#
ff23c78
## Sundials needs mpi ?
42e5f9e
%bcond_with sundials_serial
42e5f9e
#
ece75dc
%bcond_without superlu
ece75dc
#
ece75dc
7d2e1c8
## Suitesparse
d293ecb
## This version of PETSc needs the 5.6.0 at least
7d2e1c8
%bcond_with suitesparse
7d2e1c8
%bcond_with suitesparse64
7d2e1c8
#
7d2e1c8
680bb22
## SuperLUDIST needs parmetis
680bb22
%bcond_without superludist >= 6.3.0
df7dae1
%bcond_with cgns
eada8e5
%bcond_without hdf5
722a325
%bcond_with superlumt
722a325
#
722a325
bf2bc91
## Tetgen
bf2bc91
%bcond_with tetgen
bf2bc91
#
bf2bc91
680bb22
## Metis
680bb22
%bcond_without metis
680bb22
%bcond_without metis64
680bb22
#
680bb22
ff23c78
# 'scalapack' is required by 'MUMPS'
ece75dc
%if %{with openmpi}
ece75dc
%bcond_without mpi
154f8c8
# PETSC-3.* is incompatible with Sundials 3+
e72e997
%bcond_with sundials
ece75dc
%bcond_without scalapack
ece75dc
%bcond_without mumps
1e5bc60
%bcond_without ptscotch
ece75dc
%bcond_without hypre
ece75dc
%endif
ece75dc
ece75dc
%if %{with mpich}
ece75dc
%bcond_without mpi
7d2e1c8
# PETSC-3.* is incompatible with Sundials 3+
e72e997
%bcond_with sundials
ece75dc
%bcond_without scalapack
ece75dc
%bcond_without mumps
1e5bc60
%bcond_without ptscotch
ece75dc
%bcond_without hypre
ece75dc
%endif
ece75dc
7d2e1c8
%global petsc_build_options \\\
7d2e1c8
 %if %{with debug} \
7d2e1c8
 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" \\\
7d2e1c8
  CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I%{_libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -fPIC" \\\
6c55a29
  FCFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" \\\
7d2e1c8
 %else \
7d2e1c8
 CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \\\
9645be1
  COPTFLAGS="$CFLAGS -O3" CXXOPTFLAGS="$CXXFLAGS -O3" FOPTFLAGS="$FFLAGS -O3" \\\
6c55a29
  FCFLAGS="$FFLAGS -O3 -fPIC" \\\
7d2e1c8
 %endif \
7d2e1c8
 --CC_LINKER_FLAGS="$LDFLAGS" \\\
7d2e1c8
 --FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \\\
7d2e1c8
 --with-default-arch=0 --with-make=1 \\\
d5b5ccd
 --with-cmake-exec=%{_bindir}/cmake --with-ctest-exec=%{_bindir}/ctest \\\
7d2e1c8
 --with-single-library=1 \\\
7d2e1c8
 --with-precision=double \\\
7d2e1c8
 --with-petsc-arch=%{_arch} \\\
7d2e1c8
 --with-clanguage=C \\\
7d2e1c8
 --with-shared-libraries=1 \\\
7d2e1c8
 --with-fortran-interfaces=1 \\\
7d2e1c8
 --with-windows-graphics=0 \\\
7d2e1c8
 --CC=gcc \\\
7d2e1c8
 --FC=gfortran \\\
7d2e1c8
 --CXX=g++ \\\
7d2e1c8
 --with-shared-ld=ld \\\
7d2e1c8
 --with-pic=1 \\\
7d2e1c8
 --with-clib-autodetect=0 \\\
7d2e1c8
 --with-fortranlib-autodetect=0 \\\
7d2e1c8
 --with-threadsafety=0 --with-log=1 \\\
6a0cc22
 --with-mkl_sparse=0 \\\
6a0cc22
 --with-mkl_sparse_optimize=0 \\\
6a0cc22
 --with-mkl_cpardiso=0 \\\
6a0cc22
 --with-mkl_pardiso=0 \\\
9645be1
 --with-python=0 \\\
9645be1
 --with-cxxlib-autodetect=1 \\\
7d2e1c8
 %if %{with debug} \
7d2e1c8
  --with-debugging=1 \\\
7d2e1c8
 %else \
7d2e1c8
  --with-debugging=0 \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with mumps_serial} \
7d2e1c8
  --with-mumps-serial=1 \\\
7d2e1c8
 %endif \
7d2e1c8
  --with-mpi=0 \\\
7d2e1c8
 %if %{with hdf5} \
7d2e1c8
  --with-hdf5=1 \\\
7d2e1c8
  --with-hdf5-include= \\\
7d2e1c8
  --with-hdf5-lib="-lhdf5 -lhdf5_hl" \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with cgns} \
df7dae1
  --with-cgns=0 \\\
7d2e1c8
 %endif \
7d2e1c8
  --with-x=1 \\\
7d2e1c8
  --with-openmp=0 \\\
7d2e1c8
  --with-hwloc=0 \\\
7d2e1c8
  --with-ssl=0 \\\
7d2e1c8
 %if %{with sundials_serial} \
7d2e1c8
  --with-sundials=1 \\\
7d2e1c8
  --with-sundials-include=%{_includedir} \\\
7d2e1c8
  --with-sundials-lib="-lsundials_nvecserial -lsundials_cvode" \\\
7d2e1c8
 %endif \
David Abdurachmanov 52d7cd2
 %ifarch %{valgrind_arches} \
David Abdurachmanov 52d7cd2
  --with-valgrind=1 \\\
David Abdurachmanov 52d7cd2
 %endif \
David Abdurachmanov 52d7cd2
  --with-pthread=1
7d2e1c8
7d2e1c8
%global petsc_mpibuild_options \\\
7d2e1c8
 %if %{with debug} \
7d2e1c8
 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" \\\
7d2e1c8
  CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I${MPI_FORTRAN_MOD_DIR}" LDFLAGS="$LDFLAGS -fPIC" \\\
6c55a29
  FCFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" \\\
7d2e1c8
 %else \
7d2e1c8
 CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \\\
9645be1
  COPTFLAGS="$CFLAGS -O3" CXXOPTFLAGS="$CXXFLAGS -O3" FOPTFLAGS="$FFLAGS -O3" \\\
6c55a29
  FCFLAGS="$FFLAGS -O3 -fPIC" \\\
7d2e1c8
 %endif \
7d2e1c8
  --CC_LINKER_FLAGS="$LDFLAGS" \\\
7d2e1c8
  --with-default-arch=0 --with-make=1 \\\
d5b5ccd
  --with-cmake-exec=%{_bindir}/cmake --with-ctest-exec=%{_bindir}/ctest \\\
7d2e1c8
  --with-single-library=1 \\\
7d2e1c8
  --with-precision=double \\\
7d2e1c8
  --with-petsc-arch=%{_arch} \\\
7d2e1c8
  --with-clanguage=C \\\
7d2e1c8
  --with-shared-libraries=1 \\\
7d2e1c8
  --with-fortran-interfaces=1 \\\
7d2e1c8
  --with-windows-graphics=0 \\\
eada8e5
  --with-cc=${MPI_BIN}/mpicc \\\
eada8e5
  --with-cxx=${MPI_BIN}/mpicxx \\\
eada8e5
  --with-fc=${MPI_BIN}/mpif90 \\\
7d2e1c8
  --with-shared-ld=ld \\\
7d2e1c8
  --with-pic=1 \\\
7d2e1c8
  --with-clib-autodetect=0 \\\
7d2e1c8
  --with-fortranlib-autodetect=0 \\\
6a0cc22
  --with-mkl_sparse=0 \\\
6a0cc22
  --with-mkl_sparse_optimize=0 \\\
6a0cc22
  --with-mkl_cpardiso=0 \\\
6a0cc22
  --with-mkl_pardiso=0 \\\
ff23c78
 %if %{with python} \
ff23c78
  --with-python=1 \\\
ff23c78
  --with-python-exec=%{__python3} \\\
d293ecb
  --with-petsc4py=1 \\\
d293ecb
  --with-petsc4py-test-np="`/usr/bin/getconf _NPROCESSORS_ONLN`" \\\
ff23c78
 %endif \
9645be1
  --with-cxxlib-autodetect=1 \\\
7d2e1c8
  --with-threadsafety=0 --with-log=1 \\\
7d2e1c8
 %if %{with debug} \
7d2e1c8
  --with-debugging=1 \\\
8bd9c29
    --with-mpiexec="${MPI_BIN}/mpiexec -n `/usr/bin/getconf _NPROCESSORS_ONLN` --mca btl_base_warn_component_unused 0 --mca orte_base_help_aggregate 0" \\\
7d2e1c8
 %else \
7d2e1c8
  --with-debugging=0 \\\
8bd9c29
    --with-mpiexec="${MPI_BIN}/mpiexec -n `/usr/bin/getconf _NPROCESSORS_ONLN` --mca btl_base_warn_component_unused 0" \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with scalapack} \
7d2e1c8
  --with-scalapack=1 \\\
7d2e1c8
  --with-scalapack-lib="-L$MPI_LIB -lscalapack" \\\
7d2e1c8
  --with-scalapck-include="" \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with mpi} \
7d2e1c8
  --with-mpi=1 \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with cgns} \
7d2e1c8
  --with-cgns=1 \\\
df7dae1
  --with-cgns-include=%{_includedir} \\\
7d2e1c8
  --with-cgns-lib=-lcgns \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with hdf5} \
7d2e1c8
  --with-hdf5=1 \\\
7d2e1c8
  --with-hdf5-include= \\\
7d2e1c8
  --with-hdf5-lib="-L$MPI_LIB -lhdf5 -lhdf5_hl" \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with ptscotch} \
7d2e1c8
  --with-ptscotch=1 \\\
351a2e8
  %if 0%{?rhel} \
351a2e8
  --with-ptscotch-include=$MPI_INCLUDE \\\
351a2e8
  %else \
df7dae1
  --with-ptscotch-include=$MPI_INCLUDE/scotch \\\
351a2e8
  %endif \
7d2e1c8
  --with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with mumps} \
7d2e1c8
  --with-mumps=1 \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with sundials} \
7d2e1c8
  --with-sundials=1 \\\
7d2e1c8
  --with-sundials-include=$MPI_INCLUDE \\\
7d2e1c8
  --with-sundials-lib=-lsundials_nvecparallel \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with superludist} \
7d2e1c8
  --with-superlu_dist=1 \\\
7d2e1c8
  --with-superlu_dist-include=$MPI_INCLUDE/superlu_dist \\\
7d2e1c8
  --with-superlu_dist-lib=-lsuperlu_dist \\\
7d2e1c8
 %endif \
7d2e1c8
  --with-x=1 \\\
7d2e1c8
  --with-openmp=0 \\\
7d2e1c8
  --with-hwloc=0 \\\
7d2e1c8
  --with-ssl=0 \\\
7d2e1c8
 %if %{with hypre} \
7d2e1c8
  --with-hypre=1 \\\
7d2e1c8
  --with-hypre-include=$MPI_INCLUDE/hypre \\\
7d2e1c8
  --with-hypre-lib="-L$MPI_LIB -lHYPRE" \\\
7d2e1c8
 %endif \
7d2e1c8
 %if %{with fftw} \
7d2e1c8
  --with-fftw=1 \\\
7d2e1c8
  --with-fftw-include= \\\
7d2e1c8
  --with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \\\
7d2e1c8
 %endif \
David Abdurachmanov 52d7cd2
 %ifarch %{valgrind_arches} \
David Abdurachmanov 52d7cd2
  --with-valgrind=1 \\\
David Abdurachmanov 52d7cd2
 %endif \
David Abdurachmanov 52d7cd2
  --with-pthread=1
412a009
  
412a009
%global mpichversion %(rpm -qi mpich | awk -F': ' '/Version/ {print $2}')
412a009
%global openmpiversion %(rpm -qi openmpi | awk -F': ' '/Version/ {print $2}')
5cba6bd
%global majorver 3
0ef5b08
%global releasever 3.20
9d6eb52
ece75dc
Name:    petsc
ece75dc
Summary: Portable Extensible Toolkit for Scientific Computation
4cb045c
Version: %{releasever}.6
68b0545
Release: %autorelease
68b28a0
License: BSD-2-Clause
8bd9c29
URL:     https://petsc.org/
c3f64b1
Source0: https://web.cels.anl.gov/projects/%{name}/download/release-snapshots/%{name}-with-docs-%{version}.tar.gz
ece75dc
56c2842
# These files have been generated by Cython-3.0.6
56c2842
# PETSC-3.20+ needs Cython-3.0.0, these files are used in EPEL9
56c2842
Source1: %{name}-3.20-PETSc_cython3.0.6.c
56c2842
Source2: %{name}-3.20-PETSc_cython3.0.6.h
56c2842
Source3: %{name}-3.20-PETSc_api_cython3.0.6.h
7ca294b
ece75dc
## Remove rpath flags
c1598ba
Patch0:  %{name}-3.11-no-rpath.patch
ece75dc
ece75dc
## Rename library name for 64-bit integer package
ece75dc
Patch1:  %{name}-lib64.patch
7ca294b
Patch3:  %{name}-3.19.4-fix_mumps_includes.patch
7ca294b
Patch4:  %{name}-3.19.4-fix_metis64.patch
6a0cc22
Patch6:  %{name}-3.14.1-fix_pkgconfig_file.patch
b9c4a64
Patch7:  %{name}-3.17.0-avoid_fake_MKL_detection.patch
3386a9b
ece75dc
%if %{with superlu}
c81b773
BuildRequires: SuperLU-devel >= 5.2.0
ece75dc
%endif
722a325
%if %{with superlumt}
722a325
BuildRequires: SuperLUMT-devel
722a325
%endif
ece75dc
%if %{with mumps_serial}
4cb045c
BuildRequires: MUMPS-devel
ece75dc
%endif
7d2e1c8
%if %{with metis}
7d2e1c8
BuildRequires: metis-devel >= 5.1.0
03de112
%endif
7d2e1c8
%if %{with suitesparse}
7d2e1c8
BuildRequires: suitesparse-devel >= 5.6.0
ece75dc
%endif
ece75dc
%if %{with blas}
48342c7
BuildRequires: %{blaslib}-devel
ece75dc
%endif
bf2bc91
BuildRequires: chrpath
d5b5ccd
BuildRequires: gcc, gcc-c++, cmake
eada8e5
BuildRequires: gcc-gfortran
eada8e5
BuildRequires: make
ece75dc
BuildRequires: libX11-devel
45b8086
BuildRequires: python3-devel
f12f75c
BuildRequires: python3-setuptools
81868e9
BuildRequires: pcre2-devel
7d2e1c8
%if %{with hdf5}
7d2e1c8
BuildRequires: hdf5-devel
7d2e1c8
%endif
7d2e1c8
%if %{with cgns}
7d2e1c8
BuildRequires: cgnslib-devel
7d2e1c8
BuildRequires: hdf5-devel
7d2e1c8
%endif
ece75dc
BuildRequires: tcsh
bf2bc91
%if %{with tetgen}
bf2bc91
BuildRequires: tetgen-devel
bf2bc91
%endif
7d2e1c8
BuildRequires: xorg-x11-server-Xvfb
David Abdurachmanov 52d7cd2
%ifarch %{valgrind_arches}
bf2bc91
BuildRequires: valgrind-devel
David Abdurachmanov 52d7cd2
%endif
ece75dc
ece75dc
%description
ece75dc
PETSc, pronounced PET-see (the S is silent), is a suite of data structures
ece75dc
and routines for the scalable (parallel) solution of scientific applications
ece75dc
modeled by partial differential equations.
ece75dc
ece75dc
%package devel
ece75dc
Summary:    Portable Extensible Toolkit for Scientific Computation (developer files)
ece75dc
Requires:   %{name}%{?_isa} = %{version}-%{release}
d0a20eb
Requires: gcc-gfortran%{?_isa}
ece75dc
%description devel
ece75dc
Portable Extensible Toolkit for Scientific Computation (developer files).
ece75dc
ece75dc
%package doc
ece75dc
Summary:    Portable Extensible Toolkit for Scientific Computation (documentation files)
45b8086
BuildRequires: python3-sphinx
ece75dc
BuildArch:  noarch
ece75dc
%description doc
ece75dc
Portable Extensible Toolkit for Scientific Computation.
ece75dc
PDF and HTML documentation files.
ece75dc
ece75dc
%if %{with arch64}
ece75dc
%package -n petsc64
ece75dc
Summary: Portable Extensible Toolkit for Scientific Computation (64bit INTEGER)
6a0cc22
%if %{with metis64}
7d2e1c8
BuildRequires: metis64-devel >= 5.1.0
7d2e1c8
%endif
ece75dc
ece75dc
%description -n petsc64
ece75dc
PETSc, pronounced PET-see (the S is silent), is a suite of data structures
ece75dc
and routines for the scalable (parallel) solution of scientific applications
ece75dc
modeled by partial differential equations (64bit INTEGER).
ece75dc
ece75dc
%package -n petsc64-devel
ece75dc
Requires:   %{name}64%{?_isa} = %{version}-%{release}
ece75dc
Requires:   gcc-gfortran%{?_isa}
2606434
Summary:    Portable Extensible Toolkit for Scientific Computation (64bit INTEGER)
ece75dc
ece75dc
%description -n petsc64-devel
ece75dc
Portable Extensible Toolkit for Scientific Computation (developer files)
ece75dc
(64bit INTEGER).
ece75dc
%endif
ece75dc
ece75dc
#############################################################################
ece75dc
#########
ece75dc
%if %{with openmpi}
ece75dc
%package openmpi
ece75dc
Summary:    Portable Extensible Toolkit for Scientific Computation (OpenMPI)
ece75dc
BuildRequires: openmpi-devel
ece75dc
%if %{with hdf5}
ece75dc
BuildRequires: hdf5-openmpi-devel
ece75dc
%endif
ece75dc
%if %{with cgns}
ece75dc
BuildRequires: cgnslib-devel
7d2e1c8
BuildRequires: hdf5-openmpi-devel
ece75dc
%endif
ece75dc
%if %{with ptscotch}
ece75dc
BuildRequires: ptscotch-openmpi-devel
ece75dc
%endif
ece75dc
%if %{with scalapack}
ece75dc
BuildRequires: scalapack-openmpi-devel
2eb306a
%if 0%{?rhel}
ece75dc
BuildRequires: blacs-openmpi-devel
ece75dc
%endif
5ed657e
%endif
ece75dc
%if %{with mumps}
4cb045c
BuildRequires: MUMPS-openmpi-devel
ece75dc
%endif
ece75dc
%if %{with sundials}
ece75dc
BuildRequires: sundials-openmpi-devel
ece75dc
%endif
722a325
%if %{with superludist}
b9c4a64
BuildRequires: superlu_dist-openmpi-devel >= 6.3.0
722a325
%endif
ece75dc
%if %{with fftw}
ece75dc
BuildRequires: fftw-devel
ece75dc
BuildRequires: fftw-openmpi-devel
ece75dc
%endif
ece75dc
%if %{with hypre}
ece75dc
BuildRequires: hypre-openmpi-devel
ece75dc
%endif
ece75dc
ece75dc
%description openmpi
ece75dc
PETSc, pronounced PET-see (the S is silent), is a suite of data structures
ece75dc
and routines for the scalable (parallel) solution of scientific applications
ece75dc
modeled by partial differential equations.
ece75dc
ece75dc
%package openmpi-devel
ece75dc
Summary:    Portable Extensible Toolkit for Scientific Computation (OpenMPI)
ece75dc
Requires:   %{name}-openmpi%{?_isa} = %{version}-%{release}
2606434
Requires:   openmpi-devel%{?_isa} = %{epoch}:%{openmpiversion}
bbef05e
Requires:   hdf5-openmpi-devel%{?_isa}
ece75dc
%description openmpi-devel
ece75dc
Portable Extensible Toolkit for Scientific Computation (developer files).
ff23c78
ff23c78
%if %{with python}
d935acc
%package -n     python3-%{name}-openmpi
ff23c78
Summary:        Python3 bindings for OpenMPI PETSc
d935acc
%{?python_provide:%python_provide python3-%{name}-openmpi}
ff23c78
d935acc
BuildRequires:  python3-devel
d935acc
BuildRequires:  python3-setuptools
d935acc
BuildRequires:  python3-wheel
ff23c78
BuildRequires:  hdf5-openmpi-devel
ff23c78
BuildRequires:  scalapack-openmpi-devel
ff23c78
BuildRequires:  ptscotch-openmpi-devel
7ca294b
BuildRequires:  python3-numpy
56c2842
%if 0%{?rhel}
56c2842
BuildRequires:  python3-pip
56c2842
%else
7ca294b
BuildRequires:  python3-Cython
56c2842
%endif
ff23c78
Requires:       petsc-openmpi%{?_isa}
ff23c78
Requires:       hdf5-openmpi%{?_isa}
ff23c78
Requires:       scalapack-openmpi%{?_isa}
ff23c78
Requires:       ptscotch-openmpi%{?_isa}
2606434
Requires:       openmpi%{?_isa} = %{epoch}:%{openmpiversion}
ff23c78
Requires:       MUMPS-openmpi%{?_isa}
ff23c78
ff23c78
Obsoletes:      %{pymodule_name}-openmpi < 0:3.14.0-3
d935acc
Obsoletes:      python3-%{pymodule_name}-openmpi < 0:3.14.0-3
d935acc
Provides:       python3-%{pymodule_name}-openmpi = 0:%{pymodule_version}-%{release}
ff23c78
Provides:       python-%{pymodule_name}-openmpi = 0:%{pymodule_version}-%{release}
ff23c78
Provides:       %{pymodule_name}-openmpi = 0:%{pymodule_version}-%{release}
ff23c78
d935acc
%description -n python3-%{name}-openmpi
ff23c78
This package provides Python3 bindings for OpenMPI PETSc,
ff23c78
the Portable, Extensible Toolkit for Scientific Computation.
6da167f
%endif
ff23c78
%endif
ece75dc
######
ece75dc
###############################################################################
ece75dc
######
ece75dc
%if %{with mpich}
ece75dc
%package mpich
ece75dc
Summary:    Portable Extensible Toolkit for Scientific Computation (MPICH)
ece75dc
BuildRequires: mpich-devel
ece75dc
%if %{with hdf5}
ece75dc
BuildRequires: hdf5-mpich-devel
ece75dc
%endif
ece75dc
%if %{with cgns}
ece75dc
BuildRequires: cgnslib-devel
7d2e1c8
BuildRequires: hdf5-mpich-devel
ece75dc
%endif
ece75dc
%if %{with ptscotch}
ece75dc
BuildRequires: ptscotch-mpich-devel
ece75dc
%endif
ece75dc
%if %{with scalapack}
ece75dc
BuildRequires: scalapack-mpich-devel
5b88d84
%if 0%{?rhel}
ece75dc
BuildRequires: blacs-mpich-devel
ece75dc
%endif
5ed657e
%endif
ece75dc
%if %{with mumps}
4cb045c
BuildRequires: MUMPS-mpich-devel
ece75dc
%endif
ece75dc
%if %{with sundials}
ece75dc
BuildRequires: sundials-mpich-devel
ece75dc
%endif
722a325
%if %{with superludist}
b9c4a64
BuildRequires: superlu_dist-mpich-devel >= 6.3.0
722a325
%endif
ece75dc
%if %{with hypre}
ece75dc
BuildRequires: hypre-mpich-devel
ece75dc
%endif
ece75dc
%if %{with fftw}
ece75dc
BuildRequires: fftw-devel
ece75dc
BuildRequires: fftw-mpich-devel
ece75dc
%endif
412a009
Requires:   mpich%{?_isa} = 0:%{mpichversion}
ece75dc
ece75dc
%description mpich
ece75dc
PETSc, pronounced PET-see (the S is silent), is a suite of data structures
ece75dc
and routines for the scalable (parallel) solution of scientific applications
ece75dc
modeled by partial differential equations.
ece75dc
ece75dc
%package mpich-devel
ece75dc
Summary:    Portable Extensible Toolkit for Scientific Computation (MPICH)
ece75dc
Requires:   %{name}-mpich%{?_isa} = %{version}-%{release}
bbef05e
Requires:   mpich-devel%{?_isa} = 0:%{mpichversion}
bbef05e
Requires:   hdf5-mpich-devel%{?_isa}
ece75dc
%description mpich-devel
ece75dc
Portable Extensible Toolkit for Scientific Computation (developer files).
6da167f
6da167f
%if %{with python}
6da167f
%package -n     python3-%{name}-mpich
6da167f
Summary:        Python3 bindings for MPICH PETSc
6da167f
%{?python_provide:%python_provide python3-%{name}-mpich}
6da167f
6da167f
BuildRequires:  python3-devel
6da167f
BuildRequires:  python3-setuptools
6da167f
BuildRequires:  python3-wheel
6da167f
BuildRequires:  hdf5-mpich-devel
6da167f
BuildRequires:  scalapack-mpich-devel
6da167f
BuildRequires:  ptscotch-mpich-devel
6da167f
BuildRequires:  python3-numpy
56c2842
%if 0%{?rhel}
56c2842
BuildRequires:  python3-pip
56c2842
%else
6da167f
BuildRequires:  python3-Cython
56c2842
%endif
6da167f
Requires:       petsc-mpich%{?_isa}
6da167f
Requires:       hdf5-mpich%{?_isa}
6da167f
Requires:       scalapack-mpich%{?_isa}
6da167f
Requires:       ptscotch-mpich%{?_isa}
6da167f
Requires:       mpich%{?_isa} = 0:%{mpichversion}
6da167f
Requires:       MUMPS-mpich%{?_isa}
6da167f
6da167f
Obsoletes:      %{pymodule_name}-mpich < 0:3.14.0-3
6da167f
Obsoletes:      python3-%{pymodule_name}-mpich < 0:3.14.0-3
6da167f
Provides:       python3-%{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
6da167f
Provides:       python-%{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
6da167f
Provides:       %{pymodule_name}-mpich = 0:%{pymodule_version}-%{release}
6da167f
6da167f
%description -n python3-%{name}-mpich
6da167f
This package provides Python3 bindings for MPICH PETSc,
6da167f
the Portable, Extensible Toolkit for Scientific Computation.
6da167f
%endif
ece75dc
%endif
ece75dc
######
ece75dc
#############################################################################
ece75dc
ece75dc
%prep
9d99770
%setup -qc
c8de033
d293ecb
%if %{with python}
d408b4b
rm -rf %{name}-%{version}/src/binding/petsc4py/src/*.egg-info
ac5eaf3
2eb306a
%if 0%{?fedora}
2eb306a
for i in `find . -name 'setup.py' -o -name 'configure' -o -name '*.py'`; do
2eb306a
%py3_shebang_fix $i
2eb306a
done
2eb306a
%endif
d293ecb
%endif
ece75dc
ece75dc
pushd %{name}-%{version}
2eb306a
%patch -P 7 -p1 -b .backup
d408b4b
popd
3386a9b
d408b4b
# Remove pregenerated Cython C sources
d408b4b
pushd %{name}-%{version}
0ef5b08
rm -vf $(grep -rl '/\* Generated by Cython')
ece75dc
popd
ece75dc
ece75dc
%if %{with arch64}
ece75dc
cp -a %{name}-%{version} build64
ece75dc
pushd build64
2eb306a
%patch -P 1 -p0
680bb22
%if %{with metis64}
2eb306a
%patch -P 4 -p1 -b .metis64
680bb22
%endif
ece75dc
popd
ece75dc
%endif
ece75dc
0db6a03
pushd %{name}-%{version}
2eb306a
%patch -P 0 -p0 -b .backup
2eb306a
%patch -P 6 -p1 -b .backup
0db6a03
popd
0db6a03
ece75dc
%if %{with openmpi}
ece75dc
cp -a %{name}-%{version} buildopenmpi_dir
56c2842
%if 0%{?rhel}
56c2842
cp %{SOURCE1} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc.c
56c2842
cp %{SOURCE2} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc.h
56c2842
cp %{SOURCE3} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc_api.h
56c2842
%endif
ece75dc
%endif
d408b4b
ece75dc
%if %{with mpich}
ece75dc
cp -a %{name}-%{version} buildmpich_dir
56c2842
%if 0%{?rhel}
56c2842
cp %{SOURCE1} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc.c
56c2842
cp %{SOURCE2} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc.h
56c2842
cp %{SOURCE3} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc_api.h
56c2842
%endif
ece75dc
%endif
ece75dc
7d2e1c8
# Do NOT move up this patch
7d2e1c8
pushd %{name}-%{version}
2eb306a
%patch -P 3 -p1 -b .backup
7d2e1c8
popd
7d2e1c8
ece75dc
%build
ece75dc
pushd %{name}-%{version}
9d9cb3d
%configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \
7d2e1c8
 %{petsc_build_options} \
680bb22
 --with-64-bit-indices=0 \
ece75dc
%if %{with blas}
c3687f5
%if 0%{?fedora} || 0%{?rhel} >= 9
6a0cc22
 --with-blaslapack=1 --with-blaslapack-lib=-l%{blaslib}%{blasvar} --with-blaslapack-include=%{_includedir}/%{blaslib} \
6a0cc22
%else
6a0cc22
 --with-openblas=1 --with-openblas-lib=-l%{blaslib}%{blasvar} --with-openblas-include=%{_includedir}/%{blaslib} \
6a0cc22
%endif
ece75dc
%endif
680bb22
%if %{with metis}
6a0cc22
 --with-metis=1 \
680bb22
%endif
bf2bc91
%if %{with tetgen}
bf2bc91
 --with-tetgen=1 \
bf2bc91
 --with-tetgen-lib=-ltetgen \
bf2bc91
%endif
6a0cc22
%if %{with superlu}
6a0cc22
 --with-superlu=1 \
6a0cc22
 --with-superlu-include=%{_includedir}/SuperLU \
6a0cc22
 --with-superlu-lib=-lsuperlu \
ece75dc
%endif
7d2e1c8
%if %{with suitesparse}
ece75dc
 --with-suitesparse=1 \
ece75dc
 --with-suitesparse-include=%{_includedir}/suitesparse \
7d2e1c8
 --with-suitesparse-lib="-lumfpack -lklu -lcholmod -lamd"
03de112
%endif
6c55a29
#cat config.log && exit 1
9d9cb3d
##
ece75dc
ece75dc
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ece75dc
make \
ece75dc
 V=1 MAKE_NP=$RPM_BUILD_NCPUS PETSC_DIR=%{_builddir}/%{name}-%{version}/%{name}-%{version} PETSC_ARCH=%{_arch} all
ece75dc
popd
ece75dc
ece75dc
%if %{with arch64}
ece75dc
pushd build64
9d9cb3d
%configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \
7d2e1c8
 %{petsc_build_options} \
ece75dc
 --with-64-bit-indices=1 \
680bb22
%if %{with metis64}
6a0cc22
 --with-metis=1 \
680bb22
%endif
ece75dc
%if %{with blas64}
c3687f5
%if 0%{?fedora} || 0%{?rhel} >= 9
6a0cc22
 --with-blaslapack=1 --with-blaslapack-lib=-l%{blaslib}%{blasvar}64 --with-blaslapack-include=%{_includedir}/%{blaslib} \
6a0cc22
%else
6a0cc22
 --with-openblas=1 --with-openblas-lib=-l%{blaslib}%{blasvar}64 --with-openblas-include=%{_includedir}/%{blaslib} \
6a0cc22
%endif
ece75dc
%endif
7d2e1c8
%if %{with suitesparse64}
7d2e1c8
 --with-suitesparse=1 \
7d2e1c8
 --with-suitesparse-include=%{_includedir}/suitesparse \
7d2e1c8
 --with-suitesparse-lib="-lumfpack64 -lklu64 -lcholmod64 -lamd64"
7d2e1c8
%endif
7d2e1c8
##
ece75dc
ece75dc
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ece75dc
make \
ece75dc
 V=1 MAKE_NP=$RPM_BUILD_NCPUS PETSC_DIR=%{_builddir}/%{name}-%{version}/build64 PETSC_ARCH=%{_arch} all
ece75dc
popd
ece75dc
%endif
ece75dc
ece75dc
%if %{with openmpi}
d408b4b
cd buildopenmpi_dir
9d9cb3d
ece75dc
%{_openmpi_load}
b9c4a64
export CC=mpicc
b9c4a64
export CXX=mpic++
b9c4a64
export FC=mpifort
b9c4a64
%configure --with-cc=mpicc --with-cxx=mpic++ --with-fc=mpifort \
7d2e1c8
 --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lmpi_mpifh" \
eada8e5
 --LIBS=" -lmpi -lmpi_mpifh" \
7d2e1c8
 %{petsc_mpibuild_options} \
680bb22
%if %{with metis}
6a0cc22
 --with-metis=1 \
33d889a
%endif
e01023b
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
680bb22
 --with-64-bit-indices=0 \
e01023b
%endif
ece75dc
%if %{with blas}
c3687f5
%if 0%{?fedora} || 0%{?rhel} >= 9
6a0cc22
 --with-blaslapack=1 --with-blaslapack-lib=-l%{blaslib}%{blasvar} --with-blaslapack-include=%{_includedir}/%{blaslib} \
6a0cc22
%else
6a0cc22
 --with-openblas=1 --with-openblas-lib=-l%{blaslib}%{blasvar} --with-openblas-include=%{_includedir}/%{blaslib} \
6a0cc22
%endif
ece75dc
%endif
2c137ab
#cat config.log
2c137ab
#exit 1
ece75dc
ece75dc
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ece75dc
make \
ece75dc
 V=1 MAKE_NP=$RPM_BUILD_NCPUS PETSC_DIR=%{_builddir}/%{name}-%{version}/buildopenmpi_dir PETSC_ARCH=%{_arch} all
d293ecb
 
ff23c78
%if %{with python}
d408b4b
pushd src/binding/petsc4py
ff23c78
export PETSC_ARCH=%{_arch}
d408b4b
export PETSC_DIR=../../../
ff23c78
%py3_build
ff23c78
unset PETSC_ARCH
ff23c78
unset PETSC_DIR
d408b4b
popd
ff23c78
%endif
ff23c78
ece75dc
%{_openmpi_unload}
d408b4b
cd ..
ece75dc
%endif
ece75dc
ece75dc
%if %{with mpich}
d408b4b
cd buildmpich_dir
5ed657e
ece75dc
%{_mpich_load}
b9c4a64
export CC=mpicc
b9c4a64
export CXX=mpic++
b9c4a64
export FC=mpifort
b9c4a64
%configure --with-cc=mpicc --with-cxx=mpic++ --with-fc=mpifort \
eada8e5
 --FC_LINKER_FLAGS="$LDFLAGS -lgfortran -lfmpich -lmpichf90" \
eada8e5
 --LIBS=" -lmpich -lfmpich -lmpichf90" \
7d2e1c8
 %{petsc_mpibuild_options} \
680bb22
%if %{with metis}
6a0cc22
 --with-metis=1 \
33d889a
%endif
e01023b
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
680bb22
 --with-64-bit-indices=0 \
e01023b
%endif
ece75dc
%if %{with blas}
c3687f5
%if 0%{?fedora} || 0%{?rhel} >= 9
6a0cc22
 --with-blaslapack=1 --with-blaslapack-lib=-l%{blaslib}%{blasvar} --with-blaslapack-include=%{_includedir}/%{blaslib} \
6a0cc22
%else
6a0cc22
 --with-openblas=1 --with-openblas-lib=-l%{blaslib}%{blasvar} --with-openblas-include=%{_includedir}/%{blaslib} \
6a0cc22
%endif
ece75dc
%endif
2c137ab
#cat config.log
2c137ab
#exit 1
ece75dc
ece75dc
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ece75dc
make \
ece75dc
 V=1 MAKE_NP=$RPM_BUILD_NCPUS PETSC_DIR=%{_builddir}/%{name}-%{version}/buildmpich_dir PETSC_ARCH=%{_arch} all
d293ecb
ff23c78
%if %{with python}
d408b4b
pushd src/binding/petsc4py
ff23c78
export PETSC_ARCH=%{_arch}
d408b4b
export PETSC_DIR=../../../
ff23c78
%py3_build
ff23c78
unset PETSC_ARCH
ff23c78
unset PETSC_DIR
d408b4b
popd
ff23c78
%endif
d293ecb
ece75dc
%{_mpich_unload}
d408b4b
cd ..
ece75dc
%endif
ece75dc
ece75dc
%install
ece75dc
pushd %{name}-%{version}
ff23c78
mkdir -p %{buildroot}%{_libdir} %{buildroot}%{_includedir}/%{name}
ff23c78
mkdir -p %{buildroot}%{_fmoddir}/%{name}
ff23c78
mkdir -p %{buildroot}%{_libdir}/%{name}/conf
ff23c78
ff23c78
install -pm 755 %{_arch}/lib/libpetsc.* %{buildroot}%{_libdir}
ff23c78
ln -sf libpetsc.so.%{version} %{buildroot}%{_libdir}/libpetsc.so
ff23c78
ln -sf libpetsc.so.%{version} %{buildroot}%{_libdir}/libpetsc.so.%{releasever}
5cba6bd
ln -sf libpetsc.so.%{version} %{buildroot}%{_libdir}/libpetsc.so.%{majorver}
ff23c78
ff23c78
install -pm 644 %{_arch}/include/*.h %{buildroot}%{_includedir}/%{name}/
ff23c78
install -pm 644 %{_arch}/include/*.mod %{buildroot}%{_fmoddir}/%{name}/
ff23c78
cp -a include/* %{buildroot}%{_includedir}/%{name}/
ff23c78
ff23c78
cp -a %{_arch}/lib/pkgconfig %{buildroot}%{_libdir}/
bbef05e
sed -e 's|${prefix}/lib|${prefix}/%{_lib}|g' -i %{buildroot}%{_libdir}/pkgconfig/PETSc.pc
0720cfd
ln -fs %{_libdir}/pkgconfig/PETSc.pc %{buildroot}%{_libdir}/pkgconfig/petsc.pc
ff23c78
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscrules %{buildroot}%{_libdir}/%{name}/conf/
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscvariables %{buildroot}%{_libdir}/%{name}/conf/
ff23c78
install -pm 644 lib/petsc/conf/rules %{buildroot}%{_libdir}/%{name}/conf/
ff23c78
install -pm 644 lib/petsc/conf/variables %{buildroot}%{_libdir}/%{name}/conf/
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/%{name}-%{version}|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscvariables
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/%{name}-%{version}/%{_arch}/|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscvariables
ff23c78
sed -e 's|-L%{_prefix}/%{_arch}/lib|-L%{_libdir}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscvariables
ff23c78
sed -e 's|-I%{_prefix}/%{_arch}/include|-I%{_includedir}/%{name} -I%{_fmoddir}/%{name}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscvariables
4a1a74e
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}|g' -i %{buildroot}%{_libdir}/%{name}/conf/variables
4a1a74e
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}|g' -i %{buildroot}%{_libdir}/%{name}/conf/rules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscrules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscvariables
ece75dc
popd
ece75dc
ece75dc
%if %{with arch64}
ece75dc
pushd build64
ff23c78
mkdir -p %{buildroot}%{_libdir} %{buildroot}%{_includedir}/%{name}64
ff23c78
mkdir -p %{buildroot}%{_fmoddir}/%{name}64
ff23c78
mkdir -p %{buildroot}%{_libdir}/%{name}64/conf
ff23c78
mkdir -p %{buildroot}%{_libdir}/pkgconfig
ff23c78
ff23c78
install -pm 755 %{_arch}/lib/libpetsc64.* %{buildroot}%{_libdir}
ff23c78
ln -sf libpetsc64.so.%{version} %{buildroot}%{_libdir}/libpetsc64.so
ff23c78
ln -sf libpetsc64.so.%{version} %{buildroot}%{_libdir}/libpetsc64.so.%{releasever}
5cba6bd
ln -sf libpetsc64.so.%{version} %{buildroot}%{_libdir}/libpetsc64.so.%{majorver}
ff23c78
ff23c78
install -pm 644 %{_arch}/include/*.h %{buildroot}%{_includedir}/%{name}64/
ff23c78
install -pm 644 %{_arch}/include/*.mod %{buildroot}%{_fmoddir}/%{name}64/
ff23c78
cp -a include/* %{buildroot}%{_includedir}/%{name}64/
ff23c78
ff23c78
cp -p %{_arch}/lib/pkgconfig/PETSc.pc %{buildroot}%{_libdir}/pkgconfig/PETSc64.pc
ff23c78
cp -p %{_arch}/lib/pkgconfig/PETSc.pc %{buildroot}%{_libdir}/pkgconfig/petsc64.pc
bbef05e
sed -e 's|${prefix}/lib|${prefix}/%{_lib}|g' -i %{buildroot}%{_libdir}/pkgconfig/PETSc64.pc
bbef05e
sed -e 's|${prefix}/lib|${prefix}/%{_lib}|g' -i %{buildroot}%{_libdir}/pkgconfig/petsc64.pc
ff23c78
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscrules %{buildroot}%{_libdir}/%{name}64/conf/
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscvariables %{buildroot}%{_libdir}/%{name}64/conf/
ff23c78
install -pm 644 lib/petsc/conf/rules %{buildroot}%{_libdir}/%{name}64/conf/
ff23c78
install -pm 644 lib/petsc/conf/variables %{buildroot}%{_libdir}/%{name}64/conf/
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/build64|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}64/conf/petscvariables
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/build64/%{_arch}/|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}64/conf/petscvariables
ff23c78
sed -e 's|-L%{_prefix}/%{_arch}/lib|-L%{_libdir}|g' -i %{buildroot}%{_libdir}/%{name}64/conf/petscvariables
ff23c78
sed -e 's|-I%{_prefix}/%{_arch}/include/|-I%{_includedir}/%{name}64 -I%{_fmoddir}/%{name}64|g' -i %{buildroot}%{_libdir}/%{name}64/conf/petscvariables
4a1a74e
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}|g' -i %{buildroot}%{_libdir}/%{name}64/conf/variables
4a1a74e
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}|g' -i %{buildroot}%{_libdir}/%{name}64/conf/rules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscrules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}%{_libdir}/%{name}/conf/petscvariables
ece75dc
popd
ece75dc
%endif
ece75dc
ece75dc
%if %{with openmpi}
ece75dc
pushd buildopenmpi_dir
722a325
%{_openmpi_load}
ff23c78
mkdir -p %{buildroot}$MPI_LIB %{buildroot}$MPI_INCLUDE/%{name}
ff23c78
mkdir -p %{buildroot}$MPI_FORTRAN_MOD_DIR/%{name}
ff23c78
mkdir -p %{buildroot}$MPI_LIB/%{name}/conf
ff23c78
ff23c78
install -pm 755 %{_arch}/lib/libpetsc.* %{buildroot}$MPI_LIB
ff23c78
ln -sf libpetsc.so.%{version} %{buildroot}$MPI_LIB/libpetsc.so
ff23c78
ln -sf libpetsc.so.%{version} %{buildroot}$MPI_LIB/libpetsc.so.%{releasever}
5cba6bd
ln -sf libpetsc.so.%{version} %{buildroot}$MPI_LIB/libpetsc.so.%{majorver}
ff23c78
ff23c78
install -pm 644 %{_arch}/include/*.h %{buildroot}$MPI_INCLUDE/%{name}/
ff23c78
install -pm 644 %{_arch}/include/*.mod %{buildroot}$MPI_FORTRAN_MOD_DIR/%{name}/
ff23c78
cp -a include/* %{buildroot}$MPI_INCLUDE/%{name}/
ff23c78
ff23c78
cp -a %{_arch}/lib/pkgconfig %{buildroot}$MPI_LIB/
ff23c78
sed -e 's|-I${includedir}/petsc|-I%{_includedir}/openmpi-%{_arch}/petsc|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
ff23c78
sed -e 's|-L${libdir}|-L%{_libdir}/openmpi/lib|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
ff23c78
sed -e 's|ldflag_rpath=-L|ldflag_rpath=-L%{_libdir}/openmpi/lib|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
bf2bc91
sed -e 's|-lpetsc|-lpetsc -lhdf5|' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
bbef05e
sed -e 's|${prefix}/lib|${prefix}/%{_lib}/openmpi/lib|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
0720cfd
ln -fs $MPI_LIB/pkgconfig/PETSc.pc %{buildroot}$MPI_LIB/pkgconfig/petsc.pc
ff23c78
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscrules %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscvariables %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
install -pm 644 lib/petsc/conf/rules %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
install -pm 644 lib/petsc/conf/variables %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/buildopenmpi_dir|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/buildopenmpi_dir/%{_arch}/|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
sed -e 's|-L%{_prefix}/%{_arch}/lib|-L%{_libdir}/openmpi/lib|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
sed -e 's|-I%{_prefix}/%{_arch}/include|-I%{_includedir}/openmpi-%{_arch}/%{name} -I%{_fmoddir}/openmpi/%{name}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
0b5a075
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}/openmpi/lib|g' -i %{buildroot}$MPI_LIB/%{name}/conf/variables
0b5a075
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}/openmpi/lib|g' -i %{buildroot}$MPI_LIB/%{name}/conf/rules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscrules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
ff23c78
%if %{with python}
d408b4b
pushd src/binding/petsc4py
ff23c78
export PETSC_ARCH=%{_arch}
d408b4b
export PETSC_DIR=../../../
d408b4b
%py3_install -- --verbose
d408b4b
unset PETSC_ARCH
d408b4b
unset PETSC_DIR
d408b4b
popd
ff23c78
ff23c78
# Install petsc4py files into MPI directories
ff23c78
%if 0%{?rhel}
ff23c78
MPI_PYTHON3_SITEARCH=%{python3_sitearch}/openmpi
ff23c78
%endif
ff23c78
ff23c78
mkdir -p %{buildroot}$MPI_PYTHON3_SITEARCH
ff23c78
cp -a %{buildroot}%{python3_sitearch}/%{pymodule_name} %{buildroot}$MPI_PYTHON3_SITEARCH/
ff23c78
rm -rf %{buildroot}%{python3_sitearch}/%{pymodule_name}
ff23c78
cp -a %{buildroot}%{python3_sitearch}/%{pymodule_name}-%{pymodule_version}-py%{python3_version}.egg-info %{buildroot}$MPI_PYTHON3_SITEARCH/
ff23c78
rm -rf %{buildroot}%{python3_sitearch}/%{pymodule_name}-%{pymodule_version}-py%{python3_version}.egg-info
bf2bc91
bf2bc91
chrpath -r %{_libdir}/openmpi/lib %{buildroot}$MPI_PYTHON3_SITEARCH/%{pymodule_name}/lib/%{_arch}/*.so
ff23c78
%endif
722a325
%{_openmpi_unload}
d408b4b
cd ..
ece75dc
%endif
ece75dc
ece75dc
%if %{with mpich}
d408b4b
cd buildmpich_dir
722a325
%{_mpich_load}
ff23c78
mkdir -p %{buildroot}$MPI_LIB %{buildroot}$MPI_INCLUDE/%{name}
ff23c78
mkdir -p %{buildroot}$MPI_FORTRAN_MOD_DIR/%{name}
ff23c78
mkdir -p %{buildroot}$MPI_LIB/%{name}/conf
ff23c78
ff23c78
install -pm 755 %{_arch}/lib/libpetsc.* %{buildroot}$MPI_LIB
ff23c78
ln -sf libpetsc.so.%{version} %{buildroot}$MPI_LIB/libpetsc.so
ff23c78
ln -sf libpetsc.so.%{version} %{buildroot}$MPI_LIB/libpetsc.so.%{releasever}
5cba6bd
ln -sf libpetsc.so.%{version} %{buildroot}$MPI_LIB/libpetsc.so.%{majorver}
ff23c78
ff23c78
install -pm 644 %{_arch}/include/*.h %{buildroot}$MPI_INCLUDE/%{name}/
ff23c78
install -pm 644 %{_arch}/include/*.mod %{buildroot}$MPI_FORTRAN_MOD_DIR/%{name}/
ff23c78
cp -a include/* %{buildroot}$MPI_INCLUDE/%{name}/
ff23c78
ff23c78
cp -a %{_arch}/lib/pkgconfig %{buildroot}$MPI_LIB/
ff23c78
sed -e 's|-I${includedir}/petsc|-I%{_includedir}/mpich-%{_arch}/petsc|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
ff23c78
sed -e 's|-L${libdir}|-L%{_libdir}/mpich/lib|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
ff23c78
sed -e 's|ldflag_rpath=-L|ldflag_rpath=-L%{_libdir}/mpich/lib|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
bf2bc91
sed -e 's|-lpetsc|-lpetsc -lhdf5|' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
bbef05e
sed -e 's|${prefix}/lib|${prefix}/%{_lib}/mpich/lib|g' -i %{buildroot}$MPI_LIB/pkgconfig/PETSc.pc
0720cfd
ln -fs $MPI_LIB/pkgconfig/PETSc.pc %{buildroot}$MPI_LIB/pkgconfig/petsc.pc
7d2e1c8
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscrules %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
install -pm 644 %{_arch}/lib/petsc/conf/petscvariables %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
install -pm 644 lib/petsc/conf/rules %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
install -pm 644 lib/petsc/conf/variables %{buildroot}$MPI_LIB/%{name}/conf/
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/buildmpich_dir|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
sed -e 's|%{_builddir}/%{name}-%{version}/buildmpich_dir/%{_arch}/|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
sed -e 's|-L%{_prefix}/%{_arch}/lib|-L%{_libdir}/mpich/lib|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
sed -e 's|-I%{_prefix}/%{_arch}/include|-I%{_includedir}/mpich-%{_arch}/%{name} -I%{_fmoddir}/mpich/%{name}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
0b5a075
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}/mpich/lib|g' -i %{buildroot}$MPI_LIB/%{name}/conf/variables
0b5a075
sed -e 's|${PETSC_DIR}/${PETSC_ARCH}/lib|%{_libdir}/mpich/lib|g' -i %{buildroot}$MPI_LIB/%{name}/conf/rules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscrules
4a1a74e
sed -e 's|${PETSC_DIR}|%{_prefix}|g' -i %{buildroot}$MPI_LIB/%{name}/conf/petscvariables
ff23c78
ff23c78
%if %{with python}
d408b4b
pushd src/binding/petsc4py
ff23c78
export PETSC_ARCH=%{_arch}
d408b4b
export PETSC_DIR=../../../
d408b4b
%py3_install -- --verbose
d408b4b
unset PETSC_ARCH
d408b4b
unset PETSC_DIR
d408b4b
popd
d293ecb
ff23c78
# Install petsc4py files into MPI directories
ff23c78
%if 0%{?rhel}
ff23c78
MPI_PYTHON3_SITEARCH=%{python3_sitearch}/mpich
ff23c78
%endif
ff23c78
ff23c78
mkdir -p %{buildroot}$MPI_PYTHON3_SITEARCH
ff23c78
cp -a %{buildroot}%{python3_sitearch}/%{pymodule_name} %{buildroot}$MPI_PYTHON3_SITEARCH/
ff23c78
rm -rf %{buildroot}%{python3_sitearch}/%{pymodule_name}
ff23c78
cp -a %{buildroot}%{python3_sitearch}/%{pymodule_name}-%{pymodule_version}-py%{python3_version}.egg-info %{buildroot}$MPI_PYTHON3_SITEARCH/
ff23c78
rm -rf %{buildroot}%{python3_sitearch}/%{pymodule_name}-%{pymodule_version}-py%{python3_version}.egg-info
bf2bc91
bf2bc91
chrpath -r %{_libdir}/mpich/lib %{buildroot}$MPI_PYTHON3_SITEARCH/%{pymodule_name}/lib/%{_arch}/*.so
ff23c78
%endif
722a325
%{_mpich_unload}
d408b4b
cd ..
ece75dc
%endif
ece75dc
ece75dc
# Move html documentation in _pkgdocdir
ff23c78
pushd %{buildroot}%{_includedir}
ff23c78
mkdir -p %{buildroot}%{_pkgdocdir}/headers
ece75dc
for i in `find . -name "*.h.html" -type f -print`; do
ff23c78
    mv $i %{buildroot}%{_pkgdocdir}/headers
ece75dc
done
ece75dc
for i in `find . -name "*.html" -type f -print`; do
ff23c78
    mv $i %{buildroot}%{_pkgdocdir}/headers
ece75dc
done
ece75dc
find . -name "Makefile" -type f -print | xargs /bin/rm -f
ece75dc
popd
ff23c78
cp -a %{name}-%{version}/docs/* %{buildroot}%{_pkgdocdir}
ece75dc
#
ece75dc
ece75dc
%check
eada8e5
7d2e1c8
%if %{with openmpi}
7d2e1c8
%{_openmpi_load}
ff23c78
%if %{with check}
bf2bc91
export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB
7d2e1c8
export PETSC_DIR=%{_builddir}/%{name}-%{version}/buildopenmpi_dir
ece75dc
export PETSC_ARCH=%{_arch}
7d2e1c8
export MPI_INTERFACE_HOSTNAME=localhost
eada8e5
export OMPI_MCA_btl_base_warn_component_unused=0
8bd9c29
export wPETSC_DIR=./
1b5941d
export DATAFILESPATH=%{_builddir}/%{name}-%{version}/buildopenmpi_dir/share/petsc/datafiles
e4aecf6
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ece75dc
%if %{with debug}
ece75dc
export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins=yes"
ec327e9
export CFLAGS="-O0 -g -Wl,-z,now -fPIC"
ec327e9
export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC"
eada8e5
export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}"
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C buildopenmpi_dir V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/buildopenmpi_dir/lib/petsc/bin/petscmpiexec -valgrind'
ab30a7b
%else
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C buildopenmpi_dir V=1
7d2e1c8
%endif
ff23c78
%endif
ff23c78
ff23c78
%if %{with python}
ff23c78
%if %{with pycheck}
51bfda7
pushd buildopenmpi_dir/src/binding/petsc4py
ff23c78
export PETSC_ARCH=%{_arch}
51bfda7
export PETSC_DIR=../../../
ff23c78
%if 0%{?rhel}
ff23c78
MPI_PYTHON3_SITEARCH=%{python3_sitearch}/openmpi
ff23c78
%endif
bf2bc91
export PYTHONPATH=%{buildroot}$MPI_PYTHON3_SITEARCH
bf2bc91
export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB
ff23c78
%{__python3} setup.py test
ff23c78
unset PETSC_ARCH
ff23c78
unset PETSC_DIR
ff23c78
popd
ff23c78
%endif
ff23c78
%endif
7d2e1c8
%{_openmpi_unload}
ece75dc
%endif
ece75dc
7d2e1c8
%if %{with mpich}
7d2e1c8
%{_mpich_load}
ff23c78
%if %{with check}
7d2e1c8
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/buildmpich_dir/%{_arch}/lib
7d2e1c8
export PETSC_DIR=%{_builddir}/%{name}-%{version}/buildmpich_dir
ece75dc
export PETSC_ARCH=%{_arch}
7d2e1c8
export MPI_INTERFACE_HOSTNAME=localhost
eada8e5
export OMPI_MCA_btl_base_warn_component_unused=0
8bd9c29
export wPETSC_DIR=./
1b5941d
export DATAFILESPATH=%{_builddir}/%{name}-%{version}/buildmpich_dir/share/petsc/datafiles
e4aecf6
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ece75dc
%if %{with debug}
ece75dc
export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins=yes"
ec327e9
export CFLAGS="-O0 -g -Wl,-z,now -fPIC"
ec327e9
export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC"
eada8e5
export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}"
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C buildmpich_dir V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/buildmpich_dir/lib/petsc/bin/petscmpiexec -valgrind'
ab30a7b
%else
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C buildmpich_dir V=1
7d2e1c8
%endif
ff23c78
%endif
ff23c78
ff23c78
%if %{with python}
ff23c78
%if %{with pycheck}
51bfda7
pushd buildmpich_dir/src/binding/petsc4py
ff23c78
export PETSC_ARCH=%{_arch}
51bfda7
export PETSC_DIR=../../../
ff23c78
%if 0%{?rhel}
ff23c78
MPI_PYTHON3_SITEARCH=%{python3_sitearch}/mpich
ff23c78
%endif
bf2bc91
export PYTHONPATH=%{buildroot}$MPI_PYTHON3_SITEARCH
bf2bc91
export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB
ff23c78
%{__python3} setup.py test
ff23c78
unset PETSC_ARCH
ff23c78
unset PETSC_DIR
ff23c78
popd
ff23c78
%endif
ff23c78
%endif
7d2e1c8
%{_mpich_unload}
ece75dc
%endif
ece75dc
ff23c78
%if %{with check}
7d2e1c8
export LD_LIBRARY_PATH=%{_libdir}:%{_builddir}/%{name}-%{version}/%{name}-%{version}/%{_arch}/lib
7d2e1c8
export PETSC_DIR=%{_builddir}/%{name}-%{version}/%{name}-%{version}
ece75dc
export PETSC_ARCH=%{_arch}
8bd9c29
export wPETSC_DIR=./
1b5941d
export DATAFILESPATH=%{_builddir}/%{name}-%{version}/%{name}-%{version}/share/petsc/datafiles
e4aecf6
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
ab30a7b
%if %{with debug}
ab30a7b
export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins=yes"
ec327e9
export CFLAGS="-O0 -g -Wl,-z,now -fPIC"
ec327e9
export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC"
ec327e9
export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules"
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C %{name}-%{version} V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/%{name}-%{version}/lib/petsc/bin/petscmpiexec -n $RPM_BUILD_NCPUS -valgrind'
ab30a7b
%else
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C %{name}-%{version} V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/%{name}-%{version}/lib/petsc/bin/petscmpiexec -n $RPM_BUILD_NCPUS'
ece75dc
%endif
ece75dc
7d2e1c8
%if %{with arch64}
7d2e1c8
export LD_LIBRARY_PATH=%{_libdir}:%{_builddir}/%{name}-%{version}/build64/%{_arch}/lib
7d2e1c8
export PETSC_DIR=%{_builddir}/%{name}-%{version}/build64
ece75dc
export PETSC_ARCH=%{_arch}
8bd9c29
export wPETSC_DIR=./
1b5941d
export DATAFILESPATH=%{_builddir}/%{name}-%{version}/build64/share/petsc/datafiles
e4aecf6
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
7d2e1c8
## 'make test' needs to link against -lpetsc
7d2e1c8
## Crude fix:
7d2e1c8
ln -s %{_builddir}/%{name}-%{version}/build64/%{_arch}/lib/libpetsc64.so %{_builddir}/%{name}-%{version}/build64/%{_arch}/lib/libpetsc.so
7d2e1c8
ab30a7b
%if %{with debug}
ab30a7b
export PETSCVALGRIND_OPTIONS=" --tool=memcheck --leak-check=yes --track-origins=yes"
ec327e9
export CFLAGS="-O0 -g -Wl,-z,now -fPIC"
ec327e9
export CXXFLAGS="-O0 -g -Wl,-z,now -fPIC"
ec327e9
export FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules"
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C build64 V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/build64/lib/petsc/bin/petscmpiexec -n $RPM_BUILD_NCPUS -valgrind'
ab30a7b
%else
e4aecf6
xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C build64 V=1 MPIEXEC='%{_builddir}/%{name}-%{version}/build64/lib/petsc/bin/petscmpiexec -n $RPM_BUILD_NCPUS'
ece75dc
%endif
ece75dc
%endif
ece75dc
%endif
ece75dc
ece75dc
%files
ece75dc
%license %{name}-%{version}/LICENSE
5cba6bd
%{_libdir}/libpetsc.so.3
5cba6bd
%{_libdir}/libpetsc.so.%{releasever}
5cba6bd
%{_libdir}/libpetsc.so.%{version}
ece75dc
ece75dc
%files devel
862f4dc
%{_libdir}/pkgconfig/PETSc.pc
d890f27
%{_libdir}/pkgconfig/petsc.pc
fe127f0
%{_libdir}/%{name}/
ece75dc
%{_libdir}/libpetsc.so
ece75dc
%{_includedir}/%{name}/
d9c67c4
%{_fmoddir}/%{name}/
ece75dc
ece75dc
%files doc
ece75dc
%license %{name}-%{version}/LICENSE
ece75dc
%{_pkgdocdir}/
ece75dc
ece75dc
%if %{with arch64}
ece75dc
%files -n petsc64
ece75dc
%license build64/LICENSE
5cba6bd
%{_libdir}/libpetsc64.so.3
5cba6bd
%{_libdir}/libpetsc64.so.%{releasever}
5cba6bd
%{_libdir}/libpetsc64.so.%{version}
ece75dc
ece75dc
%files -n petsc64-devel
862f4dc
%{_libdir}/pkgconfig/PETSc64.pc
d890f27
%{_libdir}/pkgconfig/petsc64.pc
fe127f0
%{_libdir}/%{name}64/
ece75dc
%{_libdir}/libpetsc64.so
ece75dc
%{_includedir}/%{name}64/
d9c67c4
%{_fmoddir}/%{name}64/
ece75dc
%endif
ece75dc
ece75dc
%if %{with openmpi}
ece75dc
%files openmpi
ece75dc
%license buildopenmpi_dir/LICENSE
5cba6bd
%{_libdir}/openmpi/lib/libpetsc.so.3
9abc8ad
%{_libdir}/openmpi/lib/libpetsc.so.%{releasever}
5cba6bd
%{_libdir}/openmpi/lib/libpetsc.so.%{version}
ece75dc
ece75dc
%files openmpi-devel
e132ea4
%{_libdir}/openmpi/lib/libpetsc.so
fe127f0
%{_libdir}/openmpi/lib/%{name}/
862f4dc
%{_libdir}/openmpi/lib/pkgconfig/PETSc.pc
d890f27
%{_libdir}/openmpi/lib/pkgconfig/petsc.pc
e132ea4
%{_includedir}/openmpi-%{_arch}/%{name}/
d9c67c4
%{_fmoddir}/openmpi/%{name}/
ff23c78
ff23c78
%if %{with python}
d935acc
%files -n python3-%{name}-openmpi
ff23c78
%{python3_sitearch}/openmpi/%{pymodule_name}/
ff23c78
%{python3_sitearch}/openmpi/%{pymodule_name}-%{pymodule_version}-py%{python3_version}.egg-info
ff23c78
%endif
0fa32b9
%endif
ece75dc
ece75dc
%if %{with mpich}
ece75dc
%files mpich
ece75dc
%license buildmpich_dir/LICENSE
5cba6bd
%{_libdir}/mpich/lib/libpetsc.so.3
00b3630
%{_libdir}/mpich/lib/libpetsc.so.%{releasever}
5cba6bd
%{_libdir}/mpich/lib/libpetsc.so.%{version}
ece75dc
ece75dc
%files mpich-devel
e132ea4
%{_libdir}/mpich/lib/libpetsc.so
fe127f0
%{_libdir}/mpich/lib/%{name}/
862f4dc
%{_libdir}/mpich/lib/pkgconfig/PETSc.pc
d890f27
%{_libdir}/mpich/lib/pkgconfig/petsc.pc
e132ea4
%{_includedir}/mpich-%{_arch}/%{name}/
d9c67c4
%{_fmoddir}/mpich/%{name}/
ff23c78
ff23c78
%if %{with python}
d935acc
%files -n python3-%{name}-mpich
ff23c78
%{python3_sitearch}/mpich/%{pymodule_name}/
ff23c78
%{python3_sitearch}/mpich/%{pymodule_name}-%{pymodule_version}-py%{python3_version}.egg-info
ff23c78
%endif
0fa32b9
%endif
ece75dc
ece75dc
%changelog
68b0545
%autochangelog