Skip to content
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

Update automated parameter scan functionality #146

Merged
merged 5 commits into from
Nov 17, 2023

Conversation

johnomotani
Copy link
Collaborator

The parameter scan functionality (previously provided by scan_input.jl and driver.jl) had become out of date and no longer worked. This PR replaces the functionality with parameter_scans.jl and run_parameter_scan.jl. The functionality is essentially the same, except that inputs can now be read from a TOML file, and all runs in a scan are gathered into a subdirectory.

@johnomotani johnomotani added the enhancement New feature or request label Nov 15, 2023
@johnomotani johnomotani force-pushed the makie_post_processing-update branch from 7b87b59 to ddd6998 Compare November 15, 2023 18:53
@johnomotani johnomotani force-pushed the parameter-scan-update branch from a7404aa to 92c1840 Compare November 15, 2023 18:55
@johnomotani johnomotani force-pushed the makie_post_processing-update branch from ddd6998 to adf3563 Compare November 15, 2023 22:05
@johnomotani johnomotani force-pushed the parameter-scan-update branch from 92c1840 to 9785c06 Compare November 15, 2023 22:07
@johnomotani johnomotani force-pushed the makie_post_processing-update branch from aeaec3d to e495284 Compare November 16, 2023 11:58
@johnomotani johnomotani force-pushed the parameter-scan-update branch from 9785c06 to d2e8491 Compare November 16, 2023 11:58
`run_type` was originally used as a setting to turn timer output on/off,
etc. However, having a const global variable means that moment_kinetics
has to be re-(pre-)compiled if the value is changed, which is
inconvenient.

Refactor so that timing info can be printed if a TimerOutput object is
passed to run_moment_kinetics(), so `run_type` is not needed for this.

Parameter scans will be re-implemented without using `run_type`.
If any directory on the path specified for a run directory does not
exist, then create it - use `mkpath()` instead of `mkdir()`.
The parameter scan functionality (previously provided by
`scan_input.jl` and `driver.jl`) had become out of date and no longer
worked. This commit replaces the functionality with `parameter_scans.jl`
and `run_parameter_scan.jl`. The functionality is essentially the same,
except that inputs can now be read from a TOML file, and all runs in a
scan are gathered into a subdirectory.
HDF5 seems to have a buffer overrun if file names are too long. Truncate
the scanned variable names to 3 characters to make this less likely to
happen.

Since the parameter scan saves its runs under a unique subdirectory
(named after the scan input file), there is no chance of accidentally
conflicting with the name of a run from a different scan.
The TimerOutput objects are not actually used, they are leftovers which
were required at one point to call run_moment_kinetics().
@johnomotani johnomotani force-pushed the parameter-scan-update branch from d2e8491 to 9b8bde1 Compare November 17, 2023 16:13
Base automatically changed from makie_post_processing-update to master November 17, 2023 16:49
@johnomotani johnomotani merged commit 01a8f29 into master Nov 17, 2023
7 of 21 checks passed
@johnomotani johnomotani deleted the parameter-scan-update branch November 17, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant