next up previous
Next: Model Specific Output Up: Output Previous: Slices


Checkpointing - Grid Images

The function checkpoint() outputs an exact image of the grid, as well as several other variables needed to restart the program from a particular time. Specifically the grid image contains (in order) the run number ($0$ for a first run, $1$ for a continuation of that, etc.), the time $t$, the scale factor $a$ and its derivative $a'$, the array of fields, and the array of field derivatives. These quantities are stored in binary so as to keep the file size minimal. The program is designed to be able to read in one of these image files to use as initial conditions for a run continuation. These values are stored in leapfrog fashion with the field and scale factor derivatives representing values one half time step behind the time, field, and scale factor variables. See section 4.1.2 for details on resuming runs.

Ordinarily the file with the grid image is called grid.img. It is saved every time the program checkpoints. We recommend setting the program to checkpoint fairly often so that if a run is interrupted not much time is lost. Every time the grid image is stored it overwrites the previous image, so at the end of the run the only image will be of the last time calculated. Sometimes, however, you may want to store intermediate images. For example you might want to store the value of the field just before a critical event like a phase transition so that later if you need to you can rerun and calculate histograms more frequently in that period. Whatever the reason, there is a simple way to do this. In the file parameters.h there is an array called store_lattice_times. If the first entry in this array is anything other than zero then its entries are taken as times to store intermediate grid images. In this case the program will write to the first file until the first storage time has passed and then close that file and open a new one. If the last storage time is smaller than the final time of the run then one last file will be created after that last time and will be used until the end of the run.

The files will be named grid$<$number$>$.img where number is the integer part of the storage time. For example, if you do a run from $t=0$ to $t=200$ and the array store_lattice_times contains $50.0$, $125.0$, and $175.0$ then when the run ends you will have the following grid image files: grid50.img, grid125.img, grid175.img, and grid200.img. If you did this same run with no storage times indicated the sole image file would simply be named grid.img. Note that if a run is interrupted then the times listed in the files may be incorrect. In the example above, if the computer crashed at $t=103$ then the last image file would be called grid125.img even though it might at that point contain an image recorded at $t=100$. Also, if you set the program to only checkpoint every $t=10$ then the files grid125.img and grid175.img would contain images at $t=120$ and $t=170$ respectively.

When continuing a previous run LATTICEEASY looks for a grid image named grid.img, so if you want to continue from one of these stored files you may have to rename it.


next up previous
Next: Model Specific Output Up: Output Previous: Slices

Go to The LATTICEEASY Home Page
Go to Gary Felder's Home Page
Send email to Gary Felder at gfelder@email.smith.edu
Send email to Igor Tkachev at Igor.Tkachev@cern.ch

This documentation was generated on 2008-01-21