[cig-commits] r4868 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Mesh/src
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:47:53 PDT 2006
Author: walter
Date: 2006-10-11 13:47:52 -0700 (Wed, 11 Oct 2006)
New Revision: 4868
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CommTopology.c
Log:
r2925 at earth: boo | 2006-10-11 13:42:44 -0700
r2841 at earth (orig r3829): LukeHodkinson | 2006-10-04 18:12:08 -0700
With the communication topology it's possible some
processes will have nothing in common with any others,
meaning they'll have no neighbours. This situation
was causing problems with the all-to-all and all-gather
routines.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2924
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3828
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2925
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3829
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CommTopology.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CommTopology.c 2006-10-11 20:47:50 UTC (rev 4867)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CommTopology.c 2006-10-11 20:47:52 UTC (rev 4868)
@@ -258,7 +258,7 @@
MPI_Status status;
unsigned* nbrSizes;
unsigned* tmpSizes;
- Stg_Byte** nbrArrays;
+ Stg_Byte** nbrArrays;
unsigned p_i;
assert( self );
@@ -266,6 +266,13 @@
assert( dstSizes );
assert( dstArrays );
+ /* Skip this if we have no neighbours. */
+ if( !self->nInc ) {
+ *dstSizes = NULL;
+ *dstArrays = NULL;
+ return;
+ }
+
/* Need space for neighbour sizes. */
nbrSizes = Memory_Alloc_Array_Unnamed( unsigned, self->nInc );
tmpSizes = Memory_Alloc_Array_Unnamed( unsigned, self->nInc );
@@ -313,15 +320,21 @@
MPI_Status status;
unsigned* nbrSizes;
unsigned* tmpSizes;
- Stg_Byte** nbrArrays;
+ Stg_Byte** nbrArrays;
unsigned p_i;
assert( self );
- assert( srcSizes );
- assert( srcArrays );
+ assert( !srcSizes || srcArrays );
assert( dstSizes );
assert( dstArrays );
+ /* Skip this if we have no neighbours. */
+ if( !self->nInc ) {
+ *dstSizes = NULL;
+ *dstArrays = NULL;
+ return;
+ }
+
/* Need space for neighbour sizes. */
nbrSizes = Memory_Alloc_Array_Unnamed( unsigned, self->nInc );
tmpSizes = Memory_Alloc_Array_Unnamed( unsigned, self->nInc );
More information about the cig-commits
mailing list