Rocoto#
Rocoto is a workflow engine designed for scheduling and executing tasks in scientific computing and climate modeling. It is ideal for automating and managing complex workflows by providing a framework for defining and scheduling tasks. Rocoto is often used in research environments where there is a need to coordinate the execution of various jobs, ensuring they run in the right order and handle dependencies efficiently. Rocoto supports job submission to various computing environments and allows users to specify workflows using XML configuration files.
The following Rocoto workflow suite is utilized for the examples within.
<?xml version="1.0" ?>
<!DOCTYPE workflow [
<!ENTITY PSLOT "HELLO_WORLD">
<!ENTITY EXPTDIR "/work/UFS/ufs_engines">
<!ENTITY MAXTRIES "2">
]>
<workflow realtime="T" scheduler="slurm">
<log>
<cyclestr>./HELLO_WORLD.log.@Y@m@d@H</cyclestr>
</log>
<cycledef group="breakfast">* 6 * * * *</cycledef>
<cycledef group="lunch">* 12 * * * *</cycledef>
<cycledef group="dinner">* 18 * * * *</cycledef>
<task name="eggs" cycledefs="breakfast" maxtries="2">
<command>/path/to/ufs_engines/jobs/JJOBS_EGGS</command>
<stderr>/path/to/ufs_engines/work/eggs.err</stderr>
<stdout>/path/to/ufs_engines/work/eggs.out</stdout>
<account>account_name</account>
<queue>queue_name</queue>
<walltime>20:00</walltime>
<cores>1</cores>
<dependency>
<timedep>
<cyclestr offset="50:00">@Y@m@d@H@M@S</cyclestr>
</timedep>
</dependency>
</task>
<task name="ham" cycledefs="lunch" maxtries="2">
<command>/path/to/ufs_engines/jobs/JJOBS_HAM</command>
<stderr>/path/to/ufs_engines/work/ham.err</stderr>
<stdout>/path/to/ufs_engines/work/ham.out</stdout>
<account>account_name</account>
<queue>queue_name</queue>
<walltime>20:00</walltime>
<cores>1</cores>
<dependency>
<taskdep task="eggs" state="succeeded"/>
</dependency>
</task>
<task name="spam" cycledefs="dinner" maxtries="2">
<command>/path/to/ufs_engines/jobs/JJOBS_SPAM</command>
<stderr>/path/to/ufs_engines/work/spam.err</stderr>
<stdout>/path/to/ufs_engines/work/spam.out</stdout>
<account>account_name</account>
<queue>queue_name</queue>
<walltime>20:00</walltime>
<cores>1</cores>
<dependency>
<or>
<and>
<timedep>
<cyclestr offset="0:00">@Y@m@d@H@M@S</cyclestr>
</timedep>
<taskdep task="eggs" state="succeeded"/>
<taskdep task="ham" state="succeeded"/>
</and>
<and>
<timedep>
<cyclestr offset="0:00">@Y@m@d@H@M@S</cyclestr>
</timedep>
<taskdep task="eggs" state="succeeded"/>
<taskdep task="ham" state="dead"/>
</and>
<and>
<timedep>
<cyclestr offset="0:00">@Y@m@d@H@M@S</cyclestr>
</timedep>
<taskdep task="ham" state="succeeded"/>
<taskdep task="eggs" state="succeeded"/>
</and>
<and>
<timedep>
<cyclestr offset="-4:00">@Y@m@d@H@M@S</cyclestr>
</timedep>
<taskdep task="eggs" state="succeeded"/>
<taskdep task="ham" state="dead"/>
</and>
<and>
<timedep>
<cyclestr offset="-4:00">@Y@m@d@H@M@S</cyclestr>
</timedep>
<taskdep task="egg" state="dead"/>
<taskdep task="ham" state="dead"/>
</and>
</or>
</dependency>
</task>
</workflow>
The above graph represents a Rocoto HELLO_WORLD application. This
suite cycles the HELLO_WORLD task at 6-hour intervals (e.g.,
21,600 seconds) for 24 hours, starting at 0000 UTC on January 1,
2000.”