#1533: checkpoint cctk_delta_time in PUGH -----------------------------------+---------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Keywords: IOHDF5Util | -----------------------------------+---------------------------------------- the PUGH driver currently does not checkpoint the stepsize which makes using it with adaptive timestepping hard. Carpet on the other hand checkpoints the stepsize.
The attached patch writes cckt_delta_time into checkpoints. When reading a checkpoint file that does not set the timestep, the user will see level 1 warning that the attribute cctk_delta_time was not found but the code will not abort and will behave as it does right now otherwise (which is to use cctk_delta_time based on the values from parameters/set in basegrid).
#1533: checkpoint cctk_delta_time in PUGH ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: review Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: IOHDF5Util ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: new => review
#1533: checkpoint cctk_delta_time in PUGH ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: review Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: IOHDF5Util ------------------------------------+---------------------------------------
Comment (by eschnett):
You write cctk_time and cctk_delta_time into the same attribute. Is there a particular reason for this? Otherwise I find it cleaner to use a separate attribute named "cctk_delta"time". This would also be automatically ignored when read from older versions of PUGH. You would read this attribute with a construct equivalent to {{{ bool file_exists; H5E_BEGIN_TRY { file_exists = H5Fis_hdf5(name.c_str()) > 0; } H5E_END_TRY; if (not file_exists) { }}} that ensures that HDF5 will not abort on errors.
#1533: checkpoint cctk_delta_time in PUGH ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: review Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: IOHDF5Util ------------------------------------+---------------------------------------
Comment (by rhaas):
I am not sure I fully understand your comment Erik. Are you asking why the code uses a single buffer of 2 {{{CCTK_REAL}}} to hold {{{cctk_delta_time}}} and {{{cctk_time}}} when read from the file? It uses a single buffer since the the read-in value is broadcast using MPI and I'd have had to add a second broadcast call for {{{cctk_delta_time}}} otherwise. This is the same logic that is used for the integer attributes "main_loop_index" and "cctk_iteration".
There are separate attributes "cctk_delta_time" and "cctk_time" in the file, not a single attribute with two values in it.
Was that what you were asking?
I actually do want it to output a warning when a checkpoint file that does not contain {{{cctk_delta_time}}} is read. Otherwise it silently uses the incorrect cctk_delta_time. This would only be an issue for "old" checkpoint files since the new ones will always contain the attribute. Storing {{{cctk_delta_time}}} is not a new feature, it's a bugfix.
#1533: checkpoint cctk_delta_time in PUGH ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: reviewed_ok Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: IOHDF5Util ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: review => reviewed_ok
Comment:
Please apply.
#1533: checkpoint cctk_delta_time in PUGH ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: closed Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: fixed | Keywords: IOHDF5Util ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Applied as rev 174 of IOHDF5Util and rev 274 of IOHDF5 whose test suite contained a checkpoint.
trac@lists.einsteintoolkit.org