[Carpet] type-cast warnings
Steve White
steve.white at aei.mpg.de
Tue Oct 17 18:35:58 CEST 2006
This is impressive.
I just sent Erik an e-mail saying I had fixed all these things.
However, I picked out the line 4 above the one Bela mentions as being
particularly scary:
myinval += (static_cast<const T*>(inarrays.at(tl))[index]
* tfacs.at(tl));
It isn't clear to me what "mycnt" is supposed to be doing,...
On 17.10.06, Bela Szilagyi wrote:
> While compiling Carpet on our AEI cluster "lagavulin" I got the following
> warnings:
>
> /home/szilagyi/Cactus/configs/lharm/build/CarpetReduce/reduce.cc(459): warning
> # 810: conversion from "double" to
> "CarpetReduce::typeconv<int>::goodtype={int}" m ay
> lose significant bits
> mycnt += w;
> ^
> detected during instantiation of "void
> CarpetReduce::reduce<T,OP>(cons t int *, const int
> *, const int *, const std::vector<const void *, std::allocat
> o r<const void *>> &, const std::vector<double, std::allocator<double>> &,
> void *, void *, const double *, double) [with
> T=CarpetReduce::typeconv<int>::goodtyp e={ int},
> OP=CarpetReduce::minimum::op<CarpetReduce::typeconv<int>::goodtype={in
> t}>] "
>
>
> What is worrisome is that the resulting value of (mycnt) could depend "w"
> being a roundoff quantity above or below a certain integer. In case one runs
> the application across a non-homogeneus architecture cluster, it is very
> likely that on certain nodes mycnt will have values different from other
> nodes.
>
> It is possible that code before this assignment cleans up the value of "w" so
> that the result is architecture independent. But I was not able to confirm
> this.
>
> The question is then -- should one worry about these kinds of warnings in
> Carpet(Regrid) ?
>
> --
> Bela Szilagyi
>
> Max-Planck-Institut für Gravitationsphysik
> Albert-Einstein-Institut
> Tel: +49 331 567 7632
> Fax: +49 331 567 7649
>
> _______________________________________________
> developers mailing list
> developers at lists.carpetcode.org
> http://lists.carpetcode.org/listinfo/developers
>
--
Steve White : Programmer
Max-Planck-Institut für Gravitationsphysik Albert-Einstein-Institut
Am Mühlenberg 1, D-14476 Golm, Germany +49-331-567-7625
More information about the developers
mailing list