[Carpet] Error when recovering from a checkpoint file

Ian Hinder hinder at gravity.psu.edu
Fri Aug 25 05:09:03 CEST 2006


On Thu, Aug 24, 2006 at 04:41:49PM -0500, Erik Schnetter wrote:
> On Aug 24, 2006, at 16:23:48, Ian Hinder wrote:

> >Do you have newlines in the parameter?  The currentl implementation
> >for checkpointing and recovery of parameters is not compatible with
> >parameters containing newline characters.  When you checkpoint, the
> >parameters from your simulation are written into one long string in
> >the HDF5 file, separated by newlines as the delimiters.  So the
> >parameters will be corrupted when read back in if they have newlines
> >in them.  One fix would be to modify the routine that writes out the
> >parameters to just replace newlines with spaces or empty strings.
> >Alternatively, just avoid putting newlines in your parameters.
> 
> When Cactus reads parameters, it skips newlines.

Hmm.  I'm pretty sure that we had problems with the
CarpetRegrid::coordinates parameter having newlines, being stored in
the checkpoint file, and then being read in incorrectly on recovery.

> What is incompatible?  I didn't know.  It is possible to put newlines  
> into parameters at run time.

Ah - maybe this is what happened.  Perhaps it was our moving grid
infrastructure adding the newlines that caused the problem, rather
than the initial parameter specification from the parameter file.

> The grid structure that is written to a checkpoint file is generated  
> from scratch, and it contains no white space.  (I just checked the  
> file in question.)

But this is the grid structure that is written out specially, not the
CarpetRegrid::coordinates parameter itself?

So, if I understand correctly, the problem would only occur if a thorn
dynamically adjusts a parameter to include newline characters.  In
that case, the checkpointing and recovery code would corrupt the
parameter.  So the fix I suggested before (removing the newlines upon
checkpoint) would still work.

-- 
Ian Hinder
hinder at gravity.psu.edu
http://www.gravity.psu.edu/~hinder



More information about the developers mailing list