[Dune] GmshReader.

Timo Koch timo.koch at iws.uni-stuttgart.de
Mon Apr 1 19:19:48 CEST 2019


On 31.03.19 14:26, Robert.Kloefkorn at norceresearch.no wrote:
> Dear DUNE community,
>
> a recent patch for GmshReader in dune-grid to allow for distributed
> boundary segment projections was just merged to the master. As a side
> effect, to register some necessary factory methods, the read method of
> GmshReader needs to always be called on *all cores*. You may want to
> check all calls of
>
> GmshReader<GridType>::read
>
> in your own applications. The variations of the method read that create
> a grid with GmshReader need to be called on *all cores* in a parallel
> program. Inside the read call the GmshReader already takes care of gmsh
> files only be read on rank 0. The following call which you may find in
> your application will lead to a deadlock:
>
> if(Dune::MPIHelper::getCollectiveCommunication().rank() == 0)
>    GmshReader<GridType>::read(inputName);
>
> To fix this simply remove the if statement, e.g.
>
> GmshReader<GridType>::read(inputName);
>
> As mentioned, the check for only rank 0 reading the file is and was
> already done inside GmshReader<GridType>::read.

Hi Robert,

I don't see where this is done in Dune 2.6. What do you mean by "was 
already done"?

If I want my code to work with releases/2.6 and master I need the 
preprocessor version macros, right?

Best wishes

Timo

>
> With best regards,
>
> Robert
> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> https://lists.dune-project.org/mailman/listinfo/dune

-- 
_______________________________________________________________

Timo Koch                              phone: +49 711 685 64676
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61        email: timo.koch at iws.uni-stuttgart.de
D-70569 Stuttgart            url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________





More information about the Dune mailing list