-
Notifications
You must be signed in to change notification settings - Fork 103
Fix compilation error due to check_c_source_runs #2967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
mikekryjak
wants to merge
508
commits into
boutproject:v5.1.1-rc
from
mikekryjak:fix-cmake-source-compiles
Closed
Fix compilation error due to check_c_source_runs #2967
mikekryjak
wants to merge
508
commits into
boutproject:v5.1.1-rc
from
mikekryjak:fix-cmake-source-compiles
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Previously used for annotating `printf` like functions, since replaced with `fmt` formatting
Remove `tools/pylib/post_bout`
…ng-tidy-happy Fix a bunch of `clang-tidy` issues in `Options`
We no longer need separate declarations of static/constexpr variables, as C++17 now handles this better. Note that `static constexpr` members imply `inline`, while namespace scope `constexpr` implies `static` but not `inline`
Remove unused `format.hxx` header
Adds some `override` keywords Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…sed-macro Replace `MAYBE_UNUSED` macro with C++17 `[[maybe_unused]]`
This reverts commit 7e0ccad. This is still required for static linking
The only use of this class (the `Options::values` view, returning a newly constructed `std::map<std::string, OptionValue>`) was removed a few years ago, so this is no longer needed
…lue-nested-class Remove `Options::OptionValue` nested class
…riables Use C++17 `inline` variables to remove some linker hacks
If the size of the array matches the global array, read the piece of the array that is used on the local processor.
Potentially ambiguous, as it uses the size of the global array to determine whether it is a Field2D or FieldPerp.
Read fields from ADIOS2 restart files
…-cuda Update CUDA standard to cxx17, add CI build test
I think this is probably already the case, but this ensures that the nonlinear RHS is called first to evaluate all coefficients.
CVODE solver: Pass linear flag to rhs()
…er_options Add CVODE mxorder option back, now deprecated
fmt v11 preserves and enforces the constness of the formatted argument.
without this change, the tree fails to build with fmt v11, like:
```
In file included from /usr/include/fmt/format.h:41,
from /usr/include/fmt/core.h:5,
from /builddir/build/BUILD/bout++-5.1.0-build/BOUT++-v5.1.0/include/bout/sys/expressionparser.hxx:33:
/usr/include/fmt/base.h: In instantiation of ‘static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = Options; Formatter = fmt::v11::formatter<Options>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]’:
/usr/include/fmt/base.h:1373:19: required from ‘fmt::v11::detail::value<Context>::value(T&) [with T = Options; Context = fmt::v11::context]’
1373 | custom.format = format_custom_arg<
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
1374 | value_type, typename Context::template formatter_type<value_type>>;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/base.h:1631:41: required from ‘constexpr fmt::v11::detail::value<Context> fmt::v11::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v11::context; T = Options; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’
1631 | return {arg_mapper<Context>().map(val)};
| ^
/usr/include/fmt/base.h:2002:74: required from ‘constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {Options}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
2002 | return {{detail::make_arg<NUM_ARGS <= detail::max_packed_args, Context>(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
2003 | args)...}};
| ~~~~~
/usr/include/fmt/format.h:4357:44: required from ‘std::string fmt::v11::format(format_string<T ...>, T&& ...) [with T = {Options&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, Options&>]’
4357 | return vformat(fmt, fmt::make_format_args(args...));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/builddir/build/BUILD/bout++-5.1.0-build/BOUT++-v5.1.0/src/bout++.cxx:333:27: required from ‘void bout::experimental::printTypeOptions(const std::string&) [with Factory = SolverFactory; std::string = std::__cxx11::basic_string<char>]’
333 | std::cout << fmt::format("{:id}\n", help_options);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/bout++-5.1.0-build/BOUT++-v5.1.0/src/bout++.cxx:355:30: required from ‘void bout::experimental::handleFactoryHelp(const std::string&, int, int, char**, bool) [with Factory = SolverFactory; std::string = std::__cxx11::basic_string<char>]’
355 | printTypeOptions<Factory>(argv[i + 1]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/builddir/build/BUILD/bout++-5.1.0-build/BOUT++-v5.1.0/src/bout++.cxx:417:37: required from here
417 | handleFactoryHelp<SolverFactory>(current_arg, i, argc, argv);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/base.h:1392:29: error: passing ‘const fmt::v11::formatter<Options>’ as ‘this’ argument discards qualifiers [-fpermissive]
```
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
fmt::join() overloads was moved into fmt/ranges.h since fmt v11, so let's include fmt/ranges.h as well. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Co-authored-by: Steven Roberts <sroberts994@gmail.com>
Co-authored-by: Steven Roberts <sroberts994@gmail.com>
Co-authored-by: Steven Roberts <sroberts994@gmail.com>
Co-authored-by: Steven Roberts <sroberts994@gmail.com>
- treatment is now an enum, rather than a string. Allowed values are "imex", "explicit" or "implicit" (Lower case in input). - The conversion from string to enum now lists the valid values when a string isn't recognised e.g: ``` Option solver:treatment = Implicit (Command line) Error encountered: Did not find enum Implicit. Valid values: explicit imex implicitStacktrace not enabled. ====== Back trace ====== -> Treatment TreatmentFromString(const std::string &) on line 66 of '/Users/dudson2/code/BOUT-dev/src/solver/impls/arkode/arkode.hxx' ====== Exception thrown ====== Did not find enum Implicit. Valid values: explicit imex implicit ``` - The separate "imex", "implicit" and "explicit" booleans have been removed, all controlled by "treatment" now.
Inputs are now "pid", "pi", "i", etc. rather than 0 .. 5. If an invalid value is used then the valid choices are printed.
Fix typos in laplacian inversion documentation (credit @MigMadeira)
Next IMEX issue
Prevously this would result in the error "Unknown CMake command "check_c_source_compiles" when compiling Hermes-3
|
Thanks @mikekryjak ! Please could you rebase this onto |
|
Replaced by #2970 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2944