[mpich2-commits] r4098 - mpich2/trunk/test/mpi/rma
jayesh at mcs.anl.gov
jayesh at mcs.anl.gov
Tue Mar 17 11:42:55 CDT 2009
Author: jayesh
Date: 2009-03-17 11:42:55 -0500 (Tue, 17 Mar 2009)
New Revision: 4098
Modified:
mpich2/trunk/test/mpi/rma/test1_dt.c
Log:
Prevent sending the same data twice - Since we are sending 2 MPI_INTS put/get 'SIZE/2 -2' elements from/to array A. The last two elements are used for Accumulate - No reviewer
Modified: mpich2/trunk/test/mpi/rma/test1_dt.c
===================================================================
--- mpich2/trunk/test/mpi/rma/test1_dt.c 2009-03-16 23:30:00 UTC (rev 4097)
+++ mpich2/trunk/test/mpi/rma/test1_dt.c 2009-03-17 16:42:55 UTC (rev 4098)
@@ -48,19 +48,19 @@
MPI_Win_fence(0, win);
if (rank == 0) {
- for (i=0; i<SIZE-1; i++)
+ for (i=0; i<SIZE-2; i+=2)
MPI_Put(A+i, 2, MPI_INT, 1, i, 1, contig_2ints, win);
}
else {
- for (i=0; i<SIZE-1; i++)
+ for (i=0; i<SIZE-2; i+=2)
MPI_Get(A+i, 2, MPI_INT, 0, i, 1, contig_2ints, win);
- MPI_Accumulate(A+i, 2, MPI_INT, 0, i, 1, contig_2ints, MPI_SUM, win);
+ MPI_Accumulate(A+SIZE-2, 2, MPI_INT, 0, SIZE-2, 1, contig_2ints, MPI_SUM, win);
}
MPI_Win_fence(0, win);
if (rank == 1) {
- for (i=0; i<SIZE-1; i++) {
+ for (i=0; i<SIZE-2; i++) {
if (A[i] != B[i]) {
printf("Put/Get Error: A[i]=%d, B[i]=%d\n", A[i], B[i]);
errs++;
More information about the mpich2-commits
mailing list