[cig-commits] commit:

Mercurial hg at geodynamics.org
Mon Nov 24 11:58:42 PST 2008


changeset:   76:83387f8dab1e
user:        BelindaMay
date:        Thu Apr 17 04:49:28 2008 +0000
files:       Swarm/src/SwarmClass.c Swarm/src/SwarmDump.c
description:
Added options (checkpointReadPath and checkpointWritePath) so that checkpoint files can be read from and written to different directories


diff -r 83c29edca702 -r 83387f8dab1e Swarm/src/SwarmClass.c
--- a/Swarm/src/SwarmClass.c	Thu Apr 17 02:16:09 2008 +0000
+++ b/Swarm/src/SwarmClass.c	Thu Apr 17 04:49:28 2008 +0000
@@ -1637,10 +1637,10 @@ void Swarm_ReplaceCurrentParticleLayoutW
 	
 	Journal_DPrintf( self->debug, "overriding the particleLayout specified via XML/constructor\n"
 		"of \"%s\" (of type %s) with a FileParticleLayout to load\n"
-		"this swarm's checkpoint file from checkpointPath \"%s\",\n"
+		"this swarm's checkpoint file from checkpointReadPath \"%s\",\n"
 		"with prefix \"%s\" from timestep %u with total name:\n\"%s\"\n",
 		self->particleLayout->name, self->particleLayout->type,
-		context->checkpointPath,
+		context->checkpointReadPath,
 		context->checkPointPrefixString, context->restartTimestep,
 		swarmSaveFileName );
 
@@ -1658,11 +1658,11 @@ void Swarm_ReplaceCurrentParticleLayoutW
 
 void Swarm_GetCheckpointFilenameForGivenTimestep( Swarm* self, AbstractContext* context, char* swarmSaveFileName ) {
 	if ( strlen(context->checkPointPrefixString) > 0 ) {
-		sprintf( swarmSaveFileName, "%s/%s.%s.%05d.dat", context->checkpointPath,
+		sprintf( swarmSaveFileName, "%s/%s.%s.%05d.dat", context->checkpointReadPath,
 			context->checkPointPrefixString, self->name, context->restartTimestep );
 	}
 	else {
-		sprintf( swarmSaveFileName, "%s/%s.%05d.dat", context->checkpointPath,
+		sprintf( swarmSaveFileName, "%s/%s.%05d.dat", context->checkpointReadPath,
 			self->name, context->restartTimestep );
 	}
 }
diff -r 83c29edca702 -r 83387f8dab1e Swarm/src/SwarmDump.c
--- a/Swarm/src/SwarmDump.c	Thu Apr 17 02:16:09 2008 +0000
+++ b/Swarm/src/SwarmDump.c	Thu Apr 17 04:49:28 2008 +0000
@@ -254,21 +254,21 @@ void _SwarmDump_Execute( void* swarmDump
 
 		if ( self->newFileEachTime ) {
 			if ( strlen(context->checkPointPrefixString) > 0 ) {
-				Stg_asprintf( &filename, "%s/%s.%s.%05d.dat", context->checkpointPath,
+				Stg_asprintf( &filename, "%s/%s.%s.%05d.dat", context->checkpointWritePath,
 					context->checkPointPrefixString, swarm->name, context->timeStep );
 			}
 			else {
-				Stg_asprintf( &filename, "%s/%s.%05d.dat", context->checkpointPath,
+				Stg_asprintf( &filename, "%s/%s.%05d.dat", context->checkpointWritePath,
 					swarm->name, context->timeStep );
 			}
 		}	
 		else { 
 			if ( strlen(context->checkPointPrefixString) > 0 ) {
-				Stg_asprintf( &filename, "%s/%s.%s.dat", context->checkpointPath,
+				Stg_asprintf( &filename, "%s/%s.%s.dat", context->checkpointWritePath,
 					context->checkPointPrefixString, swarm->name );
 			}
 			else {
-				Stg_asprintf( &filename, "%s/%s.dat", context->checkpointPath, swarm->name );
+				Stg_asprintf( &filename, "%s/%s.dat", context->checkpointWritePath, swarm->name );
 			}
 		}	
 



More information about the CIG-COMMITS mailing list