[Dune] GridPtr: distribution of element and vertex parameters

Bernd Flemisch bernd at iws.uni-stuttgart.de
Tue Sep 18 09:38:43 CEST 2012


Hey Martin,

thank you for your fast answer, I think I understand more now.

In fact, UGGrid also reads the macro grid onto one process and then 
distributes it by means of the loadBalance(void) method. It is for this 
first static load balancing step that I think it should be feasible to 
also distribute the data. What people always warn us about is to have a 
real dynamic load balancing, i.e. to balance after a grid adaptation has 
been performed. Although I don't know what the underlying problem is / 
will be.

Kind regards
Bernd

On 09/18/2012 09:24 AM, Martin Nolte wrote:
> Hi Bernd,
>
> I guess you have hit upon a part of the Dune grid interface that has 
> not been thoroughly discussed: grid.loadBalance( dataHandle ). As far 
> as I'm aware of, this method is only implemented for ALUGrid (or meta 
> grids build on top of it).
>
> The semantics is as follows: loadBalance redistributes the grid 
> between the set of processors. This means that entities are migrated 
> from one process to another. But we need to migrate the data, too. 
> Therefore, all data specified by the data handle (see Dune 
> communication interface) is sent along with the entities. The only 
> real difference between communication on a grid view and load balance 
> is that load balance performs the communication on the hierarchical 
> grid (of course, such a communicate method should also exist; 
> unfortunately, it does not).
>
> Now to your problem: As far as I understood, it is not so easy 
> implement dynamic load balancing for UGGrid. Instead, static load 
> balancing is performed at creation time. I guess, this means you are 
> reading the DGF file on each process, i.e., all processes already know 
> their parameters (note that, in contrast, ALU reads everything on 
> process 0). So, if I understand correctly, you can safely ignore the 
> call to load balance, since it does not redistribute the grid, anyway.
>
> The call to communicate is used only to copy interior data to ghosts. 
> This is needed for ALUGrid, because ghosts do not exist natively. 
> Since the algorithm usually performs the necessary extra communication 
> anyway, ALUGrid does not perform this communication.
>
> I hope this explains the status quo. If further problems arise, it 
> might be better to discuss them on the flyspray.
>
> Just a final side note: In my opinion, a thorough discussion of the 
> parallel grid interface is in order anyway (on one of the next meetings).
>
> Best,
>
> Martin
>
> On 09/18/2012 08:55 AM, Bernd Flemisch wrote:
>> Dear Dune,
>>
>> we would like to implement the distribution of a GridPtr's element 
>> and vertex
>> parameters for UGGrid. The corresponding lines 249ff in gridptr.hh are
>>          DataHandle dh(*this);
>>          gridPtr_->loadBalance( dh.interface() );
>>          gridPtr_->communicate( dh.interface(),
>> InteriorBorder_All_Interface,ForwardCommunication);
>> Since the DataHandle below is not documented and since the 
>> documentation of
>> the loadBalance(DataHandle&) method of the grid is not giving me any 
>> clue:
>> Could you please explain me in a bit more detail what these three 
>> lines are
>> supposed to do? In particular, I do not know which part is done by the
>> loadBalance and which part by the communicate method. What is 
>> supposed to
>> happen with the DataHandle parameter inside the loadBalance method?
>>
>> Thank you. 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
_____________________________________________________________________





More information about the Dune mailing list