[cig-commits] r14637 - long/3D/SNAC/trunk/Snac/libSnac/src

echoi at geodynamics.org echoi at geodynamics.org
Wed Apr 8 15:32:49 PDT 2009


Author: echoi
Date: 2009-04-08 15:32:49 -0700 (Wed, 08 Apr 2009)
New Revision: 14637

Modified:
   long/3D/SNAC/trunk/Snac/libSnac/src/Context.c
Log:
1. Values of numProc[X,Y,Z] are taken directly from partition3DCounts[0-2] instead of going through the Dictionary facility.

2. sim.* files now have more information: 3 global element numbers and 3 processor numbers on top of the existing 3 local element numbers.
	- snac2vtk can read in this file so that the number of arguments can be greatly reduced.



Modified: long/3D/SNAC/trunk/Snac/libSnac/src/Context.c
===================================================================
--- long/3D/SNAC/trunk/Snac/libSnac/src/Context.c	2009-04-08 22:01:27 UTC (rev 14636)
+++ long/3D/SNAC/trunk/Snac/libSnac/src/Context.c	2009-04-08 22:32:49 UTC (rev 14637)
@@ -354,21 +354,12 @@
 	 *      by the user from the numbers recorded in sim.x and in the original input xml.
 	 *      Addition of these variables will enforce reporting of the processor geometry and speed postprocessing.
 	 */
-	self->numProcX = Dictionary_Entry_Value_AsUnsignedInt(
-		Dictionary_GetDefault( self->dictionary, "numProcX", 
-		  Dictionary_Entry_Value_FromUnsignedInt( ((HexaMD*)self->mesh->layout->decomp)->partition3DCounts[0] ) ) );
-	self->numProcY = Dictionary_Entry_Value_AsUnsignedInt(
-		Dictionary_GetDefault( self->dictionary, "numProcY", 
-		  Dictionary_Entry_Value_FromUnsignedInt( ((HexaMD*)self->mesh->layout->decomp)->partition3DCounts[1] ) ) );
-	self->numProcZ = Dictionary_Entry_Value_AsUnsignedInt(
-		Dictionary_GetDefault( self->dictionary, "numProcZ", 
-		  Dictionary_Entry_Value_FromUnsignedInt( ((HexaMD*)self->mesh->layout->decomp)->partition3DCounts[2] ) ) );
-
+	self->numProcX = ((HexaMD*)self->mesh->layout->decomp)->partition3DCounts[0];
+	self->numProcY = ((HexaMD*)self->mesh->layout->decomp)->partition3DCounts[1];
+	self->numProcZ = ((HexaMD*)self->mesh->layout->decomp)->partition3DCounts[2];
 	Journal_Printf( self->info, "\nParallel processing geometry:  nX=%d  nY=%d  nZ=%d\n\n",
 			self->numProcX,self->numProcY,self->numProcZ );
-	
 
-
 	/* Add initial condition managers */
 	nodeICsDict = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( self->dictionary, "nodeICs" ) );
 	self->nodeICs = CompositeVC_New( "nodeIC", self->variable_Register, self->condFunc_Register, nodeICsDict, self->mesh );
@@ -392,10 +383,14 @@
 			"\"%s\"  failed to open file for writing", tmpBuf );
 	}
 	else {
-		fprintf( self->simInfo, "%u %u %u\n",
-			((HexaMD*)self->mesh->layout->decomp)->elementLocal3DCounts[self->rank][0],
-			((HexaMD*)self->mesh->layout->decomp)->elementLocal3DCounts[self->rank][1],
-			((HexaMD*)self->mesh->layout->decomp)->elementLocal3DCounts[self->rank][2] );
+		fprintf( self->simInfo, "%u %u %u %u %u %u %u %u %u\n(global element numbers)[3]=(proc numbers)[3]*(local element numbers)[3]\n",
+				 ((HexaMD*)self->mesh->layout->decomp)->elementGlobal3DCounts[0],
+				 ((HexaMD*)self->mesh->layout->decomp)->elementGlobal3DCounts[1],
+				 ((HexaMD*)self->mesh->layout->decomp)->elementGlobal3DCounts[2], 
+				 self->numProcX, self->numProcY, self->numProcZ,
+				 ((HexaMD*)self->mesh->layout->decomp)->elementLocal3DCounts[self->rank][0],
+				 ((HexaMD*)self->mesh->layout->decomp)->elementLocal3DCounts[self->rank][1],
+				 ((HexaMD*)self->mesh->layout->decomp)->elementLocal3DCounts[self->rank][2] );
 		fflush( self->simInfo );
 	}
 	sprintf( tmpBuf, "%s/timeStep.%u", self->outputPath, self->rank );
@@ -1045,7 +1040,7 @@
 
 	Journal_Dump( self->strainRateOut, &(self->timeStep) );
 	Journal_Dump( self->stressOut, &(self->timeStep) );
-        Journal_Dump( self->hydroPressureOut, &(self->timeStep) );
+	Journal_Dump( self->hydroPressureOut, &(self->timeStep) );
 	_Snac_Context_DumpStressTensor( self );
 
 	KeyCall( self, self->loopNodesMomentumK, EntryPoint_VoidPtr_CallCast* )( KeyHandle(self,self->loopNodesMomentumK), self );



More information about the CIG-COMMITS mailing list