Changeset 679

Show
Ignore:
Timestamp:
10/26/09 16:19:19 (4 weeks ago)
Author:
robl
Message:

add an assertion: on systems with a 32 bit MPI_Aint (32 bit systems except
BlueGene?) we will be unable to create the MPI datatype without overflowing an
MPI_Aint argument when reading record variables strided across more than 4GB.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/mpinetcdf.c

    r675 r679  
    11591159          MPI_Type_commit(&filetype); 
    11601160        } else { 
     1161            /* assertion: because recsize will be used to set up the file 
     1162             * view, we must ensure there is no overflow when specifying 
     1163             * how big a stride there is between items (think interleaved 
     1164             * records).   
     1165             * 
     1166             * note: 'recsize' is the sum of the record size of all record 
     1167             * variables in this dataset */ 
     1168            if (ncp->recsize != (MPI_Aint)ncp->recsize) { 
     1169                    fprintf(stderr, "Type overflow: unable to read/write multiple records in this dataset\non this platform. Please either access records of this record variable\none-at-a-time or run on a 64 bit platform\n"); 
     1170            } 
     1171            assert (ncp->recsize == (MPI_Aint)ncp->recsize); 
    11611172 
    11621173          /* more than one record variables */