-
Notifications
You must be signed in to change notification settings - Fork 61
fix issue that parallel gets set to None with EB 5+ #1104
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,6 +136,8 @@ def post_ready_hook(self, *args, **kwargs): | |
parallel_param = 'max_parallel' | ||
# get current parallelism setting | ||
parallel = self.cfg[parallel_param] | ||
if parallel == None: | ||
return # self.cfg doesn't contain 'parallel' or 'max_parallel' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This exits too early, it may be the case that this is That's an open framework PR though so I can be pragmatic. In general this query is triggered for every easyconfig, but in reality you only need to know it if you plan on changing it. The query should happen inside the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
if parallel == 1: | ||
return # no need to limit if already using 1 core | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better with EasyBuild 5.x would be to use
self.cfg.parallel
instead ofself.cfg['parallel']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I think the information gathering here is in the wrong place. You only need to do this if you plan to change the parallelism, so this whole block could be moved to when you need it, right before
if new_parallel != parallel:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry,
operation_func
requires it (right now), but at it should at least be within theif
statement