Distribution.from_shape is producing localarrays with size 0

Open
#442 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Reproduce the four-engine example using Distribution.from_shape and localshapes, then inspect distarray/metadata_utils.py at line 143 and the surrounding grid-shape calculation. Determine how the communicator size affects an axis that is not evenly divisible, and consider the issue done when the same distribution no longer produces a zero-sized localarray.

Written by the indexing model from the issue text.

Description

bug

With 4 engines:

In [1]: from distarray.dist import Context, Distribution

In [2]: context = Context()

In [3]: distribution = Distribution.from_shape(context, (9, 8), dist=('b', 'n')) 

In [4]: distribution.localshapes()
Out[4]: [(3, 8), (3, 8), (3, 8), (0, 8)]

This appears to be from this line.

The size of this axis of the grid_shape is set to comm_size, which doesn't divide into the size of the corresponding axis of the DistArray.

Dominant language
Python
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from enthought/distarray

All issues in enthought/distarray

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.