From e3bac2b6fff348f037de24b9b4ac88dd663ef10d Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 17 Nov 2004 18:45:48 +0000 Subject: Use aliased function IO_TruncateOutputFiles() to check whether or not to truncate existing output files. You must also update CactusBase/IOUtil now. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@211 4825ed28-b72c-4eae-9704-e50c059e567d --- interface.ccl | 5 +++++ src/Write.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/interface.ccl b/interface.ccl index 206e3c4..c205bc9 100644 --- a/interface.ccl +++ b/interface.ccl @@ -3,3 +3,8 @@ Implements: IOHDF5 #Inherits: IO + +CCTK_INT FUNCTION IO_TruncateOutputFiles \ + (CCTK_POINTER_TO_CONST IN GH) + +REQUIRES FUNCTION IO_TruncateOutputFiles diff --git a/src/Write.c b/src/Write.c index 1a69cf9..d2f393e 100644 --- a/src/Write.c +++ b/src/Write.c @@ -333,7 +333,7 @@ static char *IOHDF5_GetFilename (const cGH *GH, { if (myproc == ioUtilGH->ioproc) { - if (ioUtilGH->recovered) + if (! IO_TruncateOutputFiles (GH)) { H5E_BEGIN_TRY { -- cgit v1.2.3