[Dune-devel] dune-common update seems to cause error in my ParMetis routine
Aleksejs Fomins
aleksejs.fomins at lspr.ch
Fri Jan 22 12:13:58 CET 2016
Dear Markus,
real_t is a datatype that is essentially float or double, as defined in <parmetis.h>, which is included in the file in question.
In fact, the error disappears if I manually type
typedef float real_t;
inside of my code. However, this same line is already written in parmetis.h, and the compiler clearly sees this file, because it does not complain about other parmetis functions I use. What puzzles me is that the code compiles no problem with previous version of dune-common.
Thanks,
Aleksejs
On 22.01.2016 12:07, Markus Blatt wrote:
> Hi,
>
> On Fri, Jan 22, 2016 at 11:55:31AM +0100, Aleksejs Fomins wrote:
>> My Parmetis code, which used to compile before, includes the following lines:
>>
>> ------------------------------------------------------------------------------
>> #if PARMETIS_MAJOR_VERSION < 4
>> typedef idxtype idx_t;
>> typedef float real_t;
>> #endif
>>
>> std::vector<real_t> tpwgts(ncon*nparts, 1./nparts);
>> ------------------------------------------------------------------------------
>>
>> With the latest pull of dune-common, I get the following error
>>
>> ------------------------------------------------------------------------------
>> /home/fomins/gitwork/hades-lspr-ag/dune-curvilineargrid/dune/curvilineargrid/io/file/curvilineargmshreader.hh:1124:25: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
>> std::vector<real_t> tpwgts(ncon*nparts, 1./nparts);
>> ^
>> /home/fomins/gitwork/hades-lspr-ag/dune-curvilineargrid/dune/curvilineargrid/io/file/curvilineargmshreader.hh:1124:25: note: expected a type, got ‘real_t’
>> ------------------------------------------------------------------------------
>>
>> Would you be so kind as to suggest what caused this error and how to correct it?
>
> The error message is pretty clear: The compiler does not know real_t
> for whatever reason. What is it supposed to be?
>
> Cheers,
>
> Markus
>
More information about the Dune-devel
mailing list