Skip to content

Commit

Permalink
Message about using --parallel, and how other CWL runners are availab…
Browse files Browse the repository at this point in the history
…le. (#1671)

Add message about using --parallel, and how other CWL runners are available.
  • Loading branch information
tetron committed Jun 21, 2022
1 parent c23a9ed commit 88b9cfe
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cwltool/executors.py
Expand Up @@ -191,6 +191,15 @@ def check_for_abstract_op(tool: CWLObjectType) -> None:
return (self.final_output[0], self.final_status[0])
return (None, "permanentFail")

def message_about_other_runners(self) -> None:
_logger.info(
"Need to grow beyond `cwltool` and scale up your workflows to run on a multi-node cluster, or in the cloud?"
)
_logger.info(
"CWL workflows are portable and run on many commercial and open source platforms."
)
_logger.info("Visit https://www.commonwl.org/implementations/ to learn more.")


class SingleJobExecutor(JobExecutor):
"""Default single-threaded CWL reference executor."""
Expand All @@ -203,6 +212,10 @@ def run_jobs(
runtime_context: RuntimeContext,
) -> None:

_logger.info(
"Using default serial job executor. Use `cwltool --parallel` to run multiple steps at a time."
)

process_run_id = None # type: Optional[str]

# define provenance profile for single commandline tool
Expand Down Expand Up @@ -252,6 +265,7 @@ def run_jobs(
else:
logger.error("Workflow cannot make any more progress.")
break
self.message_about_other_runners()
except (
ValidationException,
WorkflowException,
Expand Down Expand Up @@ -416,6 +430,10 @@ def run_jobs(
runtime_context: RuntimeContext,
) -> None:

_logger.info(
"Using parallel job executor. Multiple steps will run at once as hardware resources permit."
)

self.taskqueue = TaskQueue(
threading.Lock(), psutil.cpu_count()
) # type: TaskQueue
Expand Down Expand Up @@ -456,6 +474,7 @@ def run_jobs(
finally:
self.taskqueue.drain()
self.taskqueue.join()
self.message_about_other_runners()


class NoopJobExecutor(JobExecutor):
Expand Down

0 comments on commit 88b9cfe

Please sign in to comment.