-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add support for shared config options #125
Conversation
This is used, among other things, to tell which steps are shared.
The `filepath` and `symlinks` attributes as well as the `setup()` method will help support shared config options.
This merge adds a list of `configs` to the component and a method for adding new ones (or checking for consistency if the config has already been added). It also adds `set_shared_config()` methods to both `Task` and `Step` that can be used to set a shared config parser, possibly with a local symlink.
TestingI have successfully run all ocean tasks (except RPE at 1 and 4 km) on Chrysalis with Intel and OpenMPI. I have verified that config files and symlinks appear in the expected locations, and that they retain the "raw" formatting that allows for extended interpolation (e.g. |
@cbegeman and @sbrus89, this is ready to review when you have time. The review can be at whatever level you have time for. The main thing I want to make sure of is that you are good with the changes I'm making at a conceptual level:
As always, suggestions (from broad to nit-picky) are welcome. |
ff2640f
to
0fb0025
Compare
I'm running into some issues when I try to change resolutions in the cosine bell tests. Please hold off on reviewing this for now. |
0fb0025
to
9a32d98
Compare
9a32d98
to
aa52c81
Compare
8c41314
to
d6103be
Compare
Since config files can now be added in the constructor, we do this instead. This will slightly increase load time but likely not enough to notice.
d6103be
to
a9e6f3c
Compare
a9e6f3c
to
130af80
Compare
With a few more bug fixes, this now works even when I modify the resolutions for cosine bell in a user config file as part of setting up the test cases. |
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.
@xylar Conceptually and practically, this all looks great! I ran cosine_bell (incl. editing the resolutions in the cfg file at setup) and one of the new sphere_transport cases rebased on this branch.
Great, thanks very much @cbegeman! I appreciate you taking the time to review and test! |
This merge adds the capability of sharing a
config
object across steps and tasks. This allows:The capability has been made possible by:
MpasConfigParser
in Add new features to config parser MPAS-Dev/MPAS-Tools#527PolarisConfigParser
to include afilepath
where it will be written and a list of symlinks that should be createdTask
andStep
for setting a shared config, which perform error checks, determine the paths for symlinks and add the config to the componentsetup
andrun.serial
modules to accommodate these other changesThe changes mean that it is now possible to add config files from the
polaris
package to theconfig
object at initialization, rather than having to use the task'sconfigure()
method. Sinceconfig
objects shared across tasks should ideally not be updated in a given task'sconfigure()
method, asetup()
method has been added toPolarisConfigParser
that can be overridden to perform more complex configuration as needed. So far, this capability is not being used.Tasks have also been modified to make use of the functionality:
baroclinic_channel.cfg
file in the resolution directoryicos
andqu
meshes now have their own config options in the shared step's directoryicos
andqu
versions of the tasks and steps.configure()
methods that are no longer needed.This merge requires updating to
mpas_tools
v0.24.0 to bring in the updates toMpasConfigParser
.Checklist
api.md
) has any new or modified class, method and/or functions listedTesting
comment in the PR documents testing used to verify the changes