diff options
author | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2006-05-11 14:22:06 +0000 |
---|---|---|
committer | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2006-05-11 14:22:06 +0000 |
commit | 461ebf3df853b7b2655a182e2718534d1b8fbc09 (patch) | |
tree | 83d8088fe0d75e86497e06efb8681fc76c33e284 | |
parent | d74fb47b045f8660182e045779e81244f83710f1 (diff) |
Introduce new boolean parameter IO::truncate_files.
Currently Cactus always truncates existing output files unless the
simulation has been recovered from a checkpoint (in which case existing
output files will get appended unless the parameter
IO::truncate_files_after_recovering is set to true).
Christian Ott requested that it should also be possible to always append
new datasets to existing output files. The new boolean I/O parameter
IO::truncate_files implements that. Its default value is true,
preserving the existing Cactus behaviour.
This applies patch http://www.cactuscode.org/old/pipermail/patches/2006-May/000169.html.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@240 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r-- | param.ccl | 4 | ||||
-rw-r--r-- | src/Startup.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -313,6 +313,10 @@ INT out_xyplane_zi "z-index (from 0) for 2D planes in xy, overrrides IO::out_xyp private: +BOOLEAN truncate_files "Truncate existing output files from previous runs (except when recovering) ?" STEERABLE = ALWAYS +{ +} "yes" + BOOLEAN truncate_files_after_recovering "Truncate existing output files after recovering ?" STEERABLE = RECOVER { } "no" diff --git a/src/Startup.c b/src/Startup.c index 4f70c4c..75890fe 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -175,7 +175,9 @@ CCTK_INT IOUtil_TruncateOutputFiles (const CCTK_POINTER_TO_CONST GH) return (-1); } - return (! myGH->recovered || truncate_files_after_recovering); + return (truncate_files || + truncate_files_after_recovering || + ! myGH->recovered); } |