-
Notifications
You must be signed in to change notification settings - Fork 308
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
Add an argument to ipcluster plugin to specify the number of engines #547
base: develop
Are you sure you want to change the base?
Conversation
Does this allow you to set |
I wrote some similar logic: develop...cancan101:develop#diff-4774c0a25748eaab7628c5b506730127 (sorry its intermingled with a couple other changes). |
Yes, it allows you to set master engines to zero and set NODE_ENGINES as well. I've had problems where my master has gotten hammered by calculations and/or memory (even with This PR is a pretty simple way of accomplishing that (and the parameters are respected for ipclusterrestart as well) |
@@ -163,7 +165,10 @@ def _write_config(self, master, user, profile_dir): | |||
f.close() | |||
|
|||
def _start_cluster(self, master, profile_dir): | |||
n_engines = max(1, master.num_processors - 1) | |||
if not self.master_engines: |
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.
if self.master_engines == 0
won't this branch be taken? i.e. using 0
or None
to turn of the master will not work.
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.
Hmm... this works in testing. Let me figure this out.
Oh, actually, at this point in the execution, this is the string '0', which evaluates to true. This is bad and confusing, though, so I will change to check for "None". Thanks.
Also related to this PR: #538. |
…e truth of str(0)
Also addresses #538