[cig-commits] commit:
Mercurial
hg at geodynamics.org
Mon Nov 24 11:59:39 PST 2008
changeset: 167:9d80e49b2289
tag: v1.2.0
user: Julian Giordani <julian.giordani at sci.monash.edu.au>
date: Mon Oct 06 16:27:35 2008 +1100
files: Swarm/src/SwarmOutput.c
description:
Updating this component so, upon a restart, the output file will be appended to instead of overwritten
diff -r 482002daa691 -r 9d80e49b2289 Swarm/src/SwarmOutput.c
--- a/Swarm/src/SwarmOutput.c Mon Oct 06 15:23:13 2008 +1100
+++ b/Swarm/src/SwarmOutput.c Mon Oct 06 16:27:35 2008 +1100
@@ -248,7 +248,10 @@ void _SwarmOutput_Initialise( void* swar
for ( lParticle_I = 0 ; lParticle_I < swarm->particleLocalCount ; lParticle_I++ ) {
/* Open file */
Stg_asprintf( &filename, "%s.%05d.dat", self->baseFilename, Variable_GetValueInt( globalIndexVariable, lParticle_I ) );
- Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, filename );
+ if( context->loadFromCheckPoint )
+ Stream_AppendFile_WithPrependedPath( stream, context->outputPath, filename );
+ else
+ Stream_RedirectFile_WithPrependedPath( stream, context->outputPath, filename );
/* Print to file */
SwarmOutput_PrintHeader( self, stream, lParticle_I, data );
More information about the CIG-COMMITS
mailing list