The package rpms/bout++.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/bout++.git/commit/?id=261d0e877acd56....
Change: +ExcludeArch: %{ix86}
Thanks.
Full change: ============
commit 035879d77159e95f5d3f94156ef230fc9d036a56 Author: David Bold davidsch@fedoraproject.org Date: Wed Apr 5 22:56:42 2023 +0200
Add workaround for non-x86 failure
diff --git a/2693.patch b/2693.patch new file mode 100644 index 0000000..45ba6da --- /dev/null +++ b/2693.patch @@ -0,0 +1,83 @@ +diff --git a/include/bout/field.hxx b/include/bout/field.hxx +index 97b98fee1..2d381080c 100644 +--- a/include/bout/field.hxx ++++ b/include/bout/field.hxx +@@ -345,7 +345,8 @@ inline bool isUniform(const T& f, bool allpe = false, + auto element = f[*f.getRegion(region).begin()]; + // TODO: maybe parallise this loop, as the early return is unlikely + BOUT_FOR_SERIAL(i, f.getRegion(region)) { +- if (f[i] != element) { ++ // by default we only check for exact equality, as that should cover most cases ++ if (f[i] != element and (not almost_equal(f[i], element, 10))) { + result = false; + break; + } +@@ -370,8 +371,11 @@ inline BoutReal getUniform(const T& f, bool allpe = false, + const std::string& region = "RGN_ALL") { + #if CHECK > 1 + if (not isUniform(f, allpe, region)) { +- throw BoutException("Requested getUniform({}, {}, {}) but Field is not const", f.name, +- allpe, region); ++ const BoutReal f1 = min(f, allpe, region); ++ const BoutReal f2 = max(f, allpe, region); ++ throw BoutException("Requested getUniform({}, {}, {}) but Field is not const " ++ "([{:.15f}...{:.15f}] Δ={:e} {:e}ε {})", ++ f.name, allpe, region, f1, f2, f2 - f1, (f2-f1)/(f1+f2)/std::numeric_limits<BoutReal>::epsilon()); + } + #endif + return f[*f.getRegion(region).begin()]; +diff --git a/include/bout/utils.hxx b/include/bout/utils.hxx +index d221abcba..450d3eaf8 100644 +--- a/include/bout/utils.hxx ++++ b/include/bout/utils.hxx +@@ -661,30 +661,16 @@ std::string trimComments(const std::string& s, const std::string& c = "#;"); + /// https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance#Optimal_s... + std::string::size_type editDistance(const std::string& str1, const std::string& str2); + +-/// the bout_vsnprintf macro: +-/// The first argument is an char * buffer of length len. +-/// It needs to have been allocated with new[], as it may be +-/// reallocated. +-/// len: the length of said buffer. May be changed, mussn't be const. +-/// fmt: the const char * descriping the format. +-/// note that fmt should be the first argument of the function of type +-/// const char * and has to be directly followed by the variable arguments. +-#define bout_vsnprintf(buf, len, fmt) \ +- { \ +- va_list va; \ +- va_start(va, fmt); \ +- int _vsnprintflen = vsnprintf(buf, len, fmt, va); \ +- va_end(va); \ +- if (_vsnprintflen + 1 > int(len)) { \ +- _vsnprintflen += 1; \ +- delete[] buf; \ +- buf = new char[_vsnprintflen]; \ +- len = _vsnprintflen; \ +- va_start(va, fmt); \ +- vsnprintf(buf, len, fmt, va); \ +- va_end(va); \ +- } \ +- } ++// from https://en.cppreference.com/w/cpp/types/numeric_limits/epsilon ++template <class T> ++typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type ++almost_equal(T x, T y, int ulp = 2) { ++ // the machine epsilon has to be scaled to the magnitude of the values used ++ // and multiplied by the desired precision in ULPs (units in the last place) ++ return std::fabs(x - y) <= std::numeric_limits<T>::epsilon() * std::fabs(x + y) * ulp ++ // unless the result is subnormal ++ || std::fabs(x - y) < std::numeric_limits<T>::min(); ++} + + /// Convert pointer or reference to pointer + /// This allows consistent handling of both in macros, templates +diff --git a/src/sys/output.cxx b/src/sys/output.cxx +index 0ab1d2e0c..c07cd5347 100644 +--- a/src/sys/output.cxx ++++ b/src/sys/output.cxx +@@ -109,5 +109,3 @@ ConditionalOutput output_progress(Output::getInstance()); + ConditionalOutput output_error(Output::getInstance()); + ConditionalOutput output_verbose(Output::getInstance(), false); + ConditionalOutput output(Output::getInstance()); +- +-#undef bout_vsnprint_pre diff --git a/bout++.spec b/bout++.spec index 1a711d5..772fe80 100644 --- a/bout++.spec +++ b/bout++.spec @@ -14,6 +14,7 @@ Patch: https://github.com/boutproject/BOUT-dev/pull/2664.patch # Removed confliting whitespace changes in PVODE Patch: https://github.com/boutproject/BOUT-dev/pull/2678.patch Patch: https://github.com/boutproject/BOUT-dev/commit/489270184ba9e03cb9996c614050c... +Patch: https://github.com/boutproject/BOUT-dev/pull/2693.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86}
commit 9222e06f4085b4eb04e3746f175c313f8f778b0a Author: David Bold davidsch@fedoraproject.org Date: Sat Mar 25 00:04:30 2023 +0100
Update to v5.0.0
Switch to cmake Remove python-subpackages
diff --git a/2491.patch b/2491.patch deleted file mode 100644 index ef9f8dc..0000000 --- a/2491.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 71c74425b70a32cdedcde42925e5be6b62070aeb Mon Sep 17 00:00:00 2001 -From: j-b-o 61712105+j-b-o@users.noreply.github.com -Date: Mon, 24 Jan 2022 17:50:38 +0100 -Subject: [PATCH] Remove tests depending on UB - ---- - tests/unit/src/test_bout++.cxx | 29 ----------------------------- - 1 file changed, 29 deletions(-) - -diff --git a/tests/unit/src/test_bout++.cxx b/tests/unit/src/test_bout++.cxx -index 050901ddb8..1c895fffbc 100644 ---- a/tests/unit/src/test_bout++.cxx -+++ b/tests/unit/src/test_bout++.cxx -@@ -6,7 +6,6 @@ - #include "utils.hxx" - - #include <algorithm> --#include <csignal> - #include <iostream> - #include <string> - #include <vector> -@@ -313,34 +312,6 @@ TEST_F(PrintStartupTest, CommandLineArguments) { - } - } - --#ifdef SIGHANDLE -- --#ifdef BOUT_FPE --#include <fenv.h> --#endif -- --class SignalHandlerTest : public ::testing::Test { --public: -- SignalHandlerTest() = default; -- virtual ~SignalHandlerTest() { -- std::signal(SIGUSR1, SIG_DFL); -- std::signal(SIGFPE, SIG_DFL); -- std::signal(SIGSEGV, SIG_DFL); --#ifdef BOUT_FPE -- std::signal(SIGFPE, SIG_DFL); -- fedisableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); --#endif -- } --}; -- --using SignalHandlerTestDeathTest = SignalHandlerTest; -- --TEST_F(SignalHandlerTestDeathTest, SegFault) { -- bout::experimental::setupSignalHandler(bout::experimental::defaultSignalHandler); -- // This test is *incredibly* expensive, maybe as much as 1s, so only test the one signal -- EXPECT_DEATH(std::raise(SIGSEGV), "SEGMENTATION FAULT"); --} --#endif - - TEST(BoutInitialiseFunctions, SetRunStartInfo) { - WithQuietOutput quiet{output_info}; diff --git a/2659.patch b/2659.patch new file mode 100644 index 0000000..a65cd6e --- /dev/null +++ b/2659.patch @@ -0,0 +1,54 @@ +From 580e784040c1a6d721f97eaca974e89ec8adbf01 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Fri, 17 Feb 2023 13:54:07 +0100 +Subject: [PATCH 1/2] make executable dir optional + +--- + tests/integrated/test-squash/runtest | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/integrated/test-squash/runtest b/tests/integrated/test-squash/runtest +index c00dfb2a42..574dd23fa8 100755 +--- a/tests/integrated/test-squash/runtest ++++ b/tests/integrated/test-squash/runtest +@@ -77,7 +77,7 @@ def verify(f1, f2): + + parser = argparse.ArgumentParser(description="Test the bout-squashoutput wrapper") + parser.add_argument( +- "executable", help="Path to bout-squashoutput", default="../../../bin" ++ "executable", help="Path to bout-squashoutput", default="../../../bin", nargs="?" + ) + args = parser.parse_args() + + +From 8b76a8f36bd1b7f7b0fee7c1f4b1fdf804834a45 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Fri, 17 Feb 2023 13:54:30 +0100 +Subject: [PATCH 2/2] Fall back to using $PATH to find bout-squashoutput + +--- + tests/integrated/test-squash/runtest | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/integrated/test-squash/runtest b/tests/integrated/test-squash/runtest +index 574dd23fa8..4fd1124679 100755 +--- a/tests/integrated/test-squash/runtest ++++ b/tests/integrated/test-squash/runtest +@@ -7,6 +7,7 @@ import numpy as np + from boututils.run_wrapper import launch_safe, shell_safe, build_and_log + import argparse + import re ++import os.path + + + # requires: all_tests +@@ -85,6 +86,9 @@ build_and_log("Squash test") + + bout_squashoutput = args.executable + "/bout-squashoutput" + ++if not os.path.exists(bout_squashoutput): ++ bout_squashoutput = "bout-squashoutput" ++ + print("Run once to get normal data") + timed_shell_safe("./squash -q -q -q nout=2") + timed_shell_safe("mv data/BOUT.dmp.0.nc f1.nc") diff --git a/2661.patch b/2661.patch new file mode 100644 index 0000000..40b44ba --- /dev/null +++ b/2661.patch @@ -0,0 +1,182 @@ +From 36cabdfe53644cdf8eeec7a61ea3cfb224ce6655 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Mon, 20 Feb 2023 09:07:44 +0100 +Subject: [PATCH 1/6] Declare variable as unused to avoid warning + +--- + include/bout/output.hxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/bout/output.hxx b/include/bout/output.hxx +index bb202cc8df..2f0d66811c 100644 +--- a/include/bout/output.hxx ++++ b/include/bout/output.hxx +@@ -140,8 +140,8 @@ public: + void write(const S&, const Args&...){}; + template <class S, class... Args> + void print(const S&, const Args&...){}; +- void write(const std::string& s) override{}; +- void print(const std::string& s) override{}; ++ void write(const std::string& UNUSED(s)) override{}; ++ void print(const std::string& UNUSED(s)) override{}; + void enable() override{}; + void disable() override{}; + void enable(MAYBE_UNUSED(bool enable)){}; + +From 2af404d3e99d21c76381c35e49c7b47755a58b15 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Mon, 20 Feb 2023 09:23:35 +0100 +Subject: [PATCH 2/6] Avoid no-return warning in pvode + +--- + externalpackages/PVODE/source/cvode.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/externalpackages/PVODE/source/cvode.cpp b/externalpackages/PVODE/source/cvode.cpp +index e28a3b1ae6..065aa93595 100644 +--- a/externalpackages/PVODE/source/cvode.cpp ++++ b/externalpackages/PVODE/source/cvode.cpp +@@ -1826,6 +1826,8 @@ static int CVnls(CVodeMem cv_mem, int nflag) + case FUNCTIONAL : return(CVnlsFunctional(cv_mem)); + case NEWTON : return(CVnlsNewton(cv_mem, nflag)); + } ++ fprintf(errfp, "Should be unreachable ..."); ++ return(ERR_FAILURE); + } + + /***************** CVnlsFunctional ******************************** +@@ -2392,6 +2394,8 @@ static int CVHandleFailure(CVodeMem cv_mem, int kflag) + case SOLVE_FAILED: fprintf(errfp, MSG_SOLVE_FAILED, tn); + return(SOLVE_FAILURE); + } ++ fprintf(errfp, "Should be unreachable ..."); ++ return(ERR_FAILURE); + } + + /*******************************************************************/ + +From e593a9960265a8a59901ddc075bd5ebaffb3e7f3 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Mon, 20 Feb 2023 09:24:16 +0100 +Subject: [PATCH 3/6] Avoid PVEC_REAL_MPI_TYPE redifinition warning + +--- + externalpackages/PVODE/include/pvode/nvector.h | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/externalpackages/PVODE/include/pvode/nvector.h b/externalpackages/PVODE/include/pvode/nvector.h +index 8232995847..c696b185d3 100644 +--- a/externalpackages/PVODE/include/pvode/nvector.h ++++ b/externalpackages/PVODE/include/pvode/nvector.h +@@ -88,12 +88,23 @@ namespace pvode { + + + /* Set types real and integer for MPI calls. */ +- ++#ifndef PVEC_REAL_MPI_TYPE + #if (LLNL_DOUBLE == 1) + #define PVEC_REAL_MPI_TYPE MPI_DOUBLE + #else + #define PVEC_REAL_MPI_TYPE MPI_FLOAT + #endif ++#else ++#if (LLNL_DOUBLE == 1) ++#if PVEC_REAL_MPI_TYPE != MPI_DOUBLE ++#error PVEC_REAL_MPI_TYPE changed ++#endif ++#else ++#if PVEC_REAL_MPI_TYPE != MPI_FLOAT ++#error PVEC_REAL_MPI_TYPE changed ++#endif ++#endif ++#endif + + // Ugh, potentionanlly bad but need to do this for now when compiling with both SUNDIALS and PVODE + #ifndef PVEC_INTEGER_MPI_TYPE + +From 725bb74567adf5a39177ff153f8695e46ee74d40 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Mon, 20 Feb 2023 09:24:28 +0100 +Subject: [PATCH 4/6] Avoid iter not used warning + +--- + src/bout++.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bout++.cxx b/src/bout++.cxx +index e5788230fb..52d8927edb 100644 +--- a/src/bout++.cxx ++++ b/src/bout++.cxx +@@ -813,7 +813,7 @@ BoutMonitor::BoutMonitor(BoutReal timestep, Options& options) + .doc(_("Name of file whose existence triggers a stop")) + .withDefault("BOUT.stop"))) {} + +-int BoutMonitor::call(Solver* solver, BoutReal t, int iter, int NOUT) { ++int BoutMonitor::call(Solver* solver, BoutReal t, MAYBE_UNUSED(int iter), int NOUT) { + TRACE("BoutMonitor::call({:e}, {:d}, {:d})", t, iter, NOUT); + + // Increment Solver's iteration counter, and set the global `iteration` + +From a057a65b822c83121ecbd916ab7abe4272946502 Mon Sep 17 00:00:00 2001 +From: dschwoerer dschwoerer@users.noreply.github.com +Date: Mon, 20 Feb 2023 08:25:07 +0000 +Subject: [PATCH 5/6] Apply clang-format changes + +--- + externalpackages/PVODE/source/cvode.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/externalpackages/PVODE/source/cvode.cpp b/externalpackages/PVODE/source/cvode.cpp +index 065aa93595..03d9f0b130 100644 +--- a/externalpackages/PVODE/source/cvode.cpp ++++ b/externalpackages/PVODE/source/cvode.cpp +@@ -1827,7 +1827,7 @@ static int CVnls(CVodeMem cv_mem, int nflag) + case NEWTON : return(CVnlsNewton(cv_mem, nflag)); + } + fprintf(errfp, "Should be unreachable ..."); +- return(ERR_FAILURE); ++ return (ERR_FAILURE); + } + + /***************** CVnlsFunctional ******************************** +@@ -2395,7 +2395,7 @@ static int CVHandleFailure(CVodeMem cv_mem, int kflag) + return(SOLVE_FAILURE); + } + fprintf(errfp, "Should be unreachable ..."); +- return(ERR_FAILURE); ++ return (ERR_FAILURE); + } + + /*******************************************************************/ + +From f1b2e049c82105fe7b530fce6d35b73a9ee9cf48 Mon Sep 17 00:00:00 2001 +From: David Bold dschwoerer@users.noreply.github.com +Date: Wed, 22 Feb 2023 19:37:50 +0100 +Subject: [PATCH 6/6] Do not check for PVEC_REAL_MPI_TYPE change + +MPI_DOUBLE is a macro, so this check can break, even if there is no mismatch. +--- + externalpackages/PVODE/include/pvode/nvector.h | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/externalpackages/PVODE/include/pvode/nvector.h b/externalpackages/PVODE/include/pvode/nvector.h +index c696b185d3..1095bdb474 100644 +--- a/externalpackages/PVODE/include/pvode/nvector.h ++++ b/externalpackages/PVODE/include/pvode/nvector.h +@@ -94,16 +94,6 @@ namespace pvode { + #else + #define PVEC_REAL_MPI_TYPE MPI_FLOAT + #endif +-#else +-#if (LLNL_DOUBLE == 1) +-#if PVEC_REAL_MPI_TYPE != MPI_DOUBLE +-#error PVEC_REAL_MPI_TYPE changed +-#endif +-#else +-#if PVEC_REAL_MPI_TYPE != MPI_FLOAT +-#error PVEC_REAL_MPI_TYPE changed +-#endif +-#endif + #endif + + // Ugh, potentionanlly bad but need to do this for now when compiling with both SUNDIALS and PVODE diff --git a/2664.patch b/2664.patch new file mode 100644 index 0000000..707a2ea --- /dev/null +++ b/2664.patch @@ -0,0 +1,193 @@ +From 636eb567c33a54ec9635355f5995ba2e98dbead5 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Wed, 22 Feb 2023 11:12:29 +0100 +Subject: [PATCH 1/5] Fix: highlight code + +--- + manual/sphinx/user_docs/installing.rst | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/manual/sphinx/user_docs/installing.rst b/manual/sphinx/user_docs/installing.rst +index 2141e67c0e..260909c8ba 100644 +--- a/manual/sphinx/user_docs/installing.rst ++++ b/manual/sphinx/user_docs/installing.rst +@@ -443,27 +443,27 @@ configuration:: + If not, see :ref:`sec-advancedinstall` for some things you can try to + resolve common problems. + +-Working with an active `conda` environment ++Working with an active ``conda`` environment + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +-When `conda` is used, it installs separate versions of several libraries. These ++When ``conda`` is used, it installs separate versions of several libraries. These + can cause warnings or even failures when linking BOUT++ executables. There are + several alternatives to deal with this problem: +-* The simplest but least convenient option is to use `conda deactivate` before ++* The simplest but least convenient option is to use ``conda deactivate`` before + configuring, compiling, or running any BOUT++ program. + * You might sometimes want to link to the conda-installed libraries. This is + probably not ideal for production runs on an HPC system (as conda downloads + binary packages that will not be optimized for specific hardware), but can be + a simple way to get packages for testing or on a personal computer. In this +- case just keep your `conda` environment active, and with luck the libraries ++ case just keep your ``conda`` environment active, and with luck the libraries + should be picked up by the standard search mechanisms. + * In case you do want a fully optimized and as-stable-as-possible build for + production runs, it is probably best not to depend on any conda packages for +- compiling or running BOUT++ executables (restrict `conda` to providing Python ++ compiling or running BOUT++ executables (restrict ``conda`` to providing Python + packages for post-processing, and their dependencies). Passing +- `-DBOUT_IGNORE_CONDA_ENV=ON` (default `OFF`) excludes anything in the conda ++ ``-DBOUT_IGNORE_CONDA_ENV=ON`` (default ``OFF``) excludes anything in the conda + environment from CMake search paths. This should totally separate BOUT++ from +- the `conda` environment. ++ the ``conda`` environment. + + .. _sec-config-nls: + + +From ba77dd7e1db7f27740c179010c96c0f2d15b22ac Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Wed, 22 Feb 2023 11:48:02 +0100 +Subject: [PATCH 2/5] Fix: all boutpp members are imported + +--- + manual/sphinx/_apidoc/boutpp.rst | 14 +------------- + 1 file changed, 1 insertion(+), 13 deletions(-) + +diff --git a/manual/sphinx/_apidoc/boutpp.rst b/manual/sphinx/_apidoc/boutpp.rst +index d28d7c7d18..71a092ca17 100644 +--- a/manual/sphinx/_apidoc/boutpp.rst ++++ b/manual/sphinx/_apidoc/boutpp.rst +@@ -13,16 +13,4 @@ Module contents + + .. automodule:: boutpp + :members: +- +-Undocumented functions +----------------------- +- +-.. automodule:: boutpp +- :undoc-members: +- +-Special and inherited functions +-------------------------------- +- +-.. automodule:: boutpp +- :special-members: +- :inherited-members: ++ :imported-members: + +From fd3503044ee463b668e56a7a02b3cf54c826b3fa Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Wed, 22 Feb 2023 11:48:25 +0100 +Subject: [PATCH 3/5] Fix more references that should be code + +--- + manual/sphinx/developer_docs/file_io.rst | 2 +- + tools/pylib/_boutpp_build/boutpp.pyx.jinja | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/manual/sphinx/developer_docs/file_io.rst b/manual/sphinx/developer_docs/file_io.rst +index ad44c97277..aece8cfb1e 100644 +--- a/manual/sphinx/developer_docs/file_io.rst ++++ b/manual/sphinx/developer_docs/file_io.rst +@@ -92,7 +92,7 @@ similar interface to ``Datafile``, and just like ``Datafile`` it also + stores pointers to variables. This means that it still suffers from + all of the downsides of ``Datafile``, and developers are encouraged to + move to the ``outputVars`` approach. The `SAVE_ONCE`/`SAVE_REPEAT` +-macros also work through `DataFileFacade`` -- this means that they ++macros also work through ``DataFileFacade`` -- this means that they + cannot be used outside of ``PhysicsModel`` methods! + + +diff --git a/tools/pylib/_boutpp_build/boutpp.pyx.jinja b/tools/pylib/_boutpp_build/boutpp.pyx.jinja +index 0d8cef173a..657e2f28c1 100644 +--- a/tools/pylib/_boutpp_build/boutpp.pyx.jinja ++++ b/tools/pylib/_boutpp_build/boutpp.pyx.jinja +@@ -1500,7 +1500,7 @@ def interp_to(Field3D f3d,location): + def setOption(name, value, source="PyInterface", force=False): + """ + Set an option in the global Options tree. Prefer +- `Options.set` to avoid unexpected results if several Option ++ ``Options.set`` to avoid unexpected results if several Option + roots are avalaible. + + Parameters + +From 87fa772de63d6949b0ee1e3dc70a386b2478d1f7 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Wed, 22 Feb 2023 11:49:01 +0100 +Subject: [PATCH 4/5] Fix: code needs to be separated by an empty line + +--- + manual/sphinx/user_docs/advanced_install.rst | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/manual/sphinx/user_docs/advanced_install.rst b/manual/sphinx/user_docs/advanced_install.rst +index 2f816c4e0c..5e230b8ad8 100644 +--- a/manual/sphinx/user_docs/advanced_install.rst ++++ b/manual/sphinx/user_docs/advanced_install.rst +@@ -142,32 +142,38 @@ Cori + First set up the environment by loading the correct modules. For Bash shell use: + + .. code-block:: bash ++ + source config/cori/setup-env-cgpu.sh + + and for C shell: + + .. code-block:: csh ++ + source config/cori/setup-env-cgpu.sh + + Then configure BOUT++ by running a script which calls CMake. Under bash: + + .. code-block:: bash ++ + ./config/cori/config-bout-cgpu.sh + + and C shell: + + .. code-block:: csh ++ + ./config/cori/config-bout-cgpu.csh + + At the time of writing, Hypre linking is not working with CUDA. If you come across + errors with the above configuration, try turning off Hypre support: + + .. code-block:: bash ++ + ./config/cori/config-bout-cgpu-nohypre.sh + + or + + .. code-block:: csh ++ + ./config/cori/config-bout-cgpu-nohypre.csh + + See section :ref:`sec-gpusupport` for details of compiling and running + +From 88956a0f64b3eea105fdb07210a39d8d6671dca5 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Wed, 22 Feb 2023 11:49:21 +0100 +Subject: [PATCH 5/5] RTD: Add more modules for mock + +--- + manual/sphinx/conf.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/manual/sphinx/conf.py b/manual/sphinx/conf.py +index a643774553..6f943f0765 100755 +--- a/manual/sphinx/conf.py ++++ b/manual/sphinx/conf.py +@@ -67,6 +67,8 @@ def __getattr__(cls, name): + "scipy.ndimage.filters", + "scipy.ndimage.morphology", + "scipy.spatial", ++ "past", ++ "crosslines", + ] + sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) + print(os.environ) diff --git a/2678.patch b/2678.patch new file mode 100644 index 0000000..ee1c685 --- /dev/null +++ b/2678.patch @@ -0,0 +1,400 @@ +From 612188898c0e3af24c0257a470dca90e14006e56 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Tue, 14 Mar 2023 23:33:26 +0100 +Subject: [PATCH 1/9] Explicitly cast to void* + +--- + src/solver/impls/arkode/arkode.cxx | 2 +- + src/solver/impls/cvode/cvode.cxx | 2 +- + src/solver/impls/ida/ida.cxx | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/solver/impls/arkode/arkode.cxx b/src/solver/impls/arkode/arkode.cxx +index 09aa5b9ea2..c2edc533c1 100644 +--- a/src/solver/impls/arkode/arkode.cxx ++++ b/src/solver/impls/arkode/arkode.cxx +@@ -226,7 +226,7 @@ ArkodeSolver::ArkodeSolver(Options* opts) + .withDefault(false)), + optimize( + (*options)["optimize"].doc("Use ARKode optimal parameters").withDefault(false)), +- suncontext(MPI_COMM_WORLD) { ++ suncontext(static_cast<void *>(MPI_COMM_WORLD)) { + has_constraints = false; // This solver doesn't have constraints + + // Add diagnostics to output +diff --git a/src/solver/impls/cvode/cvode.cxx b/src/solver/impls/cvode/cvode.cxx +index 4701d02f69..a715e19d96 100644 +--- a/src/solver/impls/cvode/cvode.cxx ++++ b/src/solver/impls/cvode/cvode.cxx +@@ -174,7 +174,7 @@ CvodeSolver::CvodeSolver(Options* opts) + .doc("Use right preconditioner? Otherwise use left.") + .withDefault(false)), + use_jacobian((*options)["use_jacobian"].withDefault(false)), +- suncontext(MPI_COMM_WORLD) { ++ suncontext(static_cast<void *>(MPI_COMM_WORLD)) { + has_constraints = false; // This solver doesn't have constraints + canReset = true; + +diff --git a/src/solver/impls/ida/ida.cxx b/src/solver/impls/ida/ida.cxx +index cf057ac74c..02a3534d52 100644 +--- a/src/solver/impls/ida/ida.cxx ++++ b/src/solver/impls/ida/ida.cxx +@@ -101,7 +101,7 @@ IdaSolver::IdaSolver(Options* opts) + correct_start((*options)["correct_start"] + .doc("Correct the initial values") + .withDefault(true)), +- suncontext(MPI_COMM_WORLD) { ++ suncontext(static_cast<void *>(MPI_COMM_WORLD)) { + has_constraints = true; // This solver has constraints + } + + +From aa242f8e3e99735b225a20d237bb5cc5689fc805 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Tue, 14 Mar 2023 23:48:32 +0100 +Subject: [PATCH 2/9] Update signature to match upstream + +--- + include/bout/sundials_backports.hxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/bout/sundials_backports.hxx b/include/bout/sundials_backports.hxx +index 9c96de1935..f34ce3fcc4 100644 +--- a/include/bout/sundials_backports.hxx ++++ b/include/bout/sundials_backports.hxx +@@ -39,7 +39,7 @@ inline void SUNNonlinSolFree(MAYBE_UNUSED(SUNNonlinearSolver solver)) {} + #if SUNDIALS_VERSION_MAJOR < 6 + namespace sundials { + struct Context { +- Context(MPI_Comm comm MAYBE_UNUSED() = MPI_COMM_NULL) {} ++ Context(void* comm MAYBE_UNUSED() = MPI_COMM_NULL) {} + }; + } // namespace sundials + + +From 759c0cbb31089a585ae82fe7c93b39aea141e7b2 Mon Sep 17 00:00:00 2001 +From: dschwoerer dschwoerer@users.noreply.github.com +Date: Tue, 14 Mar 2023 22:49:27 +0000 +Subject: [PATCH 3/9] Apply clang-format changes + +--- + src/solver/impls/arkode/arkode.cxx | 2 +- + src/solver/impls/cvode/cvode.cxx | 2 +- + src/solver/impls/ida/ida.cxx | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/solver/impls/arkode/arkode.cxx b/src/solver/impls/arkode/arkode.cxx +index c2edc533c1..6df091288a 100644 +--- a/src/solver/impls/arkode/arkode.cxx ++++ b/src/solver/impls/arkode/arkode.cxx +@@ -226,7 +226,7 @@ ArkodeSolver::ArkodeSolver(Options* opts) + .withDefault(false)), + optimize( + (*options)["optimize"].doc("Use ARKode optimal parameters").withDefault(false)), +- suncontext(static_cast<void *>(MPI_COMM_WORLD)) { ++ suncontext(static_cast<void*>(MPI_COMM_WORLD)) { + has_constraints = false; // This solver doesn't have constraints + + // Add diagnostics to output +diff --git a/src/solver/impls/cvode/cvode.cxx b/src/solver/impls/cvode/cvode.cxx +index a715e19d96..88f2c8e8f9 100644 +--- a/src/solver/impls/cvode/cvode.cxx ++++ b/src/solver/impls/cvode/cvode.cxx +@@ -174,7 +174,7 @@ CvodeSolver::CvodeSolver(Options* opts) + .doc("Use right preconditioner? Otherwise use left.") + .withDefault(false)), + use_jacobian((*options)["use_jacobian"].withDefault(false)), +- suncontext(static_cast<void *>(MPI_COMM_WORLD)) { ++ suncontext(static_cast<void*>(MPI_COMM_WORLD)) { + has_constraints = false; // This solver doesn't have constraints + canReset = true; + +diff --git a/src/solver/impls/ida/ida.cxx b/src/solver/impls/ida/ida.cxx +index 02a3534d52..be13f4d7f7 100644 +--- a/src/solver/impls/ida/ida.cxx ++++ b/src/solver/impls/ida/ida.cxx +@@ -101,7 +101,7 @@ IdaSolver::IdaSolver(Options* opts) + correct_start((*options)["correct_start"] + .doc("Correct the initial values") + .withDefault(true)), +- suncontext(static_cast<void *>(MPI_COMM_WORLD)) { ++ suncontext(static_cast<void*>(MPI_COMM_WORLD)) { + has_constraints = true; // This solver has constraints + } + + +From 7bc12600f5967bb48415d4e0f2220f719e7c4c19 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Wed, 15 Mar 2023 13:47:35 +0100 +Subject: [PATCH 4/9] Ensure to pass a pointer + +`MPI_COMM_WORLD` can be int, thus pass the BOUT++ communicator + +Co-authored-by: Peter Hill peter.hill@york.ac.uk +--- + src/solver/impls/arkode/arkode.cxx | 2 +- + src/solver/impls/cvode/cvode.cxx | 2 +- + src/solver/impls/ida/ida.cxx | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/solver/impls/arkode/arkode.cxx b/src/solver/impls/arkode/arkode.cxx +index 6df091288a..13e0dd817e 100644 +--- a/src/solver/impls/arkode/arkode.cxx ++++ b/src/solver/impls/arkode/arkode.cxx +@@ -226,7 +226,7 @@ ArkodeSolver::ArkodeSolver(Options* opts) + .withDefault(false)), + optimize( + (*options)["optimize"].doc("Use ARKode optimal parameters").withDefault(false)), +- suncontext(static_cast<void*>(MPI_COMM_WORLD)) { ++ suncontext(static_cast<void*>(&BoutComm::get())) { + has_constraints = false; // This solver doesn't have constraints + + // Add diagnostics to output +diff --git a/src/solver/impls/cvode/cvode.cxx b/src/solver/impls/cvode/cvode.cxx +index 88f2c8e8f9..23f76b4db2 100644 +--- a/src/solver/impls/cvode/cvode.cxx ++++ b/src/solver/impls/cvode/cvode.cxx +@@ -174,7 +174,7 @@ CvodeSolver::CvodeSolver(Options* opts) + .doc("Use right preconditioner? Otherwise use left.") + .withDefault(false)), + use_jacobian((*options)["use_jacobian"].withDefault(false)), +- suncontext(static_cast<void*>(MPI_COMM_WORLD)) { ++ suncontext(static_cast<void*>(&BoutComm::get())) { + has_constraints = false; // This solver doesn't have constraints + canReset = true; + +diff --git a/src/solver/impls/ida/ida.cxx b/src/solver/impls/ida/ida.cxx +index be13f4d7f7..b008ebf903 100644 +--- a/src/solver/impls/ida/ida.cxx ++++ b/src/solver/impls/ida/ida.cxx +@@ -101,7 +101,7 @@ IdaSolver::IdaSolver(Options* opts) + correct_start((*options)["correct_start"] + .doc("Correct the initial values") + .withDefault(true)), +- suncontext(static_cast<void*>(MPI_COMM_WORLD)) { ++ suncontext(static_cast<void*>(&BoutComm::get())) { + has_constraints = true; // This solver has constraints + } + + +From d48acbe3a0d4b790bf6f1d58e337aa3ada7bfc8e Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Thu, 16 Mar 2023 10:42:28 +0100 +Subject: [PATCH 5/9] MPI_Comm is a pointer type + +Do not take the address of the pointer. Compiles with mpich and openmpi +--- + src/solver/impls/arkode/arkode.cxx | 2 +- + src/solver/impls/cvode/cvode.cxx | 2 +- + src/solver/impls/ida/ida.cxx | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/solver/impls/arkode/arkode.cxx b/src/solver/impls/arkode/arkode.cxx +index 13e0dd817e..ff6334ef90 100644 +--- a/src/solver/impls/arkode/arkode.cxx ++++ b/src/solver/impls/arkode/arkode.cxx +@@ -226,7 +226,7 @@ ArkodeSolver::ArkodeSolver(Options* opts) + .withDefault(false)), + optimize( + (*options)["optimize"].doc("Use ARKode optimal parameters").withDefault(false)), +- suncontext(static_cast<void*>(&BoutComm::get())) { ++ suncontext(static_cast<void*>(BoutComm::get())) { + has_constraints = false; // This solver doesn't have constraints + + // Add diagnostics to output +diff --git a/src/solver/impls/cvode/cvode.cxx b/src/solver/impls/cvode/cvode.cxx +index 23f76b4db2..320ead4732 100644 +--- a/src/solver/impls/cvode/cvode.cxx ++++ b/src/solver/impls/cvode/cvode.cxx +@@ -174,7 +174,7 @@ CvodeSolver::CvodeSolver(Options* opts) + .doc("Use right preconditioner? Otherwise use left.") + .withDefault(false)), + use_jacobian((*options)["use_jacobian"].withDefault(false)), +- suncontext(static_cast<void*>(&BoutComm::get())) { ++ suncontext(static_cast<void*>(BoutComm::get())) { + has_constraints = false; // This solver doesn't have constraints + canReset = true; + +diff --git a/src/solver/impls/ida/ida.cxx b/src/solver/impls/ida/ida.cxx +index b008ebf903..399f676892 100644 +--- a/src/solver/impls/ida/ida.cxx ++++ b/src/solver/impls/ida/ida.cxx +@@ -101,7 +101,7 @@ IdaSolver::IdaSolver(Options* opts) + correct_start((*options)["correct_start"] + .doc("Correct the initial values") + .withDefault(true)), +- suncontext(static_cast<void*>(&BoutComm::get())) { ++ suncontext(static_cast<void*>(BoutComm::get())) { + has_constraints = true; // This solver has constraints + } + + +From 47a70ed91c7406821edd8510e31e495b39507b08 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Thu, 16 Mar 2023 12:12:11 +0100 +Subject: [PATCH 6/9] Return reference + +This is needed so we can get a pointer to the communicator, as is needed +by SUNContext +--- + include/bout/boutcomm.hxx | 4 ++-- + src/sys/boutcomm.cxx | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include/bout/boutcomm.hxx b/include/bout/boutcomm.hxx +index 77038844a8..fea401af02 100644 +--- a/include/bout/boutcomm.hxx ++++ b/include/bout/boutcomm.hxx +@@ -40,7 +40,7 @@ public: + static BoutComm* getInstance(); + + /// Shortcut method +- static MPI_Comm get(); ++ static MPI_Comm& get(); + + static void setArgs(int& c, char**& v); + +@@ -53,7 +53,7 @@ public: + void setComm(MPI_Comm c); + + // Getters +- MPI_Comm getComm(); ++ MPI_Comm& getComm(); + bool isSet(); + + private: +diff --git a/src/sys/boutcomm.cxx b/src/sys/boutcomm.cxx +index ecaeb866bb..2d78a24076 100644 +--- a/src/sys/boutcomm.cxx ++++ b/src/sys/boutcomm.cxx +@@ -25,7 +25,7 @@ void BoutComm::setComm(MPI_Comm c) { + hasBeenSet = true; + } + +-MPI_Comm BoutComm::getComm() { ++MPI_Comm& BoutComm::getComm() { + if (comm == MPI_COMM_NULL) { + // No communicator set. Initialise MPI + MPI_Init(pargc, pargv); +@@ -39,7 +39,7 @@ MPI_Comm BoutComm::getComm() { + bool BoutComm::isSet() { return hasBeenSet; } + + // Static functions below. Must use getInstance() +-MPI_Comm BoutComm::get() { return getInstance()->getComm(); } ++MPI_Comm& BoutComm::get() { return getInstance()->getComm(); } + + void BoutComm::setArgs(int& c, char**& v) { + getInstance()->pargc = &c; + +From c31e948978980b4458ab9ae0e3c7b826dad70a01 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Thu, 16 Mar 2023 12:13:35 +0100 +Subject: [PATCH 7/9] Pass pointer to to SUNContext + +pass MPI_Comm* to SUNContext_Create as indicated in the docs +https://sundials.readthedocs.io/en/latest/sundials/SUNContext_link.html +--- + src/solver/impls/arkode/arkode.cxx | 2 +- + src/solver/impls/cvode/cvode.cxx | 2 +- + src/solver/impls/ida/ida.cxx | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/solver/impls/arkode/arkode.cxx b/src/solver/impls/arkode/arkode.cxx +index ff6334ef90..13e0dd817e 100644 +--- a/src/solver/impls/arkode/arkode.cxx ++++ b/src/solver/impls/arkode/arkode.cxx +@@ -226,7 +226,7 @@ ArkodeSolver::ArkodeSolver(Options* opts) + .withDefault(false)), + optimize( + (*options)["optimize"].doc("Use ARKode optimal parameters").withDefault(false)), +- suncontext(static_cast<void*>(BoutComm::get())) { ++ suncontext(static_cast<void*>(&BoutComm::get())) { + has_constraints = false; // This solver doesn't have constraints + + // Add diagnostics to output +diff --git a/src/solver/impls/cvode/cvode.cxx b/src/solver/impls/cvode/cvode.cxx +index 320ead4732..23f76b4db2 100644 +--- a/src/solver/impls/cvode/cvode.cxx ++++ b/src/solver/impls/cvode/cvode.cxx +@@ -174,7 +174,7 @@ CvodeSolver::CvodeSolver(Options* opts) + .doc("Use right preconditioner? Otherwise use left.") + .withDefault(false)), + use_jacobian((*options)["use_jacobian"].withDefault(false)), +- suncontext(static_cast<void*>(BoutComm::get())) { ++ suncontext(static_cast<void*>(&BoutComm::get())) { + has_constraints = false; // This solver doesn't have constraints + canReset = true; + +diff --git a/src/solver/impls/ida/ida.cxx b/src/solver/impls/ida/ida.cxx +index 399f676892..b008ebf903 100644 +--- a/src/solver/impls/ida/ida.cxx ++++ b/src/solver/impls/ida/ida.cxx +@@ -101,7 +101,7 @@ IdaSolver::IdaSolver(Options* opts) + correct_start((*options)["correct_start"] + .doc("Correct the initial values") + .withDefault(true)), +- suncontext(static_cast<void*>(BoutComm::get())) { ++ suncontext(static_cast<void*>(&BoutComm::get())) { + has_constraints = true; // This solver has constraints + } + + +From e23b828415963d1d8ea755d22dfb1497c0556cf1 Mon Sep 17 00:00:00 2001 +From: David Bold dschwoerer@users.noreply.github.com +Date: Thu, 23 Mar 2023 10:32:25 +0100 +Subject: [PATCH 8/9] Remove default arguments + +--- + include/bout/sundials_backports.hxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/bout/sundials_backports.hxx b/include/bout/sundials_backports.hxx +index f34ce3fcc4..c5e0f3ab15 100644 +--- a/include/bout/sundials_backports.hxx ++++ b/include/bout/sundials_backports.hxx +@@ -39,7 +39,7 @@ inline void SUNNonlinSolFree(MAYBE_UNUSED(SUNNonlinearSolver solver)) {} + #if SUNDIALS_VERSION_MAJOR < 6 + namespace sundials { + struct Context { +- Context(void* comm MAYBE_UNUSED() = MPI_COMM_NULL) {} ++ Context(void* comm MAYBE_UNUSED()) {} + }; + } // namespace sundials + + +From 9180d280ff0b4cfff6cde1544a2cce8082ac56cc Mon Sep 17 00:00:00 2001 +From: dschwoerer dschwoerer@users.noreply.github.com +Date: Thu, 23 Mar 2023 10:10:04 +0000 +Subject: [PATCH 9/9] Apply clang-format changes + +--- + externalpackages/PVODE/precon/band.cpp | 2 +- + externalpackages/PVODE/source/cvode.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/externalpackages/PVODE/precon/band.cpp b/externalpackages/PVODE/precon/band.cpp +index c1d0f6f1e2..8b444de191 100644 +--- a/externalpackages/PVODE/precon/band.cpp ++++ b/externalpackages/PVODE/precon/band.cpp +@@ -185,7 +185,7 @@ integer gbfa(real **a, integer n, integer mu, integer ml, integer smu, + if (col_k[storage_l] == ZERO) return(k+1); + + /* swap a(l,k) and a(k,k) if necessary */ +- ++ + if (swap = (l != k)) { + temp = col_k[storage_l]; + col_k[storage_l] = *diag_k; +diff --git a/externalpackages/PVODE/source/cvode.cpp b/externalpackages/PVODE/source/cvode.cpp +index 03d9f0b130..1bad94b376 100644 +--- a/externalpackages/PVODE/source/cvode.cpp ++++ b/externalpackages/PVODE/source/cvode.cpp +@@ -179,7 +179,7 @@ namespace pvode { + + #define MSG_Y0_NULL CVM "y0=NULL illegal.\n\n" + +-#define MSG_BAD_N CVM "N=%ld < 1 illegal.\n\n" ++#define MSG_BAD_N CVM "N=%ld < 1 illegal.\n\n" + + #define MSG_BAD_LMM_1 CVM "lmm=%d illegal.\n" + #define MSG_BAD_LMM_2 "The legal values are ADAMS=%d and BDF=%d.\n\n" diff --git a/bout++.spec b/bout++.spec index 420c48e..1a711d5 100644 --- a/bout++.spec +++ b/bout++.spec @@ -1,5 +1,5 @@ Name: bout++ -Version: 4.4.2 +Version: 5.0.0 Release: %autorelease Summary: Library for the BOUndary Turbulence simulation framework
@@ -8,6 +8,13 @@ License: GPLv3+ URL: https://boutproject.github.io/ Source0: https://github.com/boutproject/BOUT-dev/releases/download/v%%7Bversion%7D/BO...
+Patch: https://github.com/boutproject/BOUT-dev/pull/2659.patch +Patch: https://github.com/boutproject/BOUT-dev/pull/2661.patch +Patch: https://github.com/boutproject/BOUT-dev/pull/2664.patch +# Removed confliting whitespace changes in PVODE +Patch: https://github.com/boutproject/BOUT-dev/pull/2678.patch +Patch: https://github.com/boutproject/BOUT-dev/commit/489270184ba9e03cb9996c614050c... + # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86}
@@ -47,16 +54,16 @@ ExcludeArch: %{ix86}
BuildRequires: m4 BuildRequires: zlib-devel -BuildRequires: autoconf -BuildRequires: autoconf-archive +BuildRequires: cmake BuildRequires: gettext-devel -BuildRequires: automake 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 @@ -312,8 +319,6 @@ Recommends: python%{python3_pkgversion}-boutdata
BuildArch: noarch %py_provides python%{python3_pkgversion}-%{name} -%py_provides python%{python3_pkgversion}-bout_runners -%py_provides python%{python3_pkgversion}-zoidberg
%description -n python%{python3_pkgversion}-%{name} Python%{python3_pkgversion} library for pre and post processing of BOUT++ data @@ -342,9 +347,12 @@ This package contains the documentation. #
%prep -%autosetup -n BOUT++-v%{version} -p 1 +%autosetup -n BOUT++-v%{version}.dev10626+gd935fa1ea -p 1 +
-sed -e '/boututils/d' -e '/boutdata/d' -i make.config.in +# 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 @@ -361,10 +369,6 @@ do sed -i '/^#!//d' $f done
-autoupdate -touch build-aux/config.rpath -autoreconf -vif -
# # BUILD @@ -379,11 +383,10 @@ export CXX=mpicxx for mpi in %{mpi_list} do mkdir build_$mpi - cp -al [^b]* build-aux bin build_$mpi done for mpi in %{mpi_list} do - pushd build_$mpi + %global _vpath_builddir build_$mpi if [ $mpi = mpich ] ; then %_mpich_load elif [ $mpi = openmpi ] ; then @@ -393,54 +396,43 @@ do exit 1 fi
- %configure \ - --with-netcdf \ - --with-hdf5 \ - --enable-shared \ - --with-system-mpark \ - --libdir=%{_libdir}/$mpi/lib \ - --bindir=%{_libdir}/$mpi/bin \ - --sbindir=%{_libdir}/$mpi/sbin \ - --includedir=%{_includedir}/$mpi-%{_arch} \ - --datarootdir=%{_datadir} \ + %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=/ \ + -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} \ +%if %{with manual} + -DBOUT_BUILD_DOCS=ON \ +%endif %if %{with petsc} - --with-petsc \ + -DBOUT_USE_PETSC=ON \ %endif %if %{with sundials} - --with-sundials \ + -DBOUT_USE_SUNDIALS=ON \ %endif
- sed -e "s| -L%{_libdir} | |g" \ - -e "s| -Wl,--as-needed | |g" \ - -i make.config - - # Debug linking issues: - # -e 's|@$(LD)|$(LD)|' \ + %cmake_build
- %if %{with flexiblas} - sed -e 's|-lblas|-lflexiblas|g' \ - -e 's|-llapack|-lflexiblas|g' \ - -i make.config - %endif - - # We musn't escape anymore - sed -e 's/\#/#/g' -i make.config - - cat make.config +%if %{with manual} + %global _vpath_builddir build_$mpi/manual + %cmake_build +%endif
- make %{?_smp_mflags} shared - ls -l lib - make %{?_smp_mflags} python - export LD_LIBRARY_PATH=$(pwd)/lib - %if %{with manual} - make %{?_smp_mflags} -C manual html - %endif if [ $mpi = mpich ] ; then %_mpich_unload elif [ $mpi = openmpi ] ; then %_openmpi_unload fi - popd done
# @@ -451,19 +443,20 @@ done
for mpi in %{mpi_list} do - pushd build_$mpi + %global _vpath_builddir build_$mpi if [ $mpi = mpich ] ; then %_mpich_load else %_openmpi_load fi - make install DESTDIR=${RPM_BUILD_ROOT} + %cmake_install
- # mark this as a released version, to disable compiling the library - sed -i '27 i RELEASED = %{version}-%{release}' ${RPM_BUILD_ROOT}/%{_includedir}/${mpi}-%{_arch}/bout++/make.config + for f in $(find ${RPM_BUILD_ROOT}/${MPI_LIB} ${RPM_BUILD_ROOT}/${MPI_PYTHON3_SITEARCH} | grep /libbout) ; do + chrpath -r $MPI_LIB $f + done
rm -rf ${RPM_BUILD_ROOT}/usr/share/bout++ - popd + mkdir -p ${RPM_BUILD_ROOT}/usr/share/modulefiles/bout++ cat > ${RPM_BUILD_ROOT}/usr/share/modulefiles/bout++/$MPI_COMPILER <<EOF #%Module 1.0 @@ -478,6 +471,11 @@ prereq mpi/$MPI_COMPILER setenv BOUT_TOP $MPI_INCLUDE/bout++/ EOF
+%if %{with manual} + %global _vpath_builddir build_$mpi/manual + %cmake_install +%endif + if [ $mpi = mpich ] ; then %_mpich_unload else @@ -485,31 +483,6 @@ EOF fi done
-# install python libraries -pushd tools/pylib -for d in bout_runners zoidberg -do - mkdir -p ${RPM_BUILD_ROOT}/%{python3_sitelib}/$d - cp $d/*py ${RPM_BUILD_ROOT}/%{python3_sitelib}/$d/ -done -popd - -# install manual -%if %{with manual} -mandir=$(ls build_*/manual -d|head -n1) -mkdir -p ${RPM_BUILD_ROOT}/%{_defaultdocdir}/bout++/ -rm -rf $mandir/html/.buildinfo -rm -rf $mandir/html/.doctrees -rm -rf $mandir/html/_sources -cp -r $mandir/html ${RPM_BUILD_ROOT}/%{_defaultdocdir}/bout++/ -%endif - -# install boutcore library -for mpi in %{mpi_list} -do - mkdir -p ${RPM_BUILD_ROOT}/%{python3_sitearch}/${mpi}/ - install build_$mpi/tools/pylib/boutcore.*.so ${RPM_BUILD_ROOT}/%{python3_sitearch}/${mpi}/ -done
%find_lang libbout
@@ -563,7 +536,7 @@ done
%if %{with mpich} %files mpich -%{_libdir}/mpich/lib/libbout++.so.4.4.0 +%{_libdir}/mpich/lib/libbout++.so.5.0.0 %{_libdir}/mpich/lib/*.so.1.0.0 %{_libdir}/mpich/bin/* %doc README.md @@ -578,6 +551,7 @@ done %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/* @@ -586,7 +560,7 @@ done
%if %{with openmpi} %files openmpi -%{_libdir}/openmpi/lib/libbout++.so.4.4.0 +%{_libdir}/openmpi/lib/libbout++.so.5.0.0 %{_libdir}/openmpi/lib/*.so.1.0.0 %{_libdir}/openmpi/bin/* %doc README.md @@ -601,6 +575,7 @@ done %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/* @@ -610,8 +585,6 @@ done %dir /usr/share/modulefiles/bout++/
%files -n python%{python3_pkgversion}-%{name} -%{python3_sitelib}/bout_runners -%{python3_sitelib}/zoidberg %doc README.md %doc CITATION.bib %doc CITATION.cff diff --git a/petsc_318_compat.patch b/petsc_318_compat.patch new file mode 100644 index 0000000..61c5932 --- /dev/null +++ b/petsc_318_compat.patch @@ -0,0 +1,35 @@ +From 489270184ba9e03cb9996c614050cb92513424e6 Mon Sep 17 00:00:00 2001 +From: David Bold dave@ipp.mpg.de +Date: Thu, 17 Nov 2022 13:37:33 +0100 +Subject: [PATCH] Call PCGAMGSetSymGraph only with old PETSc + +For newer PETSc set the option on the matrix +--- + src/invert/laplace/impls/petsc3damg/petsc3damg.cxx | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +index 210e41cbb3..81e5f4ce88 100644 +--- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx ++++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +@@ -457,6 +457,10 @@ void LaplacePetsc3dAmg::updateMatrix3D() { + operator3D.assemble(); + MatSetBlockSize(*operator3D.get(), 1); + ++#if PETSC_VERSION_GE(3, 18, 0) ++ MatSetOption(*operator3D.get(), MAT_SYMMETRIC, PETSC_TRUE); ++#endif ++ + // Declare KSP Context (abstract PETSc object that manages all Krylov methods) + if (kspInitialised) { + KSPDestroy(&ksp); +@@ -508,7 +512,9 @@ void LaplacePetsc3dAmg::updateMatrix3D() { + + // Set the relative and absolute tolerances + PCSetType(pc, pctype.c_str()); ++#if PETSC_VERSION_LT(3, 18, 0) + PCGAMGSetSymGraph(pc, PETSC_TRUE); ++#endif + } + lib.setOptionsFromInputFile(ksp); + diff --git a/remove-mpark.patch b/remove-mpark.patch deleted file mode 100644 index 1000665..0000000 --- a/remove-mpark.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/make.config.in -+++ b/make.config.in -@@ -91,8 +91,7 @@ LIB = $(BOUT_LIB_PATH)/libbout++.a - LIB_SO = $(BOUT_LIB_PATH)/libbout++.so - endif - --MPARK_VARIANT_INCLUDE_PATH=@MPARK_VARIANT_INCLUDE_PATH@ --BOUT_INCLUDE = -I$(BOUT_INCLUDE_PATH) $(CXXINCLUDE) $(EXTRA_INCS) -I$(MPARK_VARIANT_INCLUDE_PATH) -+BOUT_INCLUDE = -I$(BOUT_INCLUDE_PATH) $(CXXINCLUDE) $(EXTRA_INCS) - BOUT_LIBS = -lm -L$(BOUT_LIB_PATH) -lbout++ $(EXTRA_LIBS) - - CHANGED = $(shell find -f $(BOUT_TOP)/include $(BOUT_TOP)/src -type f ( -name *.cxx -or -name *.h ) -newer $(LIB) -print 2> /dev/null) -@@ -163,11 +162,10 @@ install: libfast - $(PRE_INSTALL) # Pre-install commands follow. - - $(NORMAL_INSTALL) # Normal commands follow. -- $(MKDIR) $(INSTALL_INCLUDE_PATH)/{,pvode,bout/sys,bout/invert,mpark} -+ $(MKDIR) $(INSTALL_INCLUDE_PATH)/{,pvode,bout/sys,bout/invert} - $(MKDIR) $(DESTDIR)/{@libdir@,@bindir@,@datadir@/bout++/idllib} - $(MKDIR) $(DESTDIR)/@datadir@/bout++/pylib/{boutdata,boututils} - $(INSTALL_DATA) include/*.hxx $(INSTALL_INCLUDE_PATH) -- $(INSTALL_DATA) $(MPARK_VARIANT_INCLUDE_PATH)/mpark/*.hpp $(INSTALL_INCLUDE_PATH)/mpark - $(INSTALL_DATA) include/pvode/*.h $(INSTALL_INCLUDE_PATH)/pvode/ - $(INSTALL_DATA) include/bout/*.hxx $(INSTALL_INCLUDE_PATH)/bout/ - $(INSTALL_DATA) include/bout/sys/*.hxx $(INSTALL_INCLUDE_PATH)/bout/sys/ -@@ -191,13 +189,11 @@ install: libfast - sed -i "s|^BOUT_CONFIG_FILE=.*|BOUT_CONFIG_FILE=@includedir@/bout++/make.config|" $(DESTDIR)@bindir@/bout-config - sed -i "s|^idlpath=.*|idlpath=@datadir@/bout++/idllib/|" $(DESTDIR)@bindir@/bout-config - sed -i "s|^pythonpath=.*|pythonpath=@datadir@/bout++/pylib/|" $(DESTDIR)@bindir@/bout-config -- sed -i "s|^MPARK_VARIANT_INCLUDE_PATH=.*|MPARK_VARIANT_INCLUDE_PATH=@includedir@/bout++|" $(DESTDIR)@bindir@/bout-config - - @# Modify paths in the make.config file - sed -i "s|^BOUT_INCLUDE_PATH=.*|BOUT_INCLUDE_PATH=@includedir@/bout++|" $(INSTALL_INCLUDE_PATH)/make.config - sed -i "s|^BOUT_LIB_PATH=.*|BOUT_LIB_PATH=@libdir@|" $(INSTALL_INCLUDE_PATH)/make.config - sed -i "s|^BOUT_CONFIG_FILE=.*|BOUT_CONFIG_FILE=@includedir@/bout++/make.config|" $(INSTALL_INCLUDE_PATH)/make.config -- sed -i "s|^MPARK_VARIANT_INCLUDE_PATH=.*|MPARK_VARIANT_INCLUDE_PATH=@includedir@/bout++|" $(INSTALL_INCLUDE_PATH)/make.config - - # Set the make.config as released, so the library isn't rebuild. This way the .a file doesn't need to be preserved/installed - sed -i '26 i RELEASED = yes' $(INSTALL_INCLUDE_PATH)/make.config -@@ -223,16 +219,7 @@ uninstall: - # Builds the library with $(OBJ) which is defined from the SOURCEC variable - #################################################################### - --MPARK_VARIANT_SENTINEL = $(MPARK_VARIANT_INCLUDE_PATH)/mpark/variant.hpp --$(MPARK_VARIANT_SENTINEL): -- @echo "Downloading mpark.variant" -- @lock=$(BOUT_TOP)/externalpackages/.get.mpark ;ex=0; mkdir $$lock && ( \ -- git submodule update --init --recursive $(BOUT_TOP)/externalpackages/mpark.variant \ -- ;ex=$$? ; rmdir $$lock ) || \ -- ( while test -d $$lock ; do sleep .1 ; done); exit $$ex -- - ifeq ("$(TARGET)", "libfast") --libfast: | $(MPARK_VARIANT_SENTINEL) - libfast: makefile $(BOUT_CONFIG_FILE) $(BOUT_TOP)/include $(OBJ) $(DIRS) - endif - diff --git a/sources b/sources index 3da89a4..7876baf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (BOUT++-v4.4.2.tar.gz) = ed058db4d9f37ef6951252781fca5555933800e8b24cfe096bed2fe1b33c7335d61cf963a7a245fa0e858b89c356c57bad3f424e6b7d73633b908a9a256e5f34 +SHA512 (BOUT++-v5.0.0.tar.gz) = d4415522d466114e0f49a3b0c4c19434a63bed3450fe01691ffcd46c4284810706fee150f1b40d17c3bd1a86e4756f00636def529fc3383839aa9f44e5dfc1b2
commit 261d0e877acd56c2b9ecb6ba159c640d91bca360 Author: David Bold davidsch@fedoraproject.org Date: Tue Jan 24 08:11:52 2023 +0100
Drop support for i686
diff --git a/bout++.spec b/bout++.spec index f56ae97..420c48e 100644 --- a/bout++.spec +++ b/bout++.spec @@ -8,6 +8,9 @@ License: GPLv3+ URL: https://boutproject.github.io/ Source0: https://github.com/boutproject/BOUT-dev/releases/download/v%%7Bversion%7D/BO...
+# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + %if 0%{?fedora} >= 33 %bcond_without flexiblas %else
arch-excludes@lists.fedoraproject.org