Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message about using --parallel, and how other CWL runners are available. #1671

Merged
merged 6 commits into from
Jun 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions cwltool/executors.py
Original file line number Diff line number Diff line change
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.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe shorten it a bit? Perhaps dropping the first line, leaving just the part about "CWL workflows are portable and run .... Visit https:///...".



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."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

)

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