<div dir="ltr"><div>I tried 2.3 in the above, but then later realised that MacroGridView is not part of dune-alugrid/dune/alugrid/2d/alugrid.hh. Despite changing to 2.4 throws other errors for repartition(). <br></div><div><div class="breadcrumb js-zeroclipboard-target"><br></div>
  </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 9, 2015 at 10:33 PM, Andreas Dedner <span dir="ltr"><<a href="mailto:a.s.dedner@warwick.ac.uk" target="_blank">a.s.dedner@warwick.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi.<br>
    Which alugrid are you using? As you will see from the grid
    documentation<br>
       
<a href="http://users.dune-project.org/projects/main-wiki/wiki/Grid-Manager_Features" target="_blank">http://users.dune-project.org/projects/main-wiki/wiki/Grid-Manager_Features</a><br>
    in any of the official versions dune-alugrid or the older alugrid
    1.5* does not provide<br>
    a distributed grid. The repartition method is therefore also not yet
    implemented in the<br>
    master branch. We are in the process of merging support for 2d
    parallel grids into<br>
    the master.<br>
    Andreas<div><div class="h5"><br>
    <br>
    <div>On 09/08/15 19:49, Ganesh Diwan wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      
      <div dir="ltr">
        <div>
          <div>Hi Dune<br>
            <br>
          </div>
          I am trying to run the test example for loadbalancing <br>
          (/dune-alugrid/examples/loadbalance) for GRIDDIM=2 by
          invoking:<br>
        </div>
        <div>make main_zoltan GRIDDIM=2 WORLDDIM=2 GRIDTYPE=ALUGRID_CUBE<br>
          <br>
        </div>
        <div>But I get the following long error message. Am I passing
          the flags for 2D correctlyor do I have to make any additional
          changes to ?<br>
        </div>
        <div>I can build the exe for GRIDDIM=3 fine though. <br>
        </div>
        <div><br>
        </div>
        <div><br>
          g++-4.8 -std=c++11 -DHAVE_CONFIG_H -I. -I../.. 
          -I/home/gcd3/dune/core/dune-common-2.3.0
          -I/home/gcd3/dune/core/dune-common-2.3.0
          -I/home/gcd3/dune/core/dune-geometry-2.3.0
          -I/home/gcd3/dune/core/dune-geometry-2.3.0
          -I/home/gcd3/dune/core/dune-grid-2.3.0
          -I/home/gcd3/dune/core/dune-grid-2.3.0 -I../..  
          -I/home/gcd3/dune/external/builds/Zoltan_v3.81/include
          -DENABLE_ZOLTAN=1 -I/usr/lib/openmpi/include
          -I/usr/lib/openmpi/include/openmpi -pthread -DMPIPP_H
          -DENABLE_MPI=1 -I/usr/lib/openmpi/include
          -I/usr/lib/openmpi/include/openmpi -pthread -DMPIPP_H
          -DENABLE_MPI=1 -I/usr/include  -DENABLE_PARMETIS=1 
          -DENABLE_ZLIB=1  -DBALL -I/usr/lib/openmpi/include
          -I/usr/lib/openmpi/include/openmpi -pthread -DMPIPP_H
          -DENABLE_MPI=1 -DGRIDDIM=2 -DWORLDDIM=2 -DALUGRID_CUBE
          -DUSE_ZOLTANLB=1   -g -O2 -Wall -MT main_zoltan-main.o -MD -MP
          -MF .deps/main_zoltan-main.Tpo -c -o main_zoltan-main.o `test
          -f 'main.cc' || echo './'`main.cc<br>
          main.cc: In function ‘void method(int, int, int, const char*,
          int)’:<br>
          main.cc:113:10: error: ‘Grid’ has no member named
          ‘repartition’<br>
               grid.repartition( ldb ); <br>
                    ^<br>
          In file included from main.cc:24:0:<br>
          loadbalance_zoltan.hh: In instantiation of ‘void
          ZoltanLoadBalanceHandle<Grid>::generateHypergraph()
          [with Grid = Dune::ALUGrid<2, 2,
          (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>]’:<br>
          loadbalance_zoltan.hh:107:24:   required from ‘bool
          ZoltanLoadBalanceHandle<Grid>::repartition() [with Grid
          = Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>]’<br>
          main.cc:112:24:   required from here<br>
          loadbalance_zoltan.hh:298:40: error: no type named
          ‘MacroGridView’ in ‘class Dune::ALUGrid<2, 2,
          (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>’<br>
             typedef typename Grid::MacroGridView GridView;<br>
                                                  ^<br>
          In file included from fvscheme.hh:9:0,<br>
                           from main.cc:20:<br>
          adaptation.hh: In instantiation of ‘void
          LeafAdaptation<Grid, Vector,
          LoadBalanceHandle>::finalize() [with Grid =
          Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>; Vector =
          PiecewiseFunction<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
          Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>,
          (Dune::PartitionIteratorType)0u> >,
          Dune::FieldVector<double, 1> >; LoadBalanceHandle =
          ZoltanLoadBalanceHandle<Dune::ALUGrid<2, 2,
          (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u> >]’:<br>
          adaptation.hh:175:12:   required from ‘void
          LeafAdaptation<Grid, Vector,
          LoadBalanceHandle>::operator()(Vector&) [with Grid =
          Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>; Vector =
          PiecewiseFunction<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
          Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>,
          (Dune::PartitionIteratorType)0u> >,
          Dune::FieldVector<double, 1> >; LoadBalanceHandle =
          ZoltanLoadBalanceHandle<Dune::ALUGrid<2, 2,
          (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u> >]’<br>
          main.cc:150:28:   required from here<br>
          adaptation.hh:214:5: error: ‘class Dune::ALUGrid<2, 2,
          (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>’ has no member named
          ‘repartition’<br>
               grid_.repartition( ldb_, dataHandle );<br>
               ^<br>
          In file included from ../../dune/alugrid/3d/grid.hh:17:0,<br>
                           from ../../dune/alugrid/3d/geometry_imp.cc:6,<br>
                           from ../../dune/alugrid/3d/geometry.hh:806,<br>
                           from ../../dune/alugrid/3d/iterator_imp.cc:8,<br>
                           from ../../dune/alugrid/3d/iterator.hh:789,<br>
                           from ../../dune/alugrid/3d/alugrid.hh:7,<br>
                           from ../../dune/alugrid/grid.hh:16,<br>
                           from ../../config.h:514,<br>
                           from main.cc:4:<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:
          In instantiation of ‘void
          Dune::SizeCache<GridImp>::countLeafEntities() const
          [with Dune::PartitionIteratorType pitype =
          (Dune::PartitionIteratorType)4u; int codim = 0; GridImp =
          Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1u>]’:<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:100:11:  
          required from ‘static void
          Dune::SizeCache<GridImp>::CountLeafEntitiesBase<codim,
          gridHasCodim>::apply(const SzCacheType&, int) [with
          SzCacheType = Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; int codim = 0; bool
          gridHasCodim = true; GridImp = Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>]’<br>
          /home/gcd3/dune/core/dune-common-2.3.0/dune/common/forloop.hh:57:26:  
          required from ‘static void Dune::ForLoopHelper::Apply<A,
          B>::apply(T1&, T2&) [with T1 = const
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; T2 = int; A =
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>
          >::CountLeafEntities<0>; B =
          Dune::GenericForLoop<Dune::ForLoopHelper::Apply,
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >::CountLeafEntities, 1,
          2>]’<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:207:69:  
          required from ‘int Dune::SizeCache<GridImp>::size(int)
          const [with GridImp = Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>]’<br>
          ../../dune/alugrid/2d/grid_imp.cc:358:34:   required from ‘int
          Dune::ALU2dGrid<dim, dimworld, eltype>::size(int) const
          [with int dim = 2; int dimworld = 2; ALU2DGrid::ElementType
          eltype = (ALU2DGrid::ElementType)1u]’<br>
          loadbalance_zoltan.hh:87:32:   required from ‘bool
          ZoltanLoadBalanceHandle<Grid>::repartition() [with Grid
          = Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>]’<br>
          main.cc:112:24:   required from here<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:242:42:
          warning: ‘typename
          GridFamily::Traits::Partition<All_Partition>::LeafGridView
          Dune::GridDefaultImplementation<<anonymous>,
          <anonymous>, <template-parameter-1-3>,
          <template-parameter-1-4> >::leafView() const [with
          int dim = 2; int dimworld = 2; ct = double; GridFamily =
          Dune::ALU2dGridFamily<2, 2, (ALU2DGrid::ElementType)1u>;
          typename
          GridFamily::Traits::Partition<All_Partition>::LeafGridView
          = Dune::GridView<Dune::DefaultLeafGridViewTraits<const
          Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1u>,
          (Dune::PartitionIteratorType)4u> >]’ is deprecated
          (declared at
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/grid.hh:1055):
          "The method leafView has been renamed to leafGridView."
          [-Wdeprecated-declarations]<br>
                 GridView gridView = grid_.leafView();<br>
                                                    ^<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:
          In instantiation of ‘void
          Dune::SizeCache<GridImp>::countLeafEntities() const
          [with Dune::PartitionIteratorType pitype =
          (Dune::PartitionIteratorType)4u; int codim = 1; GridImp =
          Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1u>]’:<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:100:11:  
          required from ‘static void
          Dune::SizeCache<GridImp>::CountLeafEntitiesBase<codim,
          gridHasCodim>::apply(const SzCacheType&, int) [with
          SzCacheType = Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; int codim = 1; bool
          gridHasCodim = true; GridImp = Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>]’<br>
          /home/gcd3/dune/core/dune-common-2.3.0/dune/common/forloop.hh:57:26:  
          required from ‘static void Dune::ForLoopHelper::Apply<A,
          B>::apply(T1&, T2&) [with T1 = const
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; T2 = int; A =
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>
          >::CountLeafEntities<1>; B =
          Dune::GenericForLoop<Dune::ForLoopHelper::Apply,
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >::CountLeafEntities, 2,
          2>]’<br>
          /home/gcd3/dune/core/dune-common-2.3.0/dune/common/forloop.hh:58:26:  
          required from ‘static void Dune::ForLoopHelper::Apply<A,
          B>::apply(T1&, T2&) [with T1 = const
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; T2 = int; A =
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>
          >::CountLeafEntities<0>; B =
          Dune::GenericForLoop<Dune::ForLoopHelper::Apply,
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >::CountLeafEntities, 1,
          2>]’<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:207:69:  
          required from ‘int Dune::SizeCache<GridImp>::size(int)
          const [with GridImp = Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>]’<br>
          ../../dune/alugrid/2d/grid_imp.cc:358:34:   required from ‘int
          Dune::ALU2dGrid<dim, dimworld, eltype>::size(int) const
          [with int dim = 2; int dimworld = 2; ALU2DGrid::ElementType
          eltype = (ALU2DGrid::ElementType)1u]’<br>
          loadbalance_zoltan.hh:87:32:   required from ‘bool
          ZoltanLoadBalanceHandle<Grid>::repartition() [with Grid
          = Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>]’<br>
          main.cc:112:24:   required from here<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:242:42:
          warning: ‘typename
          GridFamily::Traits::Partition<All_Partition>::LeafGridView
          Dune::GridDefaultImplementation<<anonymous>,
          <anonymous>, <template-parameter-1-3>,
          <template-parameter-1-4> >::leafView() const [with
          int dim = 2; int dimworld = 2; ct = double; GridFamily =
          Dune::ALU2dGridFamily<2, 2, (ALU2DGrid::ElementType)1u>;
          typename
          GridFamily::Traits::Partition<All_Partition>::LeafGridView
          = Dune::GridView<Dune::DefaultLeafGridViewTraits<const
          Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1u>,
          (Dune::PartitionIteratorType)4u> a>]’ is deprecated
          (declared at
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/grid.hh:1055):
          "The method leafView has been renamed to leafGridView."
          [-Wdeprecated-declarations]<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:
          In instantiation of ‘void
          Dune::SizeCache<GridImp>::countLeafEntities() const
          [with Dune::PartitionIteratorType pitype =
          (Dune::PartitionIteratorType)4u; int codim = 2; GridImp =
          Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1u>]’:<br>
          /home/gcd3/dune/core/dune-common-2.3.0/dune/common/forloop.hh:58:26:  
          recursively required from ‘static void
          Dune::ForLoopHelper::Apply<A, B>::apply(T1&,
          T2&) [with T1 = const
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; T2 = int; A =
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>
          >::CountLeafEntities<1>; B =
          Dune::GenericForLoop<Dune::ForLoopHelper::Apply,
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >::CountLeafEntities, 2,
          2>]’<br>
          /home/gcd3/dune/core/dune-common-2.3.0/dune/common/forloop.hh:58:26:  
          required from ‘static void Dune::ForLoopHelper::Apply<A,
          B>::apply(T1&, T2&) [with T1 = const
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >; T2 = int; A =
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>
          >::CountLeafEntities<0>; B =
          Dune::GenericForLoop<Dune::ForLoopHelper::Apply,
          Dune::SizeCache<Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u> >::CountLeafEntities, 1,
          2>]’<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:207:69:  
          required from ‘int Dune::SizeCache<GridImp>::size(int)
          const [with GridImp = Dune::ALU2dGrid<2, 2,
          (ALU2DGrid::ElementType)1u>]’<br>
          ../../dune/alugrid/2d/grid_imp.cc:358:34:   required from ‘int
          Dune::ALU2dGrid<dim, dimworld, eltype>::size(int) const
          [with int dim = 2; int dimworld = 2; ALU2DGrid::ElementType
          eltype = (ALU2DGrid::ElementType)1u]’<br>
          loadbalance_zoltan.hh:87:32:   required from ‘bool
          ZoltanLoadBalanceHandle<Grid>::repartition() [with Grid
          = Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)1u,
          (Dune::ALUGridRefinementType)1u>]’<br>
          main.cc:112:24:   required from here<br>
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/sizecache.hh:242:42:
          warning: ‘typename
          GridFamily::Traits::Partition<All_Partition>::LeafGridView
          Dune::GridDefaultImplementation<<anonymous>,
          <anonymous>, <template-parameter-1-3>,
          <template-parameter-1-4> >::leafView() const [with
          int dim = 2; int dimworld = 2; ct = double; GridFamily =
          Dune::ALU2dGridFamily<2, 2, (ALU2DGrid::ElementType)1u>;
          typename
          GridFamily::Traits::Partition<All_Partition>::LeafGridView
          = Dune::GridView<Dune::DefaultLeafGridViewTraits<const
          Dune::ALU2dGrid<2, 2, (ALU2DGrid::ElementType)1u>,
          (Dune::PartitionIteratorType)4u> >]’ is deprecated
          (declared at
          /home/gcd3/dune/core/dune-grid-2.3.0/dune/grid/common/grid.hh:1055):
          "The method leafView has been renamed to leafGridView."
          [-Wdeprecated-declarations]<br>
          make: *** [main_zoltan-main.o] Error 1<br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Dune mailing list
<a href="mailto:Dune@dune-project.org" target="_blank">Dune@dune-project.org</a>
<a href="http://lists.dune-project.org/mailman/listinfo/dune" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Dune mailing list<br>
<a href="mailto:Dune@dune-project.org">Dune@dune-project.org</a><br>
<a href="http://lists.dune-project.org/mailman/listinfo/dune" rel="noreferrer" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
<br></blockquote></div><br></div>