diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-03-18 15:21:42 -0700 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:34 +0000 |
commit | 298faad26ac5d0178167c0fff9a6df2fcb9c6389 (patch) | |
tree | 5d90fbcd1e38dcdeba16d8f66a35df6a85c1f527 /Carpet | |
parent | dbff3b5db66ff5be9edad26642b6eae938640270 (diff) |
CarpetIOHDF5: Improve handling termination checkpoints
When checkpoints of initial data are disabled, but termination
checkpoints are enabled, then do checkpoint the initial data.
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc index 297a10129..452323ba2 100644 --- a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc +++ b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc @@ -198,21 +198,27 @@ void CarpetIOHDF5_TerminationCheckpoint (CCTK_ARGUMENTS) if (checkpoint and checkpoint_on_terminate) { - if (last_checkpoint_iteration < cctk_iteration) { + + if (last_checkpoint_iteration < cctk_iteration or + (cctk_iteration == 0 and not checkpoint_ID)) + { if (not CCTK_Equals (verbose, "none")) { CCTK_INFO ("---------------------------------------------------------"); CCTK_VInfo (CCTK_THORNSTRING, "Dumping termination checkpoint at " "iteration %d", cctk_iteration); CCTK_INFO ("---------------------------------------------------------"); } - Checkpoint (cctkGH, CP_EVOLUTION_DATA); - } else if (not CCTK_Equals (verbose, "none")) { - CCTK_INFO ("---------------------------------------------------------"); - CCTK_VInfo (CCTK_THORNSTRING, "Termination checkpoint already dumped " - "as last evolution checkpoint at iteration %d", - last_checkpoint_iteration); - CCTK_INFO ("---------------------------------------------------------"); + + } else { + if (not CCTK_Equals (verbose, "none")) { + CCTK_INFO ("---------------------------------------------------------"); + CCTK_VInfo (CCTK_THORNSTRING, "Termination checkpoint already dumped " + "as last evolution checkpoint at iteration %d", + last_checkpoint_iteration); + CCTK_INFO ("---------------------------------------------------------"); + + } } } } |