ROSS
ROSS copied to clipboard
tw_opt_set
This is a new API function which can be used to set options during runtime (any options that are registered with TWOPT). It may be useful for models that always require certain options.
This is also a step in the direction of formalizing the ROSS API and removing the need for models to muck with global variables. The hope is that models only worry about options documented by --help text and never need to remember g_tw_xxx variables.
Some larger discussion should take place in #162.
If this merge represents a feature addition to ROSS, the following items must be completed before the branch will be merged:
- [ ] Document the feature on the blog (See the website Contributing guide). Include a link to your blog post in the Pull Request.
- [ ] Builds should cleanly compile with -Wall and -Wextra.
- [ ] One or more TravisCI tests should be created (and they should pass)
- [ ] Through the TravisCI tests, coverage should increase
- [ ] Test with CODES to ensure everything continues to work
This needs some logic as to whether tw_opt_set
is being called before or after tw_opt_parse
. At first blush, I feel like it is incorrect to call set after parse... but really, there is no reason not to, other than being sane for model developers and ensuring that options set on the command-line always take precedence.
Codecov Report
Merging #164 into develop will decrease coverage by
0.52%
. The diff coverage is61.9%
.
@@ Coverage Diff @@
## develop #164 +/- ##
==========================================
- Coverage 58.42% 57.9% -0.53%
==========================================
Files 32 32
Lines 3541 3578 +37
==========================================
+ Hits 2069 2072 +3
- Misses 1472 1506 +34
Impacted Files | Coverage Δ | |
---|---|---|
core/tw-opts.c | 22.31% <61.9%> (-2.81%) |
:arrow_down: |
core/gvt/mpi_allreduce.c | 90.42% <0%> (ø) |
:arrow_up: |
core/gvt/mpi_allreduce.h | 87.5% <0%> (+0.83%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 995a433...2666260. Read the comment docs.
I should also de-allocate that memory I use...