From 873af4249a21ee1fcd036f792238db29ba3a9292 Mon Sep 17 00:00:00 2001 From: tradke Date: Thu, 9 Oct 2003 14:23:40 +0000 Subject: Add global information (such as chunking parameters) to the streamed HDF5 output so that it can be read into OpenDX using the ImportCactusHDF5 module. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@99 0888f3d4-9f52-45d2-93bc-d00801ff5e46 --- src/Write.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Write.c b/src/Write.c index 788f3b6..434fde3 100644 --- a/src/Write.c +++ b/src/Write.c @@ -79,8 +79,8 @@ int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias) return (-1); } - ioUtilGH = (ioGH *) CCTK_GHExtension (GH, "IO"); - myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5"); + ioUtilGH = CCTK_GHExtension (GH, "IO"); + myGH = CCTK_GHExtension (GH, "IOStreamedHDF5"); /* for now we can only have I/O mode "oneproc" */ if (ioUtilGH->nioprocs != 1) @@ -126,6 +126,12 @@ int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias) /* output the data */ retval = IOHDF5Util_DumpVar (GH, myGH->requests[vindex], file); + /* attach global information */ + if (! retval && file >= 0) + { + IOHDF5Util_DumpGHExtensions (GH, file); + } + /* close the file */ if (file >= 0) { -- cgit v1.2.3