[dune-pdelab] dune-pdelab Digest, Vol 118, Issue 5

Amir Peiraviminaei apminaei at gmail.com
Wed Sep 16 14:32:57 CEST 2020


Hi Dominic,
The error is the same as before:
[100%] Linking CXX executable hydrateDG-Ex1
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::DDD_IFOneway(DDD::DDDContext&, unsigned int, (anonymous
namespace)::D2::DDD_IF_DIR, unsigned long, int (*)(DDD::DDDContext&, char*,
void*), int (*)(DDD::DDDContext&, char*, void*))':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:115: undefined
reference to `(anonymous namespace)::D2::DDD_IFOneway(DDD::DDDContext&,
unsigned int, (anonymous namespace)::D2::DDD_IF_DIR, unsigned long, int
(*)(DDD::DDDContext&, char*, void*), int (*)(DDD::DDDContext&, char*,
void*))'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::Sides_Of_Elem((anonymous namespace)::D2::element const*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:544: undefined
reference to `(anonymous namespace)::D2::element_descriptors'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::isLeaf((anonymous namespace)::D2::element const*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:704: undefined
reference to `(anonymous namespace)::D2::control_entries'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:704: undefined
reference to `(anonymous namespace)::D2::control_entries'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:704: undefined
reference to `(anonymous namespace)::D2::control_entries'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UGGridEntity<0, 2, Dune::UGGrid<2> const>::UGGridEntity((anonymous
namespace)::D2::element*, Dune::UGGrid<2> const*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridentity.hh:619:
undefined reference to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::DDD_InfoProcList(DDD::DDDContext&, DDD::DDD_HEADER*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:130: undefined
reference to `(anonymous namespace)::D2::DDD_InfoProcList(DDD::DDDContext&,
DDD::DDD_HEADER*)'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::Corner_Coordinates((anonymous namespace)::D2::element
const*, double**)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:448: undefined
reference to `(anonymous namespace)::D2::n_offset'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:448: undefined
reference to `(anonymous namespace)::D2::n_offset'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:448: undefined
reference to `(anonymous namespace)::D2::n_offset'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:448: undefined
reference to `(anonymous namespace)::D2::n_offset'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:448: undefined
reference to `(anonymous namespace)::D2::n_offset'
/usr/bin/ld:
CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o:/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:448:
more undefined references to `(anonymous namespace)::D2::n_offset' follow
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::Side_On_Bnd((anonymous namespace)::D2::element const*,
int)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:572: undefined
reference to `(anonymous namespace)::D2::side_offset'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::Edges_Of_Elem((anonymous namespace)::D2::element const*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:587: undefined
reference to `(anonymous namespace)::D2::element_descriptors'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::Corners_Of_Elem((anonymous namespace)::D2::element
const*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:594: undefined
reference to `(anonymous namespace)::D2::element_descriptors'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::Corner((anonymous namespace)::D2::element const*, int)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:943: undefined
reference to `(anonymous namespace)::D2::n_offset'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UG_NS<2>::GetEdge((anonymous namespace)::D2::node*, (anonymous
namespace)::D2::node*)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/ugwrapper.hh:958: undefined
reference to `(anonymous namespace)::D2::GetEdge((anonymous
namespace)::D2::node const*, (anonymous namespace)::D2::node const*)'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UGGridLeafIterator<0, (Dune::PartitionIteratorType)4,
Dune::UGGrid<2> const>::globalIncrement()':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:161:
undefined reference to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:176:
undefined reference to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UGGridLeafIterator<0, (Dune::PartitionIteratorType)1,
Dune::UGGrid<2> const>::globalIncrement()':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:161:
undefined reference to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)'
/usr/bin/ld:
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:178:
undefined reference to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)'
/usr/bin/ld: CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o: in function
`Dune::UGGridLeafIterator<0, (Dune::PartitionIteratorType)1,
Dune::UGGrid<2> const>::UGGridLeafIterator(Dune::UGGrid<2> const&)':
/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:58:
undefined reference to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)'
/usr/bin/ld:
CMakeFiles/hydrateDG-Ex1.dir/hydrateDG-Ex1.cc.o:/home/amir/dune-2.7/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:73:
more undefined references to `Dune::UGGridEntity<0, 2, Dune::UGGrid<2>
const>::setToTarget((anonymous namespace)::D2::element*, Dune::UGGrid<2>
const*)' follow
collect2: error: ld returned 1 exit status

I think there is a linking problem with uggrid, but I don't know how
exactly I can fix it. The reason that I send the warnings because they
basically are saying there is something that is not defined, e.g.,
"declared ‘static’ but never defined"
So please tell me what else can I do?
Thank you
Amir

On Wed, Sep 16, 2020 at 2:14 PM Dominic Kempf <dominic.r.kempf at gmail.com>
wrote:

> Dear Amir,
>
> Warnings are non-critical. Depending on your compiler flags, UGGrid might
> throw warnings. If you also get errors, you could post these and we might
> be able to help how to get rid of them. The code snippet you were posting
> looks fine.
>
> Best,
> Dominic
>
> On Wed, Sep 16, 2020 at 12:33 PM Amir Peiraviminaei <apminaei at gmail.com>
> wrote:
>
>> Hi Carsten,
>> I did rebuild my own module as you said, still getting errors as the
>> first one for both master and 2.7 release branches. This is the grid that I
>> want to create:
>> typedef Dune::UGGrid<dim> Grid;
>> auto ll = Dune::FieldVector<Grid::ctype, dim>{{0, 0}};
>> auto ur = Dune::FieldVector<Grid::ctype, dim>{{L[0], L[1]}};
>> std::array<unsigned int, dim> elements;
>> elements[0] = N[0];
>> elements[1] = N[1];
>> std::shared_ptr<Grid> grid = Dune::StructuredGridFactory<Grid>::
>> createCubeGrid(ll, ur, elements);
>>
>> typedef Grid::LeafGridView GV;
>> GV gv = grid->leafGridView();
>> grid->loadBalance();
>>
>> this is the warning messages that I get:
>> In file included from /... /dune-uggrid/dune/uggrid/domain/domain.h:60:0,
>>                  from
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/gm/gm.h:58,
>>                  from
>> /home/peiravim/dune/dune-grid/dune/grid/uggrid/ugincludes.hh:16,
>>                  from
>> /home/peiravim/dune/dune-grid/dune/grid/uggrid.hh:57,
>>                  from
>> /home/peiravim/dune/Hydrate-DG/dune/Hydrate-DG/IncludesDUNE.hh:36,
>>                  from
>> /home/peiravim/dune/Hydrate-DG/src/hydrateDG-Ex1.cc:20:
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h: At global scope:
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:127:14: warning:
>> ‘{anonymous}::HEAP* {anonymous}::NewHeap({anonymous}::HeapType,
>> {anonymous}::MEM, void*)’ declared ‘static’ but never defined
>> [-Wunused-function]
>>  HEAP        *NewHeap                (enum HeapType type, MEM size, void
>> *buffer);
>>               ^~~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:128:14: warning:
>> ‘void {anonymous}::DisposeHeap({anonymous}::HEAP*)’ declared ‘static’ but
>> never defined [-Wunused-function]
>>  void         DisposeHeap            (HEAP *theHeap);
>>               ^~~~~~~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:130:14: warning:
>> ‘void* {anonymous}::GetMem({anonymous}::HEAP*, {anonymous}::MEM)’ declared
>> ‘static’ but never defined [-Wunused-function]
>>  void        *GetMem                 (HEAP *theHeap, MEM n);
>>               ^~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:131:14: warning:
>> ‘void* {anonymous}::GetFreelistMemory({anonymous}::HEAP*,
>> {anonymous}::INT)’ declared ‘static’ but never defined [-Wunused-function]
>>  void        *GetFreelistMemory      (HEAP *theHeap, INT size);
>>               ^~~~~~~~~~~~~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:132:14: warning:
>> ‘void {anonymous}::DisposeMem({anonymous}::HEAP*, void*)’ declared ‘static’
>> but never defined [-Wunused-function]
>>  void         DisposeMem             (HEAP *theHeap, void *buffer);
>>               ^~~~~~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:134:14: warning:
>> ‘{anonymous}::INT {anonymous}::MarkTmpMem({anonymous}::HEAP*,
>> {anonymous}::INT*)’ declared ‘static’ but never defined [-Wunused-function]
>>  INT          MarkTmpMem             (HEAP *theHeap, INT *key);
>>               ^~~~~~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:135:14: warning:
>> ‘void* {anonymous}::GetTmpMem({anonymous}::HEAP*, {anonymous}::MEM,
>> {anonymous}::INT)’ declared ‘static’ but never defined [-Wunused-function]
>>  void        *GetTmpMem              (HEAP *theHeap, MEM n, INT key);
>>               ^~~~~~~~~
>> /home/peiravim/dune/dune-uggrid/dune/uggrid/low/heaps.h:136:14: warning:
>> ‘{anonymous}::INT {anonymous}::ReleaseTmpMem({anonymous}::HEAP*,
>> {anonymous}::INT)’ declared ‘static’ but never defined [-Wunused-function]
>>  INT          ReleaseTmpMem          (HEAP *theHeap, INT key);
>>
>> There are more warnings, all about uggrid.
>>
>> Thank you.
>> Amir
>>
>> _______________________________________________
>> dune-pdelab mailing list
>> dune-pdelab at lists.dune-project.org
>> https://lists.dune-project.org/mailman/listinfo/dune-pdelab
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20200916/44c003a0/attachment.htm>


More information about the dune-pdelab mailing list