Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeamSpec / balance_extents for 2D Distribution of 3D Data #689

Open
pauleonix opened this issue Feb 13, 2020 · 2 comments
Open

TeamSpec / balance_extents for 2D Distribution of 3D Data #689

pauleonix opened this issue Feb 13, 2020 · 2 comments

Comments

@pauleonix
Copy link

pauleonix commented Feb 13, 2020

I'm working on a 3-dim Stencil Code. When I tried to instead of using dash::BLOCKED in all three dimensions for the DistributionSpec, to use dash::NONE in the dimension of the linear index, I got problems b/c some units had zero volume.

The reason is certainly, that my TeamSpec (with no prior unit distribution given to the TeamSpec constructor) with units distributed to all three dimensions after using balance_extents doesn't combine with my DistributionSpec in a way that would be helpful.

I already tried to give only two dimensions to the TeamSpec, but then my program wont compile b/c the types are not compatible.

Is there a way to make this work without giving the unit distribution manually to TeamSpec? Maybe the balance_extents method should be modified to take an argument about which dimensions it should use?

I don't want to use a 2D dash::NArray, b/c that would make it more or less impossible to use the halo features how they are intended.

@devreal
Copy link
Member

devreal commented Feb 13, 2020

@Spielix I came across a similar problem. My solution was to create a 2D balanced TeamSpec and take the two dimensions of it as the first two input dimensions of the 3D TeamSpec:

  dash::TeamSpec<2> ts2d(dash::size(), 1);
  ts2d.balance_extents();
  dash::TeamSpec<3> ts(ts2d.extent(0), ts2d.extent(1), 1);

HTH!

@pauleonix
Copy link
Author

Thanks. That will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants