cwltool.executors

Single and multi-threaded executors.

Module Contents

Classes

JobExecutor

Abstract base job executor.

SingleJobExecutor

Default single-threaded CWL reference executor.

MultithreadedJobExecutor

Experimental multi-threaded CWL executor.

NoopJobExecutor

Do nothing executor, for testing purposes only.

Attributes

TMPDIR_LOCK

cwltool.executors.TMPDIR_LOCK
class cwltool.executors.JobExecutor

Abstract base job executor.

__call__(self, process, job_order_object, runtime_context, logger=_logger)
Parameters
Return type

Tuple[Optional[cwltool.utils.CWLObjectType], str]

output_callback(self, out, process_status)

Collect the final status and outputs.

Parameters
  • out (Optional[cwltool.utils.CWLObjectType]) –

  • process_status (str) –

Return type

None

abstract run_jobs(self, process, job_order_object, logger, runtime_context)

Execute the jobs for the given Process.

Parameters
Return type

None

execute(self, process, job_order_object, runtime_context, logger=_logger)

Execute the process.

Parameters
Return type

Tuple[Union[Optional[cwltool.utils.CWLObjectType]], str]

class cwltool.executors.SingleJobExecutor

Bases: JobExecutor

Inheritance diagram of cwltool.executors.SingleJobExecutor

Default single-threaded CWL reference executor.

run_jobs(self, process, job_order_object, logger, runtime_context)

Execute the jobs for the given Process.

Parameters
Return type

None

class cwltool.executors.MultithreadedJobExecutor

Bases: JobExecutor

Inheritance diagram of cwltool.executors.MultithreadedJobExecutor

Experimental multi-threaded CWL executor.

Does simple resource accounting, will not start a job unless it has cores / ram available, but does not make any attempt to optimize usage.

select_resources(self, request, runtime_context)

Naïve check for available cpu cores and memory.

Parameters
Return type

Dict[str, Union[int, float]]

run_job(self, job, runtime_context)

Execute a single Job in a separate thread.

Parameters
Return type

None

wait_for_next_completion(self, runtime_context)

Wait for jobs to finish.

Parameters

self (cwltool.context.RuntimeContext) –

Return type

None

run_jobs(self, process, job_order_object, logger, runtime_context)

Execute the jobs for the given Process.

Parameters
Return type

None

class cwltool.executors.NoopJobExecutor

Bases: JobExecutor

Inheritance diagram of cwltool.executors.NoopJobExecutor

Do nothing executor, for testing purposes only.

run_jobs(self, process, job_order_object, logger, runtime_context)

Execute the jobs for the given Process.

Parameters
Return type

None

execute(self, process, job_order_object, runtime_context, logger=None)

Execute the process.

Parameters
Return type

Tuple[Optional[cwltool.utils.CWLObjectType], str]