Steps
seq_execute()
Public: Runs a function or command as a step: from the process function of a task, it runs it, waits for it to end and returns an error if it fails.
The step runs in the shell of the task, whatever the scheduler of the run, unless the function is a sequential process with “sched=SLURM” (see add_debasher_seq_process): such a step runs through srun (see seq_execute_slurm), with the computational specifications of the sequential process. The step reads the standard input of the call, so a step inside a loop that reads its standard input takes its own from /dev/null.
$1 - Function or command to execute.
$2.. - Its arguments, passed as they are given.
Examples:
seq_execute transform "${value}" "${outd}/result.txt" < /dev/null
Returns 1 if the step failed or could not be launched.
mark_step_done()
Public: Marks a step as done, by creating its step marker (see debasher::mark_step_done). The engine never reads a step marker: a process that wants to skip the steps that an earlier run finished checks them itself with is_step_done.
$1 - Directory of the step marker.
$2 - Id of the step, unique within the directory.
Examples:
mark_step_done "${outd}" "${id}_${base}_${checksum}"
Returns 1 if the marker could not be created or already existed.
is_step_done()
Public: Tells whether a step has been marked as done with mark_step_done.
$1 - Directory of the step marker.
$2 - Id of the step.
Examples:
is_step_done "${outd}" "${id}_${base}_${checksum}" || seq_execute work "${base}"
Returns 0 if the step marker exists, 1 otherwise.
seq_execute_slurm()
Public: Runs a function or command as a job step of Slurm, with srun, and waits for it to end, whatever the scheduler of the program (see debasher::seq_execute_slurm). When the function is a sequential process (see add_debasher_seq_process), its computational specifications become options of srun; a sequential process with “sched=BUILTIN” is refused.
$1 - Function or command to execute.
$2.. - Its arguments, passed as they are given.
Examples:
seq_execute_slurm transform "${value}" "${outd}/result.txt"
Returns 1 if the step could not be launched or failed, or was refused.