Skip to content
Snippets Groups Projects

Enable gmashreader for parallel programs

Closed René Heß requested to merge feature/parallelgmshreader into master

This makes it possible to use gmshreader for parallel programs similar to StructuredGridFactory by only filling the grid factory if rank==0.

Merge request reports

Closed by avatar (Mar 14, 2025 1:11am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • What made you think that the old code doesn't work and with which grids did you test?

    I'm pretty sure that this code will fail with UG, as UG needs the boundary parameterization on every rank. With your code the grid is only read on rank 0 and thus the parameterization is only available n rank 0.

    For the old alugrid the situation was, that you must read the grid on rank 0 only. I'm not sure about the status for the new dune-alugrid, which contains extensions for the grid factory.

  • What made you think that the old code doesn't work and with which grids did you test?

    Well, we tried to use dune-alugrid with the existing gmshreader and that definitely didn't work. So the new code does what the StructuredGridFactory does, which only creates the grid on rank 0. I'm pretty sure that UG works with the factory...

    I'm pretty sure that this code will fail with UG, as UG needs the boundary parameterization on every rank. With your code the grid is only read on rank 0 and thus the parameterization is only available n rank 0.

    I don't know about the boundary parameterization (@oliver.sander: Can you say something about that?). René didn't test his code with UG, because he was working on adding load balancing to PDELab, and IIRC, UG can only be loadbalanced once, doesn't it? Apart from that, the data backup / restore, which requires iterating over entities of all codimensions that have data attached, is a real pain in UG due to the lack of iterators for intermediate codimensions...

    So maybe we are in the rather unfortunate situation that ALUGrid and UG need different things from the reader?

  • So maybe we are in the rather unfortunate situation that ALUGrid and UG need different things from the reader?

    at least this my current state. Thus the gmshreader didn't include the corresponding if(rank == 0), but the user had to add it to his code. I agree... this is really unfortunate. The boundary parameterization doesn't matter for the StructuredGridFactory as it doesn't need boundary projections.

  • UG does need the parametrization on every rank. However, unless you explicitly specify a boundary parametrization, everything should just work, as the necessary information is communicated from rank 0 to all other processes.

    UGGrid can be load balanced as many times as you like, but there appear to be a few bugs. Your mileage may vary.

  • Christian Engwer Status changed to closed

    Status changed to closed

Please register or sign in to reply
Loading