In read_checkpoint(), the order in which the data blocks are read from .cpt
differs from the order in write_checkpoint(), read_checkpoint_data() and
list_checkpoint().
This change puts the do_cpt_EDstate() routine after the do_cpt_enerhist()
routine, as is already the case for the other checkpoint-reading functions.
Change-Id: Ib017dfbd05918b4ee8e27f1ec93523497c559936
cp_error();
}
- ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, &state->edsamstate, NULL);
- if (ret)
- {
- cp_error();
- }
-
if (file_version < 6)
{
const char *warn = "Reading checkpoint file in old format, assuming that the run that generated this file started at step 0, if this is not the case the averages stored in the energy file will be incorrect.";
cp_error();
}
+ ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, &state->edsamstate, NULL);
+ if (ret)
+ {
+ cp_error();
+ }
+
ret = do_cpt_files(gmx_fio_getxdr(fp), TRUE, &outputfiles, &nfiles, NULL, file_version);
if (ret)
{