Skip to content

Fix Distribution.from_dim_data_per_rank#354

Merged
kwmsmith merged 15 commits into
masterfrom
refactor/fix-distribution-from-dim-data-per-rank
May 1, 2014
Merged

Fix Distribution.from_dim_data_per_rank#354
kwmsmith merged 15 commits into
masterfrom
refactor/fix-distribution-from-dim-data-per-rank

Conversation

@bgrant
Copy link
Copy Markdown
Contributor

@bgrant bgrant commented May 1, 2014

  1. Add a function to fill in missing dim_dict keys for the 'n' dist_type.
  2. Make a Distribution from a dim_data_per_rank before calling DistArray.from_localarrays to avoid communication (in functions that require it)

Based on #353.

Further addresses #337.

bgrant added 12 commits April 30, 2014 17:21
... 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.
Now for functions that take a dim_data_per_rank.
@bgrant bgrant added the bug label May 1, 2014
@bgrant bgrant added this to the 0.3 milestone May 1, 2014
Comment thread distarray/context.py
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bgrant
Copy link
Copy Markdown
Contributor Author

bgrant commented May 1, 2014

Comments addressed, @kwmsmith (except for the apply_async part).

@bgrant
Copy link
Copy Markdown
Contributor Author

bgrant commented May 1, 2014

Also, DistArray.fromfunction looks broken to me. I'll address that in a separate PR.

@kwmsmith
Copy link
Copy Markdown
Contributor

kwmsmith commented May 1, 2014

On Thu, May 1, 2014 at 1:19 PM, Robert David Grant <notifications@github.com

wrote:

Also, DistArray.fromfunction looks broken to me. I'll address that in a
separate PR.

Likely is -- I doubt we have any tests for it.


Reply to this email directly or view it on GitHubhttps://github.com//pull/354#issuecomment-41938757
.

Kurt W. Smith, Ph.D. ksmith@enthought.com
Enthought, Inc. http://www.enthought.com | 512.536.1057

@bgrant bgrant mentioned this pull request May 1, 2014
@kwmsmith
Copy link
Copy Markdown
Contributor

kwmsmith commented May 1, 2014

@bgrant please resolve any conflicts with master.

…r-rank

Conflicts:
	distarray/metadata_utils.py
@bgrant
Copy link
Copy Markdown
Contributor Author

bgrant commented May 1, 2014

@kwmsmith : Done.

kwmsmith added a commit that referenced this pull request May 1, 2014
…-dim-data-per-rank

Fix `Distribution.from_dim_data_per_rank`
@kwmsmith kwmsmith merged commit ed3b792 into master May 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants