[cig-commits] r4335 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Mesh/src
walter at geodynamics.org
walter at geodynamics.org
Thu Aug 17 17:17:35 PDT 2006
Author: walter
Date: 2006-08-17 17:17:35 -0700 (Thu, 17 Aug 2006)
New Revision: 4335
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.c
long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.h
Log:
r2712 at earth: boo | 2006-08-17 17:14:23 -0700
r2666 at earth (orig r3747): LukeHodkinson | 2006-08-03 17:27:54 -0700
Fixed a particularly nasty memory bug in the decomposition
component.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2711
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3746
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2712
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3747
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.c 2006-08-18 00:17:32 UTC (rev 4334)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.c 2006-08-18 00:17:35 UTC (rev 4335)
@@ -317,7 +317,7 @@
}
}
-void Decomp_AddRemotes( void* decomp, unsigned nRemotes, unsigned* remotes ) {
+void Decomp_SetRemotes( void* decomp, unsigned nRemotes, unsigned* remotes ) {
Decomp* self = (Decomp*)decomp;
/* Sanity checks. */
@@ -343,14 +343,18 @@
Decomp_DestructNegotiated( self );
/* Store remote information. */
- self->nRemotes += nRemotes;
+ self->nRemotes = nRemotes;
+ self->nDomains = self->nLocals + self->nLeased + nRemotes;
if( nRemotes ) {
- self->nDomains += nRemotes;
- if( !self->domains )
+ if( !self->domains ) {
self->domains = Memory_Alloc_Array( unsigned, self->nDomains, "Decomp::domains" );
- else
+ }
+ else {
self->domains = Memory_Realloc_Array( self->domains, unsigned, self->nDomains );
- self->remotes = self->domains + self->nLocals + self->nLeased;
+ }
+ self->locals = self->domains;
+ self->leased = self->locals + self->nLocals;
+ self->remotes = self->leased + self->nLeased;
memcpy( self->remotes, remotes, nRemotes * sizeof(unsigned) );
}
self->nShadows = self->nLeased + nRemotes;
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.h 2006-08-18 00:17:32 UTC (rev 4334)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/Decomp.h 2006-08-18 00:17:35 UTC (rev 4335)
@@ -154,7 +154,7 @@
void Decomp_SetNGlobals( void* decomp, unsigned nGlobals );
void Decomp_SetLocals( void* decomp, unsigned nLocals, unsigned* locals,
unsigned nLeased, unsigned* leased );
- void Decomp_AddRemotes( void* decomp, unsigned nRemotes, unsigned* remotes );
+ void Decomp_SetRemotes( void* decomp, unsigned nRemotes, unsigned* remotes );
void Decomp_Negotiate( void* decomp );
Bool Decomp_IsDomain( void* decomp, unsigned global );
unsigned Decomp_GlobalToDomain( void* decomp, unsigned global );
More information about the cig-commits
mailing list