[cig-commits] r4808 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Swarm/src
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:45:34 PDT 2006
Author: walter
Date: 2006-10-11 13:45:34 -0700 (Wed, 11 Oct 2006)
New Revision: 4808
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/FileParticleLayout.c
long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/SwarmClass.c
long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/Swarm_Register.c
Log:
r2865 at earth: boo | 2006-10-11 13:42:23 -0700
r2781 at earth (orig r3769): PatrickSunter | 2006-08-21 17:35:03 -0700
Fixing checkpoint-restarting in parallel:
* Set an option such that Gauss swarms (which have a SingleCellLayout)
are not checkpointed/reloaded, since the particles are the same on each
processor and cause problems when reloading.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2864
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3768
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2865
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3769
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/FileParticleLayout.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/FileParticleLayout.c 2006-10-11 20:45:32 UTC (rev 4807)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/FileParticleLayout.c 2006-10-11 20:45:34 UTC (rev 4808)
@@ -240,21 +240,21 @@
division = div( bytesCount, particleSize );
self->totalInitialParticles = division.quot;
- Journal_DPrintf( self->debug, "given bytes total %u / particle size %d ->\n"
- "\ttotalInitialParticles = %u.\n", bytesCount, particleSize,
+ Journal_DPrintf( self->debug, "given bytes total %u / particle size %u ->\n"
+ "\ttotalInitialParticles = %u.\n", bytesCount, (unsigned int)particleSize,
self->totalInitialParticles );
Journal_Firewall(
division.rem == 0,
self->errorStream,
- "Error in func %s for %s '%s' - Trying to read particle information from %s which stores %d bytes.\n"
- "This doesn't produce an integer number of particles of size %d - It gives remainder = %d\n",
+ "Error in func %s for %s '%s' - Trying to read particle information from %s which stores %u bytes.\n"
+ "This doesn't produce an integer number of particles of size %u - It gives remainder = %u\n",
__func__,
self->type,
self->name,
filename,
bytesCount,
- particleSize,
+ (unsigned int)particleSize,
division.rem );
Journal_DPrintf( self->debug, "calling parent func to set cell counts:\n", bytesCount );
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/SwarmClass.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/SwarmClass.c 2006-10-11 20:45:32 UTC (rev 4807)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/SwarmClass.c 2006-10-11 20:45:34 UTC (rev 4808)
@@ -45,6 +45,7 @@
#include "ElementCellLayout.h"
#include "ParticleLayout.h"
#include "GlobalParticleLayout.h"
+#include "SingleCellLayout.h"
#include "FileParticleLayout.h"
#include "ParticleCommHandler.h"
#include "IntegrationPoint.h"
@@ -195,6 +196,12 @@
self->cellLayout = (CellLayout*)cellLayout;
self->particleLayout = (ParticleLayout*)particleLayout;
+ /* Check that if either the CellLayout or ParticleLayout is inappropriate to be checkpointed,
+ we set tthe appropriate flags -- PatrickSunter, 22 August 2006 */
+ if ( Stg_Class_IsInstance( self->cellLayout, SingleCellLayout_Type ) ) {
+ self->isSwarmTypeToCheckPointAndReload = False;
+ }
+
self->cellLocalCount = 0;
self->cellDomainCount = 0;
self->cellShadowCount = 0;
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/Swarm_Register.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/Swarm_Register.c 2006-10-11 20:45:32 UTC (rev 4807)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/src/Swarm_Register.c 2006-10-11 20:45:34 UTC (rev 4808)
@@ -203,7 +203,8 @@
return;
}
- Journal_Printf( info, "In %s(): about to save the %u registered swarms to disk:\n", __func__, swarmCount );
+ Journal_Printf( info, "In %s(): about to save the swarms to disk:\n", __func__ );
+
swarmList = Memory_Alloc_Array_Unnamed( Swarm*, swarmCount );
for ( swarm_I=0 ; swarm_I < swarmCount; swarm_I++ ) {
@@ -213,14 +214,23 @@
}
}
- /* Create new SwarmDump object to check point the swarms
- * We're not passing in the 'context' as the second argument because we don't need the swarm dumper to
- * add a hook on the Save entrypoint - contexts can manually execute this function */
- swarmDumper = SwarmDump_New( "swarmDumper", NULL, swarmList, swarmsToDumpCount, True );
- /* Passing the context through allows the swarmDumper to check requested strings etc */
- SwarmDump_Execute( swarmDumper, context );
- Stg_Class_Delete( swarmDumper );
+ if ( swarmsToDumpCount == 0 ) {
+ Journal_Printf( info, "found 0 swarms that need to be checkpointed -> nothing to do\n",
+ swarmsToDumpCount );
+ }
+ else {
+ Journal_Printf( info, "\t(found %u swarms that need to be checkpointed)\n",
+ swarmsToDumpCount );
+ /* Create new SwarmDump object to check point the swarms
+ * We're not passing in the 'context' as the second argument because we don't need the swarm dumper to
+ * add a hook on the Save entrypoint - contexts can manually execute this function */
+ swarmDumper = SwarmDump_New( "swarmDumper", NULL, swarmList, swarmsToDumpCount, True );
+ /* Passing the context through allows the swarmDumper to check requested strings etc */
+ SwarmDump_Execute( swarmDumper, context );
+ Stg_Class_Delete( swarmDumper );
+ }
+
Memory_Free( swarmList );
Journal_Printf( info, "%s: saving of swarms completed.\n", __func__ );
}
More information about the cig-commits
mailing list