[Carpet] endless loop in bboxset.cc
Erik Schnetter
schnetter at cct.lsu.edu
Sat Apr 7 01:08:00 CEST 2007
On Apr 6, 2007, at 16:10:42, Frank Löffler wrote:
> Hi,
>
> I have a problem with Carpet doing an endless loop and I try to
> understand
> the code. So far, I feel a bit lost. Maybe someone here can help me.
>
> The problem seems to be in CarpetLib/src/bboxset.cc in
> void bboxset<T,D>::normalize ()
> After the first call to that function, the first loop over the
> outermost
> for-loop (dimension?) is still fine. However, the next one then loops
> forever in the inner
>
> for (typename bset::const_iterator si = bs.begin(); si != bs.end();
> ++ si) {}
>
> (but bs.size is 1)
>
> I checked that the same loop using nbs before the swap of bs and
> nbs also
> has that problem, so my guess would be that nbs might not be
> initialized
> correctly during the first run. Could that be?
No, that cannot be. This variable is declared as
bset nbs;
where the type bset is set<box>. The constructor of the STL set
class initialises nbs to the empty set.
> This using the Carpet version from
> http://www.carpetcode.org/~darcs/carpet/ (the one, which Thomas
> uses for
> his Integration builds) and is on an Alpha CPU machine with OpenMPI.
> Runs using Carpet are fine.
What C++ compiler are you using? What happens when you run the same
parameter file on a different architecture? The function normalize()
is called very often, and I believe that it is very well tested.
Could it be an error in your version of your compiler or STL?
How does the bboxset look like when this problem occurs? You can
also try enabling the somewhat expensive invariant() routine by
removing the #if 0 there.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20070407/7a7cda7f/attachment.pgp
More information about the developers
mailing list