[Dune] ALUGrid: GlobalIdSet crashes for refinement level > 10
Simon Praetorius
simon.praetorius at tu-dresden.de
Mon Jul 29 15:39:24 CEST 2019
> I'm sorry, but unless I missed some change that is not yet reflected by the
> documentation (https://dune-project.org/doc/grids/) 2D alugrid is no parallel.
ALUGrid works fine in 2D parallel. So, this documentation might be
outdated. The error can be reproduced in 3d for conforming and
nonconforming refinement and for cube elements as well.
> Still, the code you gave should simply be creating two independent sequential
> 2D alugrids. I'm don't know the internals of alugrids entity ids, but you'e
> creating 2^(2*11) elements on the finest level alone, which would require 22
> bits to distinguish. There's at least a similar number of entities for each
> of the other codimensions, plus all the entities on coarser levels.
>
> So my suspicion is that you're running out of bits in some part of the
> representation of alugrid's IDs.
That is the point, as written in a separate mail. The problem is that 11
levels is not much. I want to do 20-30 levels of refinement depth and
there is not necessarily an error, just a silent integer overflow that
produces wrong IDs. So, I would suggest to either change the way the IDs
are created, or change the integer type (e.g. use some biginteger type,
maby usedefined or with some compileflag)
Regards,
Simon
> Regards,
> Jö.
>
> Am Mo, 29. Jul 2019, 13:24:27 +0200 schrieb Simon Praetorius:
>> Date: Mon, 29 Jul 2019 13:24:27 +0200
>> From: Simon Praetorius <simon.praetorius at tu-dresden.de>
>> To: DUNE Liste <dune at lists.dune-project.org>
>> Subject: [Dune] ALUGrid: GlobalIdSet crashes for refinement level > 10
>> X-MGA-submission: MDF8aZf36I8h2sWdAiYEsTWqbVQcQC8YY0JPp9VEDM5QpUnZr3TGyML6pyqBK06OmF+ROUUOV24fAFb/H0mldy6wZcwG5zxqWLi1vO++LqqcBk1OXrWyasm4HmYLnE7XK/0oLkgqwGQf8TKOrJ55Gsi/
>> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
>> Thunderbird/60.8.0
>> Content-Language: en-US
>> X-TUD-Original-From: simon.praetorius at tu-dresden.de
>> X-TUD-Virus-Scanned: mailout5.zih.tu-dresden.de
>>
>> Hi Community,
>>
>> I'm trying to use ALUGrid in parallel with just 2 ranks (dim=dimworld=2,
>> elType=simplex, refType=conforming), create a grid using a
>> StructuredGridFactory and making the following three steps:
>>
>> 1. grid.loadBalance()
>> 2. grid.globalRefine(11)
>> 3. grid.globalIdSet()
>>
>> Whenever the global refinement level is > 10, I get an assertion in
>> `ALU3dGridGlobalIdSet::buildVertexIds()`:
>>
>>> Assertion `ids_[codim][vertex.getIndex()].isValid()' failed
>> What is the reason for this error? Do I do something wrong in the setup
>> of the grid? How to workaround this problem? I need a GlobalIdSet for
>> the setup of global communication.
>>
>> See below a minimal example. Tested with dune-2.6 and dune-git version.
>> Compiler gcc 7.3, openMPI 3.1.
>>
>> Best wishes,
>> Simon
>>
>> Minimal example:
>>
>> ```
>> #include "config.h"
>> #include <dune/alugrid/grid.hh>
>> #include <dune/common/filledarray.hh>
>> #include <dune/common/parallel/mpihelper.hh>
>> #include <dune/grid/utility/structuredgridfactory.hh>
>>
>> int main(int argc, char** argv)
>> {
>> Dune::MPIHelper::instance(argc, argv);
>>
>> using Grid = Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming>;
>> using Factory = Dune::StructuredGridFactory<Grid>;
>> auto grid = Factory::createSimplexGrid({0.0,0.0}, {1.0,1.0},
>> Dune::filledArray<2,int>(1));
>>
>> grid->loadBalance();
>> grid->globalRefine(11); // 10: OK, 11: ERROR
>> auto const& globalIdSet = grid->globalIdSet();
>> }
>> ```
>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at lists.dune-project.org
>> https://lists.dune-project.org/mailman/listinfo/dune
More information about the Dune
mailing list