[Dune] Dynamic load balancing with ALUGrid

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Sat Oct 27 09:43:48 CEST 2012


Is it not even so that one can not use an undexset at all? Load balancing changes the grid so the indexsets are not valid. You need to use id containers.
Andreas

Martin Nolte <nolte at mathematik.uni-freiburg.de> wrote:
Hi Bernd,

I have an educated guess for you (don't blame me, if I'm wrong):

In normal communication, you only communicate data on a certain grid view. Hence
you can use the index set to address data stored on that grid view.

When doing load balancing, you rather communicate data on the entire hierarchy.
Therefore, your entity might not be contained an index set (leading to this
cryptic assertion). So, if you want to communicate data only on a certain grid
view, you have to add a call to indexSet.contains to the gather / scatter / size
methods. Usually, fixedSize will be false in such situations (I think ALUGrid
ignores this anyway, so it should not matter, here).

Just a side note: In my opionion, a normal communicate method exchanging data on
the entire hierarchy would be nice, too. But alas, this method would naturally
be "grid().communicate( dataHandle, interface, direction )".

Best,

Martin

On 10/26/2012 01:32 PM, Bernd Flemisch wrote:
> Hey Andreas,
>
> thank you for your fast answer. This indeed solves my second issue. However, the
> first one remains. I attach an updated test file.
>
> Kind regards
> Bernd
>
> On 10/26/2012 01:08 PM, Dedner, Andreas wrote:
>> Hi Bernd
>>
>> You should be able to cast the derived class onto the interface class
>> and that triggers the call to the correct method.
>>
>> Andreas
>>
>> ________________________________________
>> From: dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org
>> [dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Bernd
>> Flemisch [bernd at iws.uni-stuttgart.de]
>> Sent: 26 October 2012 11:53
>> To: Dune
>> Subject: [Dune] Dynamic load balancing with ALUGrid
>>
>> Dear Dune,
>>
>> I try to use dynamic load balancing with ALUGrid. The grid itself gets
>> balanced nicely, but I don't succeed in getting data balanced.
>>
>> From dune/grid/alugrid/3d/grid.hh lines 701ff, I guess that I can pack
>> a "usual" data handle which is used for communication into a
>> ALUGridLoadBalanceDataHandle and call loadBalance with that handle. My
>> initial attempt to do this fails with
>> test-dynamiclb:
>> ../../../dune/grid/alugrid/common/defaultindexsets.hh:218:
>> Dune::DefaultIndexSet<GridImp, IteratorImp>::IndexType
>> Dune::DefaultIndexSet<GridImp, IteratorImp>::index(const typename
>> GridImp::Codim<cd>::Entity&) const [with int cd = 0; GridImp =
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>; IteratorImp =
>> Dune::EntityIterator<0, const
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>,
>> Dune::ALU3dGridLeafIterator<0, (Dune::PartitionIteratorType)4u, const
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u> > >;
>> Dune::DefaultIndexSet<GridImp, IteratorImp>::IndexType = unsigned int;
>> typename GridImp::Codim<cd>::Entity = Dune::Entity<0, 3, const
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>,
>> Dune::ALU3dGridEntity>]: Assertion `indexContainer( cd )[ en ].index()
>> >= 0' failed.
>>
>> I attach my effort, where I use a data handle copied from the
>> grid-howto. It would be great if you could take a look.
>>
>> I have a second issue: I guess that I should be able to call loadBalance
>> directly with a usual data handle, so that grid.hh lines 701ff takes
>> care of it and packs it for me into a ALUGridLoadBalanceDataHandle
>> before sending it to the real loadBalance method. However, since my data
>> handle is only inherited from CommDataHandleIF, the packing routine is
>> not triggered but the real loadBalance method is called directly leading
>> to a compilation error. How can I trigger the execution of the packing
>> routine for such a derived data handle?
>>
>> Thank you for having a look. Kind regards
>> Bernd
>>
>> --
>> _____________________________________________________________________
>>
>> Bernd Flemisch phone: +49 711 685 69162
>> IWS, Universität Stuttgart fax: +49 711 685 60430
>> Pfaffenwaldring 61 email: bernd at iws.uni-stuttgart.de
>> D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de<http://www.hydrosys.uni-stuttgart.de>
>> _____________________________________________________________________
>
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

--
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany

_______________________________________________
Dune mailing list
Dune at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20121027/be06bc9f/attachment.htm>


More information about the Dune mailing list