Build in EPEL9| Disable KLU support in EPEL9

This commit is contained in:
Antonio Trande 2023-01-04 20:56:27 +01:00
parent 9c24deea51
commit 88587460d0

View File

@ -12,14 +12,6 @@
%global with_mpich 1
%global with_openmpi 1
%if 0%{?rhel} && 0%{?rhel} == 7
%global with_openmpi 1
%global with_mpich 1
# Use devtoolset 6
%global dts devtoolset-6-
%endif
## BLAS ##
%if 0%{?fedora} || 0%{?rhel} >= 9
%global blaslib flexiblas
@ -30,20 +22,11 @@
%endif
###########
## Hypre ##
## Due to rhbz#1744780
%if 0%{?rhel} && 0%{?rhel} > 7
%global with_hypre 1
%global with_openmpicheck 0
%global with_mpichcheck 0
%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
%global with_hypre 1
%ifnarch s390x
%global with_openmpicheck 1
%global with_mpichcheck 1
%endif
%endif
###########
%global with_sercheck 1
@ -67,10 +50,28 @@
%endif
#############
# KLU support
%if 0%{?rhel} && 0%{?rhel} >= 9
%global with_klu 0
%global with_klu64 0
%endif
%if 0%{?fedora}
%ifarch s390x x86_64 %{power64} aarch64
%global with_klu64 1
%endif
%ifarch %{arm} %{ix86}
%global with_klu 1
%endif
%endif
%if 0%{?rhel} && 0%{?rhel} == 8
%global with_klu 1
%endif
##########
Summary: Suite of nonlinear solvers
Name: sundials
Version: 5.8.0
Release: 8%{?dist}
Release: 9%{?dist}
# SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses.
# Check the file 'LICENSE' for details.
License: BSD
@ -90,7 +91,7 @@ BuildRequires: make
BuildRequires: gcc-gfortran
%endif
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: %{?dts}gcc, %{?dts}gcc-c++
BuildRequires: gcc, gcc-c++
%if 0%{?epel}
BuildRequires: epel-rpm-macros
%endif
@ -106,20 +107,15 @@ BuildRequires: SuperLUMT-devel
%endif
# KLU support
%if 0%{?fedora} || 0%{?rhel} >= 9
%ifarch s390x x86_64 %{power64} aarch64
%if 0%{?with_klu64}
BuildRequires: suitesparse64-devel
%endif
%ifarch %{arm} %{ix86}
%if 0%{?with_klu}
BuildRequires: suitesparse-devel
%endif
%endif
##########
%if 0%{?rhel} == 8
BuildRequires: suitesparse-devel
%endif
%if 0%{?rhel}
%if 0%{?rhel} && 0%{?rhel} == 8
BuildRequires: rsh
%endif
%if 0%{?with_fortran}
@ -161,7 +157,6 @@ BuildRequires: hdf5-openmpi-devel
BuildRequires: superlu_dist-openmpi-devel
%endif
Requires: openmpi%{?_isa}
%if 0%{?with_fortran}
Requires: gcc-gfortran%{?_isa}
%endif
@ -198,7 +193,6 @@ BuildRequires: hdf5-mpich-devel
BuildRequires: superlu_dist-mpich-devel
%endif
Requires: mpich%{?_isa}
%if 0%{?with_fortran}
Requires: gcc-gfortran%{?_isa}
%endif
@ -271,10 +265,6 @@ export LIBSUPERLUMTLINK=-lsuperlumt_d
%endif
%endif
%if 0%{?el7}
%{?dts:source /opt/rh/devtoolset-6/enable}
%endif
%if %{with debug}
%undefine _hardened_build
export CFLAGS=" "
@ -291,28 +281,22 @@ export CFLAGS="%{build_cflags}"
export CFLAGS="%{build_fflags}"
%cmake3 -B sundials-%{version}/build -S sundials-%{version} \
%endif
%if 0%{?fedora} || 0%{?rhel} >= 9
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
%if 0%{?with_klu64}
-DSUNDIALS_INDEX_SIZE:STRING=64 \
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu64.so \
-DAMD_LIBRARY=%{_libdir}/libamd64.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf64.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd64.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%else
-DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \
%endif
%if 0%{?with_klu}
-DSUNDIALS_INDEX_SIZE:STRING=32 \
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%endif
%endif
%if 0%{?rhel} == 8
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%endif
-DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \
%endif
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \
@ -330,7 +314,9 @@ export CFLAGS="%{build_fflags}"
%if 0%{?with_fortran}
-DF77_INTERFACE_ENABLE:BOOL=ON \
-DEXAMPLES_ENABLE_F77:BOOL=ON \
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
-DF2003_INTERFACE_ENABLE:BOOL=ON \
%endif
-DEXAMPLES_ENABLE_F90:BOOL=ON \
-DFortran_INSTALL_MODDIR:PATH=%{_fmoddir}/%{name} \
%endif
@ -391,10 +377,6 @@ export FC=$MPI_BIN/mpif77
%endif
##
%if 0%{?el7}
%{?dts:source /opt/rh/devtoolset-6/enable}
%endif
%if %{with debug}
%undefine _hardened_build
export CFLAGS=" "
@ -411,28 +393,26 @@ export CFLAGS="%{build_cflags}"
export CFLAGS="%{build_fflags}"
%cmake3 -B buildopenmpi_dir/build -S buildopenmpi_dir \
%endif
%if 0%{?fedora} || 0%{?rhel} >= 9
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
-DSUNDIALS_INDEX_SIZE:STRING=64 \
%if 0%{?with_klu64}
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu64.so \
-DAMD_LIBRARY=%{_libdir}/libamd64.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf64.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd64.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%else
-DSUNDIALS_INDEX_SIZE:STRING=32 \
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%endif
%endif
%if 0%{?rhel} == 8
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%endif
-DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \
%endif
%endif
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 32
-DSUNDIALS_INDEX_SIZE:STRING=32 \
%if 0%{?with_klu}
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \
%endif
%endif
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \
@ -461,7 +441,9 @@ export CFLAGS="%{build_fflags}"
%endif
-DF77_INTERFACE_ENABLE:BOOL=ON \
-DEXAMPLES_ENABLE_F77:BOOL=ON \
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
-DF2003_INTERFACE_ENABLE:BOOL=ON \
%endif
-DEXAMPLES_ENABLE_F90:BOOL=ON \
-DFortran_INSTALL_MODDIR:PATH=$MPI_FORTRAN_MOD_DIR/%{name} \
%endif
@ -532,10 +514,6 @@ export FC=$MPI_BIN/mpif77
%endif
##
%if 0%{?el7}
%{?dts:source /opt/rh/devtoolset-6/enable}
%endif
%if %{with debug}
%undefine _hardened_build
export CFLAGS=" "
@ -552,28 +530,26 @@ export CFLAGS="%{build_cflags}"
export CFLAGS="%{build_fflags}"
%cmake3 -B buildmpich_dir/build -S buildmpich_dir \
%endif
%if 0%{?fedora} || 0%{?rhel} >= 9
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
-DSUNDIALS_INDEX_SIZE:STRING=64 \
%if 0%{?with_klu64}
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu64.so \
-DAMD_LIBRARY=%{_libdir}/libamd64.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf64.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd64.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%else
-DSUNDIALS_INDEX_SIZE:STRING=32 \
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%endif
%endif
%if 0%{?rhel} == 8
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
%endif
-DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \
%endif
%endif
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 32
-DSUNDIALS_INDEX_SIZE:STRING=32 \
%if 0%{?with_klu}
-DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_LIBRARY=%{_libdir}/libklu.so \
-DAMD_LIBRARY=%{_libdir}/libamd.so -DAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DBTF_LIBRARY=%{_libdir}/libbtf.so -DBTF_LIBRARY_DIR:PATH=%{_libdir} \
-DCOLAMD_LIBRARY=%{_libdir}/libcolamd.so -DCOLAMD_LIBRARY_DIR:PATH=%{_libdir} \
-DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \
%endif
%endif
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \
@ -602,7 +578,9 @@ export CFLAGS="%{build_fflags}"
%endif
-DF77_INTERFACE_ENABLE:BOOL=ON \
-DEXAMPLES_ENABLE_F77:BOOL=ON \
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
-DF2003_INTERFACE_ENABLE:BOOL=ON \
%endif
-DEXAMPLES_ENABLE_F90:BOOL=ON \
-DFortran_INSTALL_MODDIR:PATH=$MPI_FORTRAN_MOD_DIR/%{name} \
%endif
@ -864,7 +842,7 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir}
%{_includedir}/openmpi-%{_arch}/sunmatrix/
%{_includedir}/openmpi-%{_arch}/sunnonlinsol/
%if 0%{?with_fortran}
%{_fmoddir}/openmpi%{?el7:-%_arch}/%{name}/
%{_fmoddir}/openmpi/%{name}/
%{_libdir}/openmpi/lib/libsundials_f*[_mod].so
%{_libdir}/openmpi/lib/libsundials_f*[!_mod].so
%endif
@ -949,7 +927,7 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir}
%{_includedir}/mpich-%{_arch}/sunmatrix/
%{_includedir}/mpich-%{_arch}/sunnonlinsol/
%if 0%{?with_fortran}
%{_fmoddir}/mpich%{?el7:-%_arch}/%{name}/
%{_fmoddir}/mpich/%{name}/
%{_libdir}/mpich/lib/libsundials_f*[_mod].so
%{_libdir}/mpich/lib/libsundials_f*[!_mod].so
%endif
@ -991,6 +969,10 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir}
%doc sundials-%{version}/doc/arkode/*
%changelog
* Wed Jan 04 2023 Antonio Trande <sagitter@fedoraproject.org> - 5.8.0-9
- Build in EPEL9
- Disable KLU support in EPEL9
* Sun Nov 13 2022 Antonio Trande <sagitter@fedoraproject.org> - 5.8.0-8
- Enable OpenMPI tests