## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: bout++ Version: 5.2.0.dev574+ge3f21cd2f Release: %autorelease Summary: Library for the BOUndary Turbulence simulation framework # BOUT++ itself is LGPL, but we are linking with GPLed code, so the distributed library is GPL License: GPLv3+ URL: https://boutproject.github.io/ Source0: https://github.com/boutproject/BOUT-dev/releases/download/v%{version}/BOUT++-v%{version}.tar.xz Patch: wait-finalise.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} %if 0%{?fedora} >= 33 %bcond_without flexiblas %else %bcond_with flexiblas %endif # Disable tests and manual on epel < 8 %if 0%{?rhel} && 0%{?rhel} < 8 %bcond_with manual %bcond_with test %bcond_with sundials %bcond_with petsc %else %bcond_without manual %bcond_without test %bcond_without sundials %bcond_without petsc %endif # Enable both mpi every where %bcond_without mpich %bcond_without openmpi %if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} > 7 ) # Use system mpark %bcond_without system_mpark %else %bcond_with system_mpark %endif # # DEPENDENCIES # BuildRequires: m4 BuildRequires: zlib-devel BuildRequires: cmake BuildRequires: gettext-devel BuildRequires: environment-modules BuildRequires: netcdf-devel BuildRequires: netcdf-cxx%{?fedora:4}-devel BuildRequires: hdf5-devel BuildRequires: fftw-devel BuildRequires: make BuildRequires: fmt-devel BuildRequires: chrpath BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-numpy BuildRequires: python%{python3_pkgversion}-cython BuildRequires: python%{python3_pkgversion}-netcdf4 BuildRequires: python%{python3_pkgversion}-scipy BuildRequires: python%{python3_pkgversion}-boututils BuildRequires: python%{python3_pkgversion}-boutdata BuildRequires: python%{python3_pkgversion}-zoidberg BuildRequires: python%{python3_pkgversion}-tables %if %{with flexiblas} BuildRequires: flexiblas-devel %else BuildRequires: blas-devel BuildRequires: lapack-devel %endif BuildRequires: gcc-c++ BuildRequires: gdb BuildRequires: sundials-debugsource BuildRequires: sundials-debuginfo BuildRequires: sundials-mpich-debuginfo BuildRequires: sundials-openmpi-debuginfo %if %{with system_mpark} BuildRequires: mpark-variant-devel %endif # cxx generation BuildRequires: python%{python3_pkgversion}-jinja2 # Documentation %if %{with manual} BuildRequires: doxygen BuildRequires: python3-sphinx %endif %if %{with petsc} && %{with mpich} BuildRequires: petsc-mpich-devel BuildRequires: hdf5-mpich-devel %endif %if %{with petsc} && %{with openmpi} BuildRequires: petsc-openmpi-devel BuildRequires: hdf5-openmpi-devel %endif %if %{with sundials} && %{with mpich} BuildRequires: sundials-mpich-devel # https://bugzilla.redhat.com/show_bug.cgi?id=1839131 BuildRequires: sundials-devel %endif %if %{with sundials} && %{with openmpi} BuildRequires: sundials-openmpi-devel # https://bugzilla.redhat.com/show_bug.cgi?id=1839131 BuildRequires: sundials-devel %endif # # DESCRIPTIONS # %if %{with mpich} BuildRequires: mpich-devel %global mpi_list mpich %endif %if %{with openmpi} BuildRequires: openmpi-devel %global mpi_list openmpi %{?mpi_list} %endif %description BOUT++ is a framework for writing fluid and plasma simulations in curvilinear geometry. It is intended to be quite modular, with a variety of numerical methods and time-integration solvers available. BOUT++ is primarily designed and tested with reduced plasma fluid models in mind, but it can evolve any number of equations, with equations appearing in a readable form. %if %{with mpich} %package mpich Summary: BOUT++ mpich libraries Requires: %{name}-common = %{version}-%{release} # Use bundled version, to reproduce upstream results Provides: bundled(libpvode) Recommends: environment-modules Recommends: python%{python3_pkgversion}-boututils Recommends: python%{python3_pkgversion}-boutdata Recommends: python%{python3_pkgversion}-xbout %package mpich-devel Summary: BOUT++ mpich libraries Requires: %{name}-mpich = %{version}-%{release} Recommends: gcc-c++ Recommends: make Recommends: mpich-devel Recommends: zlib-devel Recommends: gettext-devel Recommends: netcdf-devel Recommends: netcdf-cxx%{?fedora:4}-devel Recommends: hdf5-devel Recommends: fftw-devel %if %{with flexiblas} Recommends: flexiblas-devel %else Recommends: blas-devel Recommends: lapack-devel %endif %if %{with system_mpark} Recommends: mpark-variant-devel %endif %if %{with petsc} Recommends: petsc-mpich-devel Recommends: hdf5-mpich-devel %endif %if %{with sundials} Recommends: sundials-mpich-devel # https://bugzilla.redhat.com/show_bug.cgi?id=1839131 Recommends: sundials-devel %endif %description mpich-devel BOUT++ is a framework for writing fluid and plasma simulations in curvilinear geometry. It is intended to be quite modular, with a variety of numerical methods and time-integration solvers available. BOUT++ is primarily designed and tested with reduced plasma fluid models in mind, but it can evolve any number of equations, with equations appearing in a readable form. This BOUT++ library is build for mpich. %description mpich BOUT++ is a framework for writing fluid and plasma simulations in curvilinear geometry. It is intended to be quite modular, with a variety of numerical methods and time-integration solvers available. BOUT++ is primarily designed and tested with reduced plasma fluid models in mind, but it can evolve any number of equations, with equations appearing in a readable form. This BOUT++ library is build for mpich. %package -n python%{python3_pkgversion}-%{name}-mpich Summary: BOUT++ mpich library for python%{python3_pkgversion} Requires: %{name}-mpich Requires: python%{python3_pkgversion}-%{name} BuildRequires: python%{python3_pkgversion}-devel Requires: mpich Requires: python%{python3_pkgversion}-mpich Requires: python%{python3_pkgversion}-numpy Requires: python%{python3_pkgversion}-boututils Requires: python%{python3_pkgversion}-boutdata Recommends: python%{python3_pkgversion}-xbout %py_provides python%{python3_pkgversion}-%{name}-mpich %description -n python%{python3_pkgversion}-%{name}-mpich This is the BOUT++ library python%{python3_pkgversion} with mpich. %endif %if %{with openmpi} %package openmpi Summary: BOUT++ openmpi libraries # Use bundled version, to reproduce upstream results Provides: bundled(libpvode) Requires: %{name}-common = %{version}-%{release} Recommends: environment-modules Recommends: python%{python3_pkgversion}-boututils Recommends: python%{python3_pkgversion}-boutdata Recommends: python%{python3_pkgversion}-xbout %package openmpi-devel Summary: BOUT++ openmpi libraries Requires: %{name}-openmpi = %{version}-%{release} Recommends: gcc-c++ Recommends: make Recommends: openmpi-devel Recommends: zlib-devel Recommends: gettext-devel Recommends: netcdf-devel Recommends: netcdf-cxx%{?fedora:4}-devel Recommends: hdf5-devel Recommends: fftw-devel %if %{with flexiblas} Recommends: flexiblas-devel %else Recommends: blas-devel Recommends: lapack-devel %endif %if %{with system_mpark} Recommends: mpark-variant-devel %endif %if %{with petsc} Recommends: petsc-openmpi-devel Recommends: hdf5-openmpi-devel %endif %if %{with sundials} Recommends: sundials-openmpi-devel # https://bugzilla.redhat.com/show_bug.cgi?id=1839131 Recommends: sundials-devel %endif %description openmpi-devel BOUT++ is a framework for writing fluid and plasma simulations in curvilinear geometry. It is intended to be quite modular, with a variety of numerical methods and time-integration solvers available. BOUT++ is primarily designed and tested with reduced plasma fluid models in mind, but it can evolve any number of equations, with equations appearing in a readable form. This BOUT++ library is build for openmpi and provides the required header files. %description openmpi BOUT++ is a framework for writing fluid and plasma simulations in curvilinear geometry. It is intended to be quite modular, with a variety of numerical methods and time-integration solvers available. BOUT++ is primarily designed and tested with reduced plasma fluid models in mind, but it can evolve any number of equations, with equations appearing in a readable form. This BOUT++ library is build for openmpi. %package -n python%{python3_pkgversion}-%{name}-openmpi Summary: BOUT++ openmpi library for python%{python3_pkgversion} Requires: %{name}-openmpi Requires: python%{python3_pkgversion}-%{name} BuildRequires: python%{python3_pkgversion}-devel Requires: openmpi Requires: python%{python3_pkgversion}-openmpi Requires: python%{python3_pkgversion}-numpy Requires: python%{python3_pkgversion}-boututils Requires: python%{python3_pkgversion}-boutdata Recommends: python%{python3_pkgversion}-xbout %py_provides python%{python3_pkgversion}-%{name}-openmpi %description -n python%{python3_pkgversion}-%{name}-openmpi This is the BOUT++ library python%{python3_pkgversion} with openmpi. %endif %package common Summary: Common files for BOUT++ %description common MPI-independent files for BOUT++, namely localisation files. %package -n python%{python3_pkgversion}-%{name} Summary: BOUT++ python library Requires: netcdf4-python%{python3_pkgversion} Requires: python%{python3_pkgversion}-numpy Recommends: python%{python3_pkgversion}-scipy Recommends: python%{python3_pkgversion}-matplotlib Recommends: python%{python3_pkgversion}-boututils Recommends: python%{python3_pkgversion}-boutdata BuildArch: noarch %py_provides python%{python3_pkgversion}-%{name} %description -n python%{python3_pkgversion}-%{name} Python%{python3_pkgversion} library for pre and post processing of BOUT++ data %if %{with manual} %package -n %{name}-doc Summary: BOUT++ Documentation BuildArch: noarch %description -n %{name}-doc BOUT++ is a framework for writing fluid and plasma simulations in curvilinear geometry. It is intended to be quite modular, with a variety of numerical methods and time-integration solvers available. BOUT++ is primarily designed and tested with reduced plasma fluid models in mind, but it can evolve any number of equations, with equations appearing in a readable form. This package contains the documentation. %endif # # PREP # %prep %autosetup -n BOUT++-v%{version} -p 1 # Switch to standard theme # sphinx_book_theme is not packaged sed -e 's/html_theme = "sphinx_book_theme"/html_theme = "sphinxdoc"/' -i manual/sphinx/conf.py %if %{with system_mpark} # use mpark provided by fedora rm -rf externalpackages/mpark.variant/ mkdir -p externalpackages/mpark.variant/include/ %endif rm -rf tools/pylib/boutdata rm -rf tools/pylib/boututils # Remove shebang for f in $(find -L tools/pylib/ -type f | grep -v _boutcore_build ) do sed -i '/^#!\//d' $f done # # BUILD # %build # MPI builds export CC=mpicc export CXX=mpicxx for mpi in %{mpi_list} do mkdir build_$mpi done for mpi in %{mpi_list} do %global _vpath_builddir build_$mpi if [ $mpi = mpich ] ; then %_mpich_load elif [ $mpi = openmpi ] ; then %_openmpi_load else echo "unknown mpi" &> /dev/stderr exit 1 fi %cmake \ -DBOUT_USE_FFTW=ON \ -DBOUT_USE_NETCDF=ON \ -DBOUT_USE_SCOREP=OFF \ -DBOUT_USE_SYSTEM_MPARK_VARIANT=ON \ -DBOUT_USE_LAPACK=ON \ -DBOUT_USE_NLS=ON \ -DBOUT_USE_SYSTEM_FMT=ON \ -DBOUT_USE_UUID_SYSTEM_GENERATOR=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=%{_libdir}/$mpi/lib \ -DCMAKE_INSTALL_BINDIR=%{_libdir}/$mpi/bin \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/$mpi-%{_arch}/bout++/ \ -DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \ -DCMAKE_INSTALL_PYTHON_SITEARCH=${MPI_PYTHON3_SITEARCH} \ -DBOUT_TEST_TIMEOUT=900 \ %if %{with manual} -DBOUT_BUILD_DOCS=ON \ %endif %if %{with petsc} -DBOUT_USE_PETSC=ON \ %endif %if %{with sundials} -DBOUT_USE_SUNDIALS=ON \ %endif %cmake_build %if %{with manual} %global _vpath_builddir build_$mpi/manual # Store original values PYPA=${PYTHONPATH} LDPA=${LD_LIBRARY_PATH} # Add our stuff export PYTHONPATH=${PYTHONPATH}:$(pwd)/build_$mpi/tools/pylib/ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/build_$mpi/lib/ %cmake_build # Restore export LD_LIBRARY_PATH=$LDPA export PYTHONPATH=$PYPA %endif if [ $mpi = mpich ] ; then %_mpich_unload elif [ $mpi = openmpi ] ; then %_openmpi_unload fi done # # INSTALL # %install for mpi in %{mpi_list} do %global _vpath_builddir build_$mpi if [ $mpi = mpich ] ; then %_mpich_load else %_openmpi_load fi %cmake_install for f in $(find ${RPM_BUILD_ROOT}/${MPI_LIB} ${RPM_BUILD_ROOT}/${MPI_PYTHON3_SITEARCH} | grep -E '/libbout|/libpvode|/libpvpre') ; do chrpath -r $MPI_LIB $f done rm -rf ${RPM_BUILD_ROOT}/usr/share/bout++ mkdir -p ${RPM_BUILD_ROOT}/usr/share/modulefiles/bout++ cat > ${RPM_BUILD_ROOT}/usr/share/modulefiles/bout++/$MPI_COMPILER < test.gdb # http://sourceware.org/gdb/wiki/FAQ: to disable the # "---Type to continue, or q to quit---" # in batch mode: set width 0 set height 0 set verbose off # https://stackoverflow.com/a/100501 # Allow setting a breakpoint for non-loaded shared library set breakpoint pending on # b MPI_Comm_rank # commands 1 # bt # continue # end # show arguments for program show args printf "Note, however: in batch mode, arguments will be ignored!\n" run ./runtest bt EOF for i in {1..10} ; do PYTHONPATH=../../../../tools/pylib/:$PYTHONPATH gdb --batch --command=test.gdb python3 || : PYTHONPATH=../../../../tools/pylib/:$PYTHONPATH python3 ./runtest || : : done popd make %{?_smp_mflags} build-check SEGFAULT_SIGNALS="segv" make check-unit-tests || $(exit $fail) SEGFAULT_SIGNALS="segv" make check-mms-tests || $(exit $fail) SEGFAULT_SIGNALS="segv" make check-integrated-tests || $(exit $fail) popd if [ $mpi = mpich ] ; then %_mpich_unload else %_openmpi_unload fi done %endif # # FILES SECTION # %if %{with mpich} %files mpich %{_libdir}/mpich/lib/libbout++.so.5.1.0 %{_libdir}/mpich/lib/*.so.1.0.0 %{_libdir}/mpich/bin/* %doc README.md %doc CITATION.bib %doc CITATION.cff %doc CHANGELOG.md %doc CONTRIBUTING.md %license LICENSE %license LICENSE.GPL /usr/share/modulefiles/bout++/mpich-* %files mpich-devel %{_includedir}/mpich-%{_arch}/bout++ %{_libdir}/mpich/lib/*.so %{_libdir}/mpich/lib/cmake/* %files -n python%{python3_pkgversion}-%{name}-mpich %{python3_sitearch}/mpich/* %endif %if %{with openmpi} %files openmpi %{_libdir}/openmpi/lib/libbout++.so.5.1.0 %{_libdir}/openmpi/lib/*.so.1.0.0 %{_libdir}/openmpi/bin/* %doc README.md %doc CITATION.bib %doc CITATION.cff %doc CHANGELOG.md %doc CONTRIBUTING.md %license LICENSE %license LICENSE.GPL /usr/share/modulefiles/bout++/openmpi-* %files openmpi-devel %{_includedir}/openmpi-%{_arch}/bout++ %{_libdir}/openmpi/lib/*.so %{_libdir}/openmpi/lib/cmake/* %files -n python%{python3_pkgversion}-%{name}-openmpi %{python3_sitearch}/openmpi/* %endif %files common -f libbout.lang %dir /usr/share/modulefiles/bout++/ %files -n python%{python3_pkgversion}-%{name} %doc README.md %doc CITATION.bib %doc CITATION.cff %doc CHANGELOG.md %doc CONTRIBUTING.md %license LICENSE %license LICENSE.GPL %if %{with manual} %files -n %{name}-doc %doc %{_defaultdocdir}/bout++/ %endif # # CHANGELOG # %changelog ## START: Generated by rpmautospec * Thu Dec 12 2024 David Bold - 5.2.0.dev574+ge3f21cd2f-1 - Uncommitted changes * Wed Apr 17 2024 David Bold - 5.1.0-10 - Fix PVODE Config file for cmake * Sat Mar 02 2024 Antonio Trande - 5.1.0-9 - Rebuild again for sundials-6.7.0 * Fri Mar 01 2024 Antonio Trande - 5.1.0-8 - Rebuild for sundials-6.7.0 * Thu Feb 01 2024 David Bold - 5.1.0-7 - Add missing patch * Mon Jan 29 2024 Fedora Release Engineering - 5.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 27 2024 David Bold - 5.1.0-5 - Allow oversubscriping with openmpi 5 * Tue Jan 23 2024 Fedora Release Engineering - 5.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 David Bold - 5.1.0-3 - Work around for test failure on s390x * Fri Jan 19 2024 Fedora Release Engineering - 5.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Oct 18 2023 David Bold - 5.1.0-1 - Update to v5.1.0 * Sun Oct 15 2023 Antonio Trande - 5.0.0-11 - Rebuild for sundials-6.6.1 * Mon Aug 14 2023 Antonio Trande - 5.0.0-10 - Rebuild for petsc-3.19.4 * Wed Jul 19 2023 Fedora Release Engineering - 5.0.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 18 2023 Zbigniew Jędrzejewski-Szmek - 5.0.0-8 - Rebuild for python3-tables-0:3.7.0-9.fc39 (rhbz#2219950) * Wed Jul 12 2023 David Bold - 5.0.0-7 - Remove build dependency on h5py * Sat Jul 01 2023 David Bold - 5.0.0-6 - Fix for fmt10 * Wed Jun 28 2023 Vitaly Zaitsev - 5.0.0-5 - Rebuilt due to fmt 10 update. * Tue Apr 25 2023 Antonio Trande - 5.0.0-4 - Rebuild for Sundials 6.5.1 * Sun Apr 23 2023 David Bold - 5.0.0-3 - ignore minor test failure * Wed Apr 05 2023 David Bold - 5.0.0-2 - Add workaround for non-x86 failure * Sat Mar 25 2023 David Bold - 5.0.0-1 - Update to v5.0.0 * Sat Mar 25 2023 David Bold - 4.4.2-7 - Drop support for i686 * Wed Jan 18 2023 Fedora Release Engineering - 4.4.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Jul 20 2022 Fedora Release Engineering - 4.4.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jun 24 2022 David Bold - 4.4.2-4 - Switch to autorelease * Fri Jun 17 2022 Python Maint - 4.4.2-3 - Rebuilt for Python 3.11 * Sat Apr 23 2022 Antonio Trande - 4.4.2-2 - Rebuild for PETSc-3.17.0| Remove libSegFault preloading (no longer provided) * Sat Apr 02 2022 David Bold - 4.4.2-1 - Update to 4.4.2 * Tue Jan 25 2022 David Bold - 4.4.1-2 - update sources * Tue Jan 25 2022 David Bold - 4.4.1-1 - Update to 4.4.1 * Wed Jan 19 2022 Fedora Release Engineering - 4.4.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Nov 22 2021 Orion Poplawski - 4.4.0-8 - Rebuild for hdf5 1.12.1 * Wed Oct 20 2021 Antonio Trande - 4.4.0-7 - Rebuild for sundials-5.8.0 * Mon Oct 18 2021 Antonio Trande - 4.4.0-6 - Rebuild for PETSc-3.16.0 * Wed Sep 22 2021 David - 4.4.0-5 - Fix permissions of so * Sun Aug 29 2021 David - 4.4.0-4 - Workaround FTBFS issues * Mon Aug 23 2021 David - 4.4.0-3 - Add patch * Mon Aug 23 2021 David - 4.4.0-2 - Fix build * Mon Aug 16 2021 David - 4.4.0-1 - Update to 4.4.0 * Sat Aug 14 2021 Orion Poplawski - 4.3.3-1 - Update to 4.3.3 * Tue Aug 10 2021 Orion Poplawski - 4.3.2-19 - Rebuild for hdf5 1.10.7 * Wed Jul 21 2021 Fedora Release Engineering - 4.3.2-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jul 21 2021 Fedora Release Engineering - 4.3.2-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Sun Jun 27 2021 David - 4.3.2-16 - Remove installing instruction for unbundeled python packages * Sat Jun 26 2021 David - 4.3.2-15 - Do not use bundled boututils and boutdata * Sat Jun 26 2021 David - 4.3.2-14 - Add recommends for python packages to read data * Sat Jun 26 2021 David - 4.3.2-13 - Split out boututils and boutdata * Sat Jun 26 2021 David - 4.3.2-12 - working on python split * Fri Jun 04 2021 Python Maint - 4.3.2-11 - Rebuilt for Python 3.10 * Mon Apr 19 2021 David - 4.3.2-10 - Rebuild for PETSc 3.15 * Sat Apr 17 2021 David - 4.3.2-9 - Workaround for autotools 2.71 * Fri Mar 19 2021 David - 4.3.2-8 - Rebuild for sundials 5.7.0 * Sat Feb 06 2021 David - 4.3.2-7 - Increase timeout in check * Tue Jan 26 2021 Fedora Release Engineering - 4.3.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sun Jan 17 2021 David - 4.3.2-5 - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec