[Dune-devel] dune-common update seems to cause error in my ParMetis routine

Jö Fahlke jorrit at jorrit.de
Tue Jan 26 14:13:16 CET 2016


Am Tue, 26. Jan 2016, 11:56:05 +0100 schrieb Aleksejs Fomins:
> Date: Tue, 26 Jan 2016 11:56:05 +0100
> From: Aleksejs Fomins <aleksejs.fomins at lspr.ch>
> To: "dune-devel at dune-project.org" <dune-devel at dune-project.org>
> Subject: Re: [Dune-devel] dune-common update seems to cause error in my
>  ParMetis routine
> X-No-Auth: unauthenticated sender
> X-No-Relay: not in my network
> X-Spam-Flag: NO
> X-Spam-Score: -1
> X-Enigmail-Draft-Status: N1110
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
>  Thunderbird/38.4.0
> X-Spam-Check-Skipped: Message too large - 1864 kB
> 
> Hey Jö,
> 
> Thanks for your suggestion. I have tried to do as you say, and I attach the preprocessor output.
> 
> If you search the text for "real_t", you find it is defined once in metis.h
> 
> /opt/extlib/parmetis/4.0.3/openmpi/1.10.0/gcc/5.2.0/include/metis.h:120:17
>    typedef float real_t;
> 
> and once in Dune typetraits
> 
> /home/fomins/gitwork/hades-lspr-ag/dune-common/dune/common/typetraits.hh:565:55
>  using real_t = typename FieldTraits<Type>::real_type;
> 
> I am not sure if I am reading the preprocessor output correctly, but, as far as I can tell, the typetraits definition is inside namespace Dune and metis definition is not inside any namespace. And yet the compiler complains about ambiguous definition of real_t when reading metis.h.

Hi!

The problem is a

  using namespace Dune;

in global scope.  See near line 55
of "/home/fomins/gitwork/hades-lspr-ag/hades/basisfunctions/htvfe.hh" (and
there may be more instances).  Shame on whoever put that into a header file
;).

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

Software is like sex; it's better when it's free.
-- Linus Torvalds
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20160126/9b2c4bd5/attachment.sig>


More information about the Dune-devel mailing list