-
Notifications
You must be signed in to change notification settings - Fork 2
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
Comprehensive way to manage ReSolve configuration parameters #96
Comments
Another part of this discussion is how to implement interface to ReSolve's select-from-the-list options. Currently we are just passing strings as this is quick'n'dirty way to set those options and get everything running. Perhaps a better way is to expose those lists to users in a form of See how we handled similar issue in #12. Also suggested by @kswirydo in #86 (comment)_ |
has this utility been tested for all input conditions? Is there logic to detect and report ill-formed combinations of options? Config options are often represented naturally with a hierarchical data format, and this allows them to be saved for later use. Does that capability exist with this parser? If not, is it desirable? https://github.com/nlohmann/json is a single header file, so it could be added to the repo once and never bothered with again. https://github.com/nlohmann/json can parse JSON from a file or the command line directly via stdin if file I/O is undesirable. Thousands of users have helped refine json.hpp, it is extremely robust and extensively tested. |
For compile-time options, it looks like CMakePresets is being used, which is definitely the best way to organize repeatable build configurations with CMake |
Storing Re::Solve runtime options as JSON seems like a reasonable enough option to me. We have used TOML files for another project to some success for storing arrays of test cases with sane defaults. Doing this in JSON might be a little harder. Maybe we can do a mix of TOML for testing, and JSON for runtime options? |
Lots of content online indicates that JSON is not the best choice for configuration: https://revelry.co/insights/development/json-configuration-file-format/ TOML and YAML seem like better options for configurations than JSON! |
@cameronrutherford would you please link the TOML parsing code from the other project you mentioned, if you get a chance? I imagine it could be used in this project with minor repurposing, or at the very least a helpful reference. This looks a promising library for TOML parsing: https://marzer.github.io/tomlplusplus/index.html. @pelesh one way to begin this would be to identify one of the unit/system tests that requires some configuration, represent the configuration as TOML, then modify the test to consume a TOML file. |
ExaGO is the reference project... Let me know if you need more clarifications:
Let me know if you need more clarification ◡̈ |
ReSolve includes several different linear solvers and supports three hardware backends. There is a large number of parameters in ReSolve to select specific solution strategy and to tune its performance. Many of the parameters are specific to a specific solver type or hardware backend or both. We need a hierarchical method to allow user to configure ReSolve easily without sifting through dozens of (often cryptically described) parameters. Most of these parameters need to be set at runtime.
This issue is to start discussion how to handle this most effectively.
The issue originally raised by @kswirydo in #86 (comment)_
The text was updated successfully, but these errors were encountered: