Skip to content

Add grid_shape pre/postcondition checks.#427

Merged
kwmsmith merged 14 commits into
enthought:masterfrom
cowlicks:grid-conditions
Jun 11, 2014
Merged

Add grid_shape pre/postcondition checks.#427
kwmsmith merged 14 commits into
enthought:masterfrom
cowlicks:grid-conditions

Conversation

@cowlicks
Copy link
Copy Markdown
Contributor

@cowlicks cowlicks commented Jun 5, 2014

This PR adds the checks we want on grid_shape.

Closes #406

cowlicks added 9 commits June 9, 2014 14:20
Now when the number of distributed dimensions is one, and there are
fewer elements than the number of engines. Then distributed dimension
will be distributed across 1 engine per element.

Previously it was distributed across all engines, but since in this case
there are fewer elements than engines, some engines were left with empty
distarrays.
@kwmsmith kwmsmith added this to the 0.4 milestone Jun 10, 2014
@cowlicks
Copy link
Copy Markdown
Contributor Author

The codebase should now be compliant with the requirements in issue #406

Comment thread distarray/dist/maps.py Outdated
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.

ntargets = reduce(operator.mul, grid_shape, 1)
assert ntargets <= len(all_targets)
self.targets = all_targets[:ntargets]

?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.05%) when pulling 0fa622b on cowlicks:grid-conditions into 8347fcb on enthought:master.

@kwmsmith
Copy link
Copy Markdown
Contributor

👍

kwmsmith added a commit that referenced this pull request Jun 11, 2014
Add grid_shape pre/postcondition checks.
@kwmsmith kwmsmith merged commit 9185085 into enthought:master Jun 11, 2014
@cowlicks cowlicks deleted the grid-conditions branch June 11, 2014 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make_grid_shape / normalize_grid_shape refactoring

3 participants