[mpich2-commits] r6709 - mpich2/trunk/test/mpi/cxx/util
jayesh at mcs.anl.gov
jayesh at mcs.anl.gov
Mon May 24 11:05:25 CDT 2010
Author: jayesh
Date: 2010-05-24 11:05:25 -0500 (Mon, 24 May 2010)
New Revision: 6709
Modified:
mpich2/trunk/test/mpi/cxx/util/mtest.cxx
Log:
The dtype for storing total size of a datatype should be atleast as big the size of the datatype
Modified: mpich2/trunk/test/mpi/cxx/util/mtest.cxx
===================================================================
--- mpich2/trunk/test/mpi/cxx/util/mtest.cxx 2010-05-24 15:38:27 UTC (rev 6708)
+++ mpich2/trunk/test/mpi/cxx/util/mtest.cxx 2010-05-24 16:05:25 UTC (rev 6709)
@@ -120,7 +120,8 @@
MPI::Aint size, lb;
if (mtype->count > 0) {
signed char *p;
- int i, totsize;
+ int i;
+ MPI::Aint totsize;
mtype->datatype.Get_extent( lb, size );
totsize = size * mtype->count;
if (!mtype->buf) {
@@ -150,7 +151,8 @@
MPI_Aint size;
if (mtype->count > 0) {
signed char *p;
- int i, totsize;
+ int i;
+ MPI::Aint totsize;
MPI_Type_extent( mtype->datatype, &size );
totsize = size * mtype->count;
if (!mtype->buf) {
@@ -185,8 +187,8 @@
{
unsigned char *p;
unsigned char expected;
- int i, totsize, err = 0;
- MPI_Aint size;
+ int i, err = 0;
+ MPI_Aint size, totsize;
p = (unsigned char *)mtype->buf;
if (p) {
@@ -218,7 +220,8 @@
if (mtype->count > 0) {
unsigned char *p;
- int i, j, k, nc, totsize;
+ int i, j, k, nc;
+ MPI::Aint totsize;
mtype->datatype.Get_extent( lb, size );
totsize = mtype->count * size;
More information about the mpich2-commits
mailing list