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

Update pegasus_workflow.py #4936

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pycbc/workflow/pegasus_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,13 @@ def set_subworkflow_properties(self, output_map_file,
# change the attribute here.
# WORSE, we only want to set this if the pegasus *planner* is version
# 5.0.4 or larger
sproc_out = subprocess.check_output(['pegasus-version']).strip()
sproc_out = sproc_out.decode()
if version.parse(sproc_out) >= version.parse('5.0.4'):
try:
sproc_out = subprocess.check_output(['pegasus-version']).strip()
sproc_out = sproc_out.decode()
Copy link
Member

Choose a reason for hiding this comment

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

@spxiwh Is there a reason we don't just require >= 5.0.4 anyway?

Copy link
Contributor

Choose a reason for hiding this comment

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

No real reason why we couldn't do that.

if version.parse(sproc_out) >= version.parse('5.0.4'):
output_map_file.for_planning=True
except:
logging.warning("Could not execute pegasus-version, assuming >= 5.0.4")
output_map_file.for_planning=True
self.add_inputs(output_map_file)

Expand Down
Loading