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

Handle solver_params.xml #65

Open
merijn opened this issue Oct 29, 2019 · 8 comments
Open

Handle solver_params.xml #65

merijn opened this issue Oct 29, 2019 · 8 comments
Assignees
Milestone

Comments

@merijn
Copy link
Collaborator

merijn commented Oct 29, 2019

Currently Ocean, CoupledModel and Topo independently load solver_params.xml. The problem with this situation is that Ocean's parameters are split over two (well, three, see discussion of THCM in #64) parameter lists. Initially I was going to make the solver params a sublist of the Ocean parameters so that CoupledModel and Topo could just query them from the underlying model. This doesn't work directly, since CoupledModel and Topo would inherit the default parameter values of Ocean which don't match their current default solver parameters.

The alternative solution is to duplicate the current solver_params.xml contents to the parameter lists of Ocean, CoupledModel, and Topo, but this only makes sense if the values don't have to be kept in sync across these.

@merijn merijn self-assigned this Oct 29, 2019
@Sbte
Copy link
Member

Sbte commented Oct 29, 2019

I suggest actual parameter lists are only loaded from the main files, and then indeed combined into one with sublists.

Ocean, CoupledModel and Topo should only use a solver when being run as "main" problem. So when CoupledModel is used, Ocean does not use its solver (as far as I know). So no need for synchronization or duplication.

@merijn
Copy link
Collaborator Author

merijn commented Nov 29, 2019

@Sbte I ran into an issue where test_topo lists several "Topo" parameters for the solver, but those don't seem to actually ever get passed to the solver? That doesn't seem right...

@Sbte
Copy link
Member

Sbte commented Nov 29, 2019

What do you mean exactly? The ones I found get passed to the solver in topo/Topo.H

@merijn
Copy link
Collaborator Author

merijn commented Nov 29, 2019

Ah! I was just looking at the Ocean part of things, I forgot that solver_params.xml also gets used by other parts of the code.

@Sbte
Copy link
Member

Sbte commented Nov 29, 2019

Well, since you're implementing it with sublists now, you can make it a Topo -> Solver sublist, and get rid of the "Topo " part of the parameter name. That looks like a much nicer way of doing it.

@merijn
Copy link
Collaborator Author

merijn commented Nov 29, 2019

Yeah, I'll do that and have both Topo and Ocean read the same solver_params.xml (since they're currently the same), if someone ever needs a different config they just need to read in a different file for Topo in the test/code.

@Sbte
Copy link
Member

Sbte commented Nov 29, 2019

I'm already getting excited about the huge number of lines that you can remove in the near future.

@Sbte
Copy link
Member

Sbte commented Feb 4, 2020

Mostly fixed by 9bec0eb, but still has to be fixed in CoupledModel.

@Sbte Sbte added this to the Code paper milestone Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants