[Carpet] type-cast warnings

Bela Szilagyi szilagyi at aei.mpg.de
Tue Oct 17 16:13:54 CEST 2006


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




More information about the developers mailing list