[IPython-dev] Node in cluster know its rank, or cluster size?
Doug Blank
doug.blank at gmail.com
Wed Sep 10 10:14:54 EDT 2014
After reading the docs and tutorial on the parallel tools, and looking at
defined variables in the remote environment, I couldn't find a place where
a node in a cluster (not using mpi, but just starting the cluster via the
notebook with default profile) knows its rank (or some id) and knows the
cluster size.
Is rank and size information available to a node in the cluster?
I guess this could work:
view["size"] = len(view)
def set_rank(n):
global rank
rank = n
view.execute("""
def set_rank(n):
global rank
rank = n
""")
view.map(set_rank, range(len(view)))
Better way? My parallel-foo is week.
-Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140910/5257b6d5/attachment.html>
More information about the IPython-dev
mailing list