CrayLabs / SmartSim

SmartSim Infrastructure Library.
BSD 2-Clause "Simplified" License
235 stars 37 forks source link

Job dependance feature #98

Open Spartee opened 3 years ago

Spartee commented 3 years ago

Description

sometimes in a workflow, you only want something to run if the job before it ran successfully without error. This should be possible through a few small additions to SmartSim

Implementation Strategy

Methods will be added to the EntityList and Entity base classes that specify dependance on other jobs.

ex.

from smartsim import Experiment
exp = Experiment("hello_world", launcher="local")
model = exp.create_model("model_1")
model_2 = exp.create_model("model_2")

# set instance variable in model_2
model_2.depends_on(model)

then when the script goes to run model_2, we will do a controller check on the status of the previous job. If the job isn't there (wasn't run) or failed, then model_2 will not launch.

mellis13 commented 1 year ago

Tagging #249 in this issue because the solution #249 might address this issue.