-
Notifications
You must be signed in to change notification settings - Fork 38
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 command-line args to the Step class and a ModelStep base class #430
Closed
Conversation
This file contains 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
c617478
to
f642129
Compare
TestingThe Further testing is needed to make sure the following test groups that are not in
|
f642129
to
4311d89
Compare
This class defines a step for running the MPAS model as part of a test case. Eventually, each step that currently calls `run_model()` should instead descend from `ModelStep`
Also separate initial_state into initial_state and mesh
This involves breaking the `initial_state` step into 4 steps: * convert base mesh * compute initial condition (including land mask) on base mesh * cull mesh * compute initial condition on culled mesh
4311d89
to
5c66ffc
Compare
Merged
I'm going to close this PR and move this work to Polaris once we have a repo for it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
framework
in progress
This PR is not ready for review or merging
ocean
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.
For task parallelism, it is necessary for steps to use a consistent number of resources. A compass step can no longer have a python piece followed by an MPI-parallel piece.
Currently, combination python and MPI steps are common in compass. Many such steps involve setting up a model run in some way in python before running the model with MPI. More complex steps may run the model multiple times, performing python operations between each model run. Other such steps include those that generate mapping files (using
ESMF_RegridWeightGen
run with MPI).To support task parallelism, it will be necessary to break these steps into smaller steps, each either running python code or MPI code. This is necessary because each step will be called with
srun
and the specified resources (e.g.ntasks
,cpus_per_task
, or sometimes both). The python code must be run withntasks = 1
, while the MPI code typically is run withntasks > 1
. @altheaden and I took a good deal of time to investigate breaking steps in to "substeps" to support different numbers of resources. Ultimately, the complexity of both the concepts and the code itself was worse than if we just break current steps into multiple steps with unique resources.As a significant step toward this goal, this PR:
args
attribute to theStep
class. Ifargs
is defined, the step'srun()
method isn't called (and shouldn't be overridden). Instead, the contents ofargs
should be a list of command-line arguments to be called withsrun
(ormpirun
on a laptop) and an appropriate set of resources. Running the model is an obvious example of this, as we discuss next.ModelStep
class for reducing the amount of redundancy involved in making steps that run the MPAS model. This class descends fromStep
and takes care of work like creating graph and partition files, updating PIO namelist options, etc. that are needed before running the model. It also automatically creates theargs
attribute used to run the model itself.ModelStep
Migrated test groups:
baroclinic_channel
drying_slope
global_convergence
gotm
hurricane
internal_waves
planar_convergence
soma
sphere_transport
spherical_harmonic_transform
ziso
Not migrated (typically because of the complexity of SSH adjustment for ice-shelf cavities):
global_ocean
ice_shelf_2d
isomip_plus