[Dune] GmshReader.

Robert.Kloefkorn at norceresearch.no Robert.Kloefkorn at norceresearch.no
Sun Mar 31 14:26:49 CEST 2019


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.

With best regards,

Robert


More information about the Dune mailing list