From ae1d00f464cf32f56a0d2e64d152f863f0c8810b Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 11 Sep 2006 14:23:21 +0000 Subject: Do not checkpoint groups tagged with 'CHECKPOINT = "no"' in their interface.ccl definition. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@132 7842ec3a-9562-4be5-9c5b-06ba18f2b668 --- src/DumpUtils.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/DumpUtils.c b/src/DumpUtils.c index fcf3d82..5b4c6aa 100644 --- a/src/DumpUtils.c +++ b/src/DumpUtils.c @@ -56,7 +56,7 @@ CCTK_FILEVERSION(CactusPUGHIO_IOHDF5Util_DumpUtils_c) @@*/ int IOHDF5Util_DumpGH (const cGH *GH, const int *timers, hid_t file) { - int dim, groupvarsize, first_vindex, gindex, retval; + int len, dim, groupvarsize, first_vindex, gindex, retval; cGroup gdata; cGroupDynamicData gdynamicdata; char *fullname; @@ -134,6 +134,26 @@ int IOHDF5Util_DumpGH (const cGH *GH, const int *timers, hid_t file) continue; } + len = Util_TableGetString (gdata.tagstable, 0, NULL, "checkpoint"); + if (len > 0) + { + char* value = malloc (len + 1); + Util_TableGetString (gdata.tagstable, len + 1, value, "checkpoint"); + if (len == sizeof ("no") - 1 && CCTK_Equals (value, "no")) + { + continue; + } + else if (! CCTK_Equals (value, "yes")) + { + char* groupname = CCTK_GroupName (gindex); + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Ignoring unknown checkpoint tag '%s' for group '%s'", + value, groupname); + free (groupname); + } + free (value); + } + first_vindex = CCTK_FirstVarIndexI (gindex); /* get the default I/O request for this group */ -- cgit v1.2.3