Skip to main content

Directives

Directives are optional settings that affect the execution of the current process. They are declared at the top of a process definition, before any input, output, or script section.

By default, directives are evaluated when the process is defined. However, if the value is a dynamic string or closure, it will be evaluated separately for each task. See Dynamic directives for more information.

Directives can also be specified in a configuration file using the process config scope, which is the recommended way to configure a pipeline for a particular compute environment. See Process configuration for more information.

Some directives are only supported by specific executors. See Executors for more information about each executor.

The following directives are available:

DirectiveDescription
acceleratorThe number of hardware accelerators (e.g. GPUs) required by each task.
afterScriptA Bash snippet to execute after the task script.
archThe CPU architecture to build the software required by each task.
arraySubmit tasks as job arrays, for executors that support it.
beforeScriptA Bash snippet to execute before the task script.
cacheWhether and how task executions are cached.
clusterOptionsAdditional submission options for grid executors.
condaThe set of Conda packages required by each task.
containerThe container image required by each task.
containerOptionsAdditional options for the underlying container runtime.
cpusThe number of CPUs required by each task.
debugPrint the standard output of each task to the pipeline standard output.
diskThe amount of disk storage required by each task.
errorStrategyHow to handle task failures.
executorThe underlying system where tasks are executed.
extA generic directive for user-defined properties.
fairEmit process outputs in the order in which they were received.
hintsExecutor-specific hints, specified as key-value pairs.
labelA custom label, used to apply shared process configuration.
machineTypeA predefined machine type for cloud executors that support it.
maxErrorsThe maximum number of task failures allowed for a process.
maxForksThe maximum number of concurrent task executions for a process.
maxRetriesThe maximum number of times a task can be retried.
maxSubmitAwaitHow long a task can remain in the submission queue before failing.
memoryThe amount of memory required by each task.
moduleThe set of Environment Modules required by each task.
penvThe parallel environment to use when submitting tasks to SGE.
podPod-specific settings for the Kubernetes executor.
publishDirPublish matching process output files to a target directory.
queueThe queue to which tasks should be submitted.
resourceLabelsCustom name-value pairs to attach to task executions.
resourceLimitsEnvironment-specific limits for task resource requests.
scratchExecute each task in a temporary directory local to the compute node.
secretThe secrets required by each task.
shellA custom shell command for process scripts.
spackThe set of Spack packages required by each task.
stageInModeHow input files are staged into the task directory.
stageOutModeHow output files are staged out of the scratch directory.
storeDirStore task outputs in a permanent store directory.
tagA custom identifier for each task execution.
timeThe maximum runtime for each task.

See also

On this Page