-
Notifications
You must be signed in to change notification settings - Fork 44
WIP: TOML Parameters #1277
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
Open
c-prather
wants to merge
72
commits into
develop
Choose a base branch
from
blb/toml
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
WIP: TOML Parameters #1277
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
f9cdea6
add tomlplusplus submodule
AstroBarker 612dbbd
Merge remote-tracking branch 'origin/jmm/next-output' into blb/toml
a0563cc
add queries record
jonahm-LANL 28d0dda
Merge branch 'jmm/next-output' into jmm/docstrings
jonahm-LANL 7c6b5b4
Replace parameters with TOML. Backward-compatible.
0db82f4
Change archive_parameters option to conform to real types
17a985e
Merge branch 'jmm/next-output' of github:parthenon-hpc-lab/parthenon …
f6ad86c
Merge branch 'develop' into blb/toml
3d4dc5b
Merge branch 'blb/toml' of github:parthenon-hpc-lab/parthenon into bl…
132f183
Add GetAllPaths to list out all leaf parameter paths, for iteration.
39089fb
Simplify, simplify parameters. No more origins table.
6dd8649
Remove more parameter debugging outputs.
15e6f87
intermediate commit
jonahm-LANL 864f8e9
Merge branch 'jmm/next-output' into jmm/docstrings
jonahm-LANL a6c2dbf
merge in next_output branch
jonahm-LANL 24b0719
Merge branch 'jmm/next-output' into jmm/docstrings
jonahm-LANL c1f2168
almost there...
jonahm-LANL 7e837bd
Merge branch 'develop' into jmm/docstrings
jonahm-LANL 19f380e
it works
jonahm-LANL e369e7f
add docstrings throughout
jonahm-LANL 1230639
make regex machinery generate csv file
jonahm-LANL bf375c8
add rules in cmake to generate csv files for rst to slurp up
jonahm-LANL 25ed9db
sphinx custom template so csv tables are word wrapped
jonahm-LANL b0964ef
page for parameters
jonahm-LANL 7602e72
lets see if github workflow can do it
jonahm-LANL 4398f7d
add some discussion
jonahm-LANL 7086359
changelog
jonahm-LANL 2b0b0a8
readme
jonahm-LANL 4f06b22
need kokkos now in docs
jonahm-LANL 92d5f62
python formatting
jonahm-LANL f904817
come on...
jonahm-LANL 43e4fd3
I don't want tests
jonahm-LANL 9f2eb8c
disable output for example
jonahm-LANL a09bce8
try this
jonahm-LANL 62af088
add static methods for getting meshblock and mesh region sizes so tha…
jonahm-LANL 98e99f2
generated files are now stored in git since they could vary between b…
jonahm-LANL dea09de
no ifdef around registerloadbalancing
jonahm-LANL d9569d0
parameters always in lexicographic order
jonahm-LANL b79e41a
Merge develop into TOML parameters
bd52ed7
Fix some parameter parsing and a block iteration to pass tests w/TOML
d570058
stupid statefulness
jonahm-LANL efb065e
Check for the special case of Set called before GetOrAdd so we don't …
jonahm-LANL ecf869b
update cmake
jonahm-LANL 3512b7f
Update src/parameter_input.cpp
Yurlungur 3d71dcd
Most of luke and ben's comments
jonahm-LANL 469903a
Merge branch 'jmm/docstrings' of github.com:parthenon-hpc-lab/parthen…
jonahm-LANL 44559a5
Made the param output itself a param as suggested by luke. Fixed bug …
jonahm-LANL 5bbc09c
Add ParameterRef
jonahm-LANL 38fc240
changelog
jonahm-LANL 2e7bed7
Merge pull request #1286 from parthenon-hpc-lab/jmm/docstrings-2-bloc…
Yurlungur 13cbae6
Revert "Add ParameterRef"
Yurlungur 7e775b8
Merge pull request #1287 from parthenon-hpc-lab/revert-1286-jmm/docst…
Yurlungur 8e0a2e7
Merge (heavy airquotes) branch 'jmm/docstrings' of github:parthenon-h…
bb93a3c
Merge branch 'develop' into jmm/docstrings
Yurlungur b86fe1e
add csv comment
jonahm-LANL eea42fb
Merge branch 'develop' into jmm/docstrings-2-blockref-boogaloo
jonahm-LANL 6c229da
Merge branch 'jmm/docstrings-2-blockref-boogaloo' into jmm/docstrings
jonahm-LANL 4bd0383
ParamRef in a single commit
jonahm-LANL c93ab26
Pass (heavy airquotes) the tests. docstring error conditions and Chec…
aff47d9
merge in latest changes from docstring MR
jonahm-LANL f5ebe91
tests pass now
jonahm-LANL 07c7809
comment out checkrequired and checkdesired
jonahm-LANL 9d3c0da
Merge branch 'develop' into blb/toml
jonahm-LANL 5099ff1
tables build
jonahm-LANL edc9ead
don't need ostream overload
jonahm-LANL c63f97a
provenance works
jonahm-LANL b169872
oops hide the warning
jonahm-LANL a7ac214
Merge branch 'develop' into blb/toml
Yurlungur eb0ddef
stash raw input strings...
jonahm-LANL 73ee2ea
Merge branch 'blb/toml' of github.com:parthenon-hpc-lab/parthenon int…
jonahm-LANL 925d529
moved parameter input and argument parser into their own folder. Adde…
jonahm-LANL e125829
remove unneeded toml table in parser
jonahm-LANL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* Enable word wrap in table cells */ | ||
| /* JMM: This is preferable IMO but it messed up the word wrapping for | ||
| * our hand-written tables, so I removed it and enabled wrapping only | ||
| * for csv-imported tables | ||
| /* | ||
| .rst-content table.docutils td { | ||
| white-space: normal !important; | ||
| word-wrap: break-word; | ||
| word-break: break-word; | ||
| } | ||
| */ | ||
| /* Only apply word wrapping to CSV-imported tables with .csv-wrap class */ | ||
| .rst-content table.csv-wrap td { | ||
| white-space: normal !important; | ||
| word-wrap: break-word; | ||
| word-break: break-word; | ||
| } | ||
|
|
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| .. _inputref: | ||
|
|
||
| Input Parameters Reference | ||
| =========================== | ||
|
|
||
| This reference is automatically generated with Parthenon's | ||
| ``ParameterInput`` class. To generate it, pass the ``-p`` flag into a | ||
| parthenon-based executable (in addition to the other flags you would | ||
| normally pass), and optionally a ``regex`` to specify which blocks | ||
| you'd like to output. Parthenon will print a valid CSV file to the | ||
| terminal. | ||
|
|
||
| Every call to ``ParameterInput::Get*`` optionally takes a "docustring" | ||
| as a final argument, which is the details column listed here. Default | ||
| values are recorded if they are available. | ||
|
|
||
| In Parthenon | ||
| -------------- | ||
|
|
||
| An incomplete list of all input parameters provided by Parthenon is tabulated below | ||
|
|
||
| .. csv-table:: Parthenon input parameters | ||
| :file: generated/diffusion-parth-table.csv | ||
| :header-rows: 1 | ||
| :widths: 20 20 10 20 30 | ||
| :class: csv-wrap | ||
|
|
||
| In the diffusion example | ||
| ---------------------------- | ||
|
|
||
| The non-parthenon input parameters used in the diffusion example are tabulated below | ||
|
|
||
| .. csv-table:: Parthenon input parameters | ||
| :file: generated/diffusion-table.csv | ||
| :header-rows: 1 | ||
| :widths: 20 20 10 20 30 | ||
| :class: csv-wrap | ||
|
|
||
| In the Burgers benchmark, Parthenon-VIBE | ||
| ------------------------------------------ | ||
|
|
||
| The non-parthenon input parameters used in Parthenon-VIBE are tabulated below | ||
|
|
||
| .. csv-table:: Parthenon input parameters | ||
| :file: generated/burgers-table.csv | ||
| :header-rows: 1 | ||
| :widths: 20 20 10 20 30 | ||
| :class: csv-wrap |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| block,parameters,type,default,description | ||
| "burgers","cfl","Real","0.8","" | ||
| "burgers","kx_fact","Real","1","" | ||
| "burgers","ky_fact","Real","1","" | ||
| "burgers","kz_fact","Real","1","" | ||
| "burgers","num_scalars","int","1","" | ||
| "burgers","recon","string","weno5","" | ||
| "","","","","" | ||
| "parthenon.job","output_params_and_exit","bool","0","output a description of all input parameters accessed and quit" | ||
| "parthenon.job","output_params_block_regex","string","(.*)","when outputting input parameters, this selects which input blocks to output; all are output by default" | ||
| "parthenon.job","problem_id","string","parthenon","prefix for output files" | ||
| "parthenon.job","run_only_analysis","bool","","" | ||
| "","","","","" | ||
| "parthenon.loadbalancing","balancer","string","default","load balancing strategy; Allowed values: automatic, default, manual" | ||
| "parthenon.loadbalancing","interval","int","10","how frequently load balancing is performed if the mesh does not change" | ||
| "parthenon.loadbalancing","tolerance","Real","0.5","load balancer tolerance" | ||
| "","","","","" | ||
| "parthenon.mesh","derefine_count","int","10","number of iterations a block must request derefinement before it is derefined" | ||
| "parthenon.mesh","ix1_bc","string","outflow","global mesh boundary condition on inner X1 face" | ||
| "parthenon.mesh","ix2_bc","string","outflow","global mesh boundary condition on inner X2 face" | ||
| "parthenon.mesh","ix3_bc","string","outflow","global mesh boundary condition on inner X3 face" | ||
| "parthenon.mesh","multigrid","bool","0","enable a multigrid mesh" | ||
| "parthenon.mesh","nghost","int","2","number of ghost zones on a block" | ||
| "parthenon.mesh","num_threads","int","1","number of host threads for infrastructure; unused" | ||
| "parthenon.mesh","numlevel","int","1","maximum level of refinement globally" | ||
| "parthenon.mesh","nx1","int","","number of cells on base mesh in x1 direction" | ||
| "parthenon.mesh","nx2","int","","number of cells on base mesh in x2 direction" | ||
| "parthenon.mesh","nx3","int","","number of cells on base mesh in x3 direction" | ||
| "parthenon.mesh","ox1_bc","string","outflow","global mesh boundary condition on outer X1 face" | ||
| "parthenon.mesh","ox2_bc","string","outflow","global mesh boundary condition on outer X2 face" | ||
| "parthenon.mesh","ox3_bc","string","outflow","global mesh boundary condition on outer X3 face" | ||
| "parthenon.mesh","packs_per_rank","int","1","number of meshblockpacks per rank, overrides pack_size" | ||
| "parthenon.mesh","refinement","string","none","mesh refinement mode; Allowed values: adaptive, none, static" | ||
| "parthenon.mesh","refinement_in_one_min_nbufs","int","64","" | ||
| "parthenon.mesh","x1max","Real","","maximum x1 value of domain" | ||
| "parthenon.mesh","x1min","Real","","minimum x1 value of domain" | ||
| "parthenon.mesh","x1rat","Real","1","unused" | ||
| "parthenon.mesh","x2max","Real","","maximum x2 value of domain" | ||
| "parthenon.mesh","x2min","Real","","minimum x2 value of domain" | ||
| "parthenon.mesh","x2rat","Real","1","unused" | ||
| "parthenon.mesh","x3max","Real","","maximum x3 value of domain" | ||
| "parthenon.mesh","x3min","Real","","minimum x3 value of domain" | ||
| "parthenon.mesh","x3rat","Real","1","unused" | ||
| "","","","","" | ||
| "parthenon.meshblock","nx1","int","parthenon.mesh.nx1","logical size of a meshblock; defaults to the base size of the mesh" | ||
| "parthenon.meshblock","nx2","int","parthenon.mesh.nx2","logical size of a meshblock; defaults to the base size of the mesh" | ||
| "parthenon.meshblock","nx3","int","parthenon.mesh.nx3","logical size of a meshblock; defaults to the base size of the mesh" | ||
| "","","","","" | ||
| "parthenon.output0","dn","int","-1","output cadence in cycles" | ||
| "parthenon.output0","dt","Real","0.4","output cadence in physical time" | ||
| "","","","","" | ||
| "parthenon.output1","analysis_output","bool","0","" | ||
| "parthenon.output1","data_format","string","%12.5e","" | ||
| "parthenon.output1","dn","int","-1","output cadence in cycles" | ||
| "parthenon.output1","dt","Real","0.4","output cadence in physical time" | ||
| "parthenon.output1","file_number_width","int","5","" | ||
| "parthenon.output1","file_type","string","","output type" | ||
| "parthenon.output1","ghost_zones","bool","0","whether or not ghost zones are output" | ||
| "parthenon.output1","id","string","out1","" | ||
| "parthenon.output1","use_final_label","bool","1","final output will use the word final instead of a number for its index" | ||
| "","","","","" | ||
| "parthenon.refinement0","derefine_tol","Real","0.05","magnitude that triggers de-refinement" | ||
| "parthenon.refinement0","field","string","NO FIELD WAS SET","Field to refine on" | ||
| "parthenon.refinement0","max_level","int","2","maximum level this refinement criterion will achieve" | ||
| "parthenon.refinement0","method","string","PLEASE SPECIFY method","" | ||
| "parthenon.refinement0","refine_tol","Real","0.5","magnitude that triggers refinement" | ||
| "parthenon.refinement0","vector_i","int","","" | ||
| "","","","","" | ||
| "parthenon.sparse","alloc_threshold","Real","1e-12","" | ||
| "parthenon.sparse","dealloc_count","int","5","" | ||
| "parthenon.sparse","dealloc_threshold","Real","1e-14","" | ||
| "parthenon.sparse","enable_sparse","bool","1","" | ||
| "","","","","" | ||
| "parthenon.swarm","ix1_bc","string","periodic","global particle boundary condition on inner X1 face" | ||
| "parthenon.swarm","ix2_bc","string","periodic","global particle boundary condition on inner X2 face" | ||
| "parthenon.swarm","ix3_bc","string","periodic","global particle boundary condition on inner X3 face" | ||
| "parthenon.swarm","ox1_bc","string","periodic","global particle boundary condition on outer X1 face" | ||
| "parthenon.swarm","ox2_bc","string","periodic","global particle boundary condition on outer X2 face" | ||
| "parthenon.swarm","ox3_bc","string","periodic","global particle boundary condition on outer X3 face" | ||
| "","","","","" | ||
| "parthenon.time","dt","Real","1.7976931e+308","initial value of time step before constraining via cfl" | ||
| "parthenon.time","dt_ceil","Real","1.7976931e+308","maximum allowed timestep" | ||
| "parthenon.time","dt_factor","Real","2","maximum relative change in dt per timestep" | ||
| "parthenon.time","dt_floor","Real","2.2250739e-308","minimum allowed timestep" | ||
| "parthenon.time","dt_force","Real","-1.7976931e+308","if set manually enforces this time step exactly" | ||
| "parthenon.time","dt_init","Real","1.7976931e+308","the first time step will be at least as small as dt_init" | ||
| "parthenon.time","dt_init_force","bool","0","if set to true, the first time step will be exactly dt_init" | ||
| "parthenon.time","dt_max","Real","1.7976931e+308","if timestep is above this level for dt_max_count_max iterations, parthenon throws an error" | ||
| "parthenon.time","dt_max_cycle_limit","int","1","number of cycles where dt > dt_max before error" | ||
| "parthenon.time","dt_min","Real","2.2250739e-308","if timestep falls below this level for dt_min_count_max iterations, parthenon throws an error" | ||
| "parthenon.time","dt_min_cycle_limit","int","10","number of cycles where dt < dt_min before error" | ||
| "parthenon.time","integrator","string","rk2","" | ||
| "parthenon.time","ncycle","int","0","initial iteration count" | ||
| "parthenon.time","ncycle_out","int","1","cadence of outputs to stdout" | ||
| "parthenon.time","ncycle_out_mesh","int","0","cadence of outputs describing mesh" | ||
| "parthenon.time","nlim","int","-1","maximum number of iterations, only limiting if non-negative" | ||
| "parthenon.time","perf_cycle_offset","int","0","don't measure performance for some number of initial cycles" | ||
| "parthenon.time","recv_bdry_buf_timeout_sec","Real","-1","" | ||
| "parthenon.time","start_time","Real","0","physical time at which to start the simulation" | ||
| "parthenon.time","tlim","Real","inf","physical time at which to end the simulation" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| block,parameters,type,default,description |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the preferred way to do it? Not
add_subdirectory? How does this work for installing parthenon as a library?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's header only, so I assumed this was how to do it. But there are a ton of installation methods on the website, maybe another works better? Didn't really think about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do
add_subdirectoryand then addTOMLas a CMake target, the same way we add Kokkos. That should automatically thread it through all of the nonsenseCMakemight rely on.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The website doesn't explicitly call that approach out, but I see the cmake supports it. There's checks about whether or not the project is "top level."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I tried messing with this a bit and it doesn't seem like TOML++'s build system supports this. So we should leave it for now and I'll submit an issue.