[cig-commits] r4887 - in long/3D/Gale/trunk/src/StGermain: . Base/IO/src

walter at geodynamics.org walter at geodynamics.org
Wed Oct 11 13:48:35 PDT 2006


Author: walter
Date: 2006-10-11 13:48:34 -0700 (Wed, 11 Oct 2006)
New Revision: 4887

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Base/IO/src/MPIStream.c
Log:
 r2944 at earth:  boo | 2006-10-11 13:42:50 -0700
  r2860 at earth (orig r3848):  AlanLo | 2006-10-10 23:05:57 -0700
  
  Fixing MPIStream bug on edda.
  
  The Send/Recv of MPI_Offset now uses sizeof(MPI_Offset) MPI_BYTE rather than MPI_INT
  This is because for some  reason the size of MPI_Offset is 8 rather than 4 on edda
  (even though the mpi man specs says its an integer)
  
  This meant that receiving that variable somehow causes a corruption of stack frame 
  (because &offset variable as buffer) which means that all the input arugments to
  the function were corrupted.
  
  This fixes:
  - testMPIStream.0of2
  - testSwarmDumpAndLoad (parallel)
  - checkpointing on edda presumably
  
  
  
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2943
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3847
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2944
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3848

Modified: long/3D/Gale/trunk/src/StGermain/Base/IO/src/MPIStream.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/IO/src/MPIStream.c	2006-10-11 20:48:32 UTC (rev 4886)
+++ long/3D/Gale/trunk/src/StGermain/Base/IO/src/MPIStream.c	2006-10-11 20:48:34 UTC (rev 4887)
@@ -183,13 +183,13 @@
 
 	/* Receive offset from guy on left to find out what point I want to write in the file */
 	if ( rank != 0 ) {
-		MPI_Recv( &offset, 1, MPI_INT, rank - 1, MPIStream_OffsetTag, communicator, &status );
+		MPI_Recv( &offset, sizeof(MPI_Offset), MPI_BYTE, rank - 1, MPIStream_OffsetTag, communicator, &status );
 	}
 
 	/* Send offset to guy on right */
 	endOffset = offset + sizeToWrite;
 	if ( rank != nproc - 1 ) {
-		MPI_Send( &endOffset, 1, MPI_INT, rank + 1, MPIStream_OffsetTag, communicator );
+		MPI_Send( &endOffset, sizeof(MPI_Offset), MPI_BYTE, rank + 1, MPIStream_OffsetTag, communicator );
 	}
 	
 	MPI_File_seek( *(MPI_File*)stream->_file->fileHandle, offset, MPI_SEEK_SET ); 



More information about the cig-commits mailing list