Fix Distribution.from_dim_data_per_rank#354
Conversation
... optionally, instead of grabbing distribution information from the engines. Also add an optional `dtype` kwarg so that can be passed in instead of pulling it from the engines.
1. `dist` should be optional, with a default value of `None`, as discusses 2. `make_grid_shape` takes a dist_tuple, not an arbitrary dist. The normalized dist (that is, a tuple), self.dist, wasn't being passed in here, the raw `dist` was.
Accidentally passing a dictionary into here has bitten me too many times. Apparently enumerate works on a dict, so an error won't be thrown here without the explicit check.
It didn't actually work when dtype was left None.
... for the 'n' dist_type.
Now for functions that take a dim_data_per_rank.
There was a problem hiding this comment.
I'd prefer it if we translated this _execute() call into an apply_async() call. That would allow us to do without the _key_and_push() round-trip, since we could just pass those in directly.
Perhaps that translation should be part of a follow-on PR.
|
Comments addressed, @kwmsmith (except for the apply_async part). |
|
Also, |
|
On Thu, May 1, 2014 at 1:19 PM, Robert David Grant <notifications@github.com
Kurt W. Smith, Ph.D. ksmith@enthought.com |
|
@bgrant please resolve any conflicts with |
…r-rank Conflicts: distarray/metadata_utils.py
|
@kwmsmith : Done. |
…-dim-data-per-rank Fix `Distribution.from_dim_data_per_rank`
dim_dictkeys for the 'n'dist_type.Distributionfrom adim_data_per_rankbefore callingDistArray.from_localarraysto avoid communication (in functions that require it)Based on #353.
Further addresses #337.