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

Add an argument to ipcluster plugin to specify the number of engines #547

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

clearf
Copy link

@clearf clearf commented Aug 5, 2015

  • Add parameters MASTER_ENGINES and NODE_ENGINES for the ipcluster and ipclusterrestart plugins to allow for the specification of a certain number of engines on the master and nodes, respectively.
    • This is useful to run no calculations on the master (which can deplete resources and cause the master to hang), and
    • Use e.g., scikit-learn's native joblib support (e.g., using jobs=-1) to enable multiprocessing on the nodes and reduce the amount of message passing around machines in the cluster.

Also addresses #538

@cancan101
Copy link

Does this allow you to set master_engines to 0?

@cancan101
Copy link

I wrote some similar logic: develop...cancan101:develop#diff-4774c0a25748eaab7628c5b506730127 (sorry its intermingled with a couple other changes).

@clearf
Copy link
Author

clearf commented Aug 6, 2015

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 master_engines = num_processors-1 engines), and the whole cluster has timed out.

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:

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.

Copy link
Author

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.

@cancan101
Copy link

Also related to this PR: #538.

dantreiman added a commit to dantreiman/StarCluster that referenced this pull request Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants