aboutsummaryrefslogtreecommitdiff
path: root/src/DumpGH.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2001-04-19 22:02:41 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2001-04-19 22:02:41 +0000
commite0434816ab8354125c24d64e798df31d4698da17 (patch)
tree8f30b9f07ae71ae1ac6cda8b22be0da9d8457fbe /src/DumpGH.c
parent373c9dd8f0ba051d74402f3df37f925ea6799911 (diff)
Add the Cactus version as an attribute to the global attributes group.
This is also used during recovery to distinguish checkpoint and data files which were created before/after the recent changes to the timelevel naming scheme. This fixes PR IOFlexIO-620. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@184 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/DumpGH.c')
-rw-r--r--src/DumpGH.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c
index 9ed5dbf..864ec58 100644
--- a/src/DumpGH.c
+++ b/src/DumpGH.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include "cctk.h"
+#include "cctk_Version.h"
#include "cctk_Parameters.h"
#include "CactusBase/IOUtil/src/ioGH.h"
#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h"
@@ -222,6 +223,7 @@ void IOFlexIOi_DumpGHExtensions (cGH *GH, IOFile iof)
{
CCTK_INT4 i_temp;
CCTK_REAL d_temp;
+ const char *version;
ioGH *ioUtilGH;
/* Get the handle for IOUtil extensions */
@@ -246,6 +248,10 @@ void IOFlexIOi_DumpGHExtensions (cGH *GH, IOFile iof)
d_temp = GH->cctk_time;
CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "GH$time", FLEXIO_REAL,
1, &d_temp));
+
+ version = CCTK_FullVersion ();
+ CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "Cactus version", FLEXIO_CHAR,
+ strlen (version) + 1, version));
}