[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc1-8-gb2ec3e5

mysql vizuser noreply at mpich.org
Fri Nov 8 18:14:07 CST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  b2ec3e57ba40a4208c2c0af75cb2f67690d8fad0 (commit)
      from  84000fccb620e79c00a33440c3484f7ffe0d3f58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/b2ec3e57ba40a4208c2c0af75cb2f67690d8fad0

commit b2ec3e57ba40a4208c2c0af75cb2f67690d8fad0
Author: Antonio J. Pena <apenya at mcs.anl.gov>
Date:   Fri Nov 8 14:25:36 2013 -0600

    Fix win_dynamic_acc test for any number of ranks
    
    Fixes #1971
    
    Signed-off-by: Xin Zhao <xinzhao3 at illinois.edu>

diff --git a/test/mpi/rma/win_dynamic_acc.c b/test/mpi/rma/win_dynamic_acc.c
index ee9f725..2640edd 100644
--- a/test/mpi/rma/win_dynamic_acc.c
+++ b/test/mpi/rma/win_dynamic_acc.c
@@ -11,7 +11,7 @@
 #include <mpi.h>
 #include "mpitest.h"
 
-#define ITER 100
+#define ITER_PER_RANK 25
 
 const int verbose = 0;
 
@@ -19,6 +19,7 @@ int main(int argc, char **argv) {
     int       i, j, rank, nproc;
     int       errors = 0, all_errors = 0;
     int       val = 0, one = 1;
+    int       iter;
     MPI_Aint *val_ptrs;
     MPI_Win   dyn_win;
 
@@ -27,6 +28,8 @@ int main(int argc, char **argv) {
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     MPI_Comm_size(MPI_COMM_WORLD, &nproc);
 
+    iter = ITER_PER_RANK * nproc;
+
     val_ptrs = malloc(nproc * sizeof(MPI_Aint));
     MPI_Get_address(&val, &val_ptrs[rank]);
 
@@ -36,7 +39,7 @@ int main(int argc, char **argv) {
     MPI_Win_create_dynamic(MPI_INFO_NULL, MPI_COMM_WORLD, &dyn_win);
     MPI_Win_attach(dyn_win, &val, sizeof(int));
 
-    for (i = 0; i < ITER; i++) {
+    for (i = 0; i < iter; i++) {
             MPI_Win_fence(MPI_MODE_NOPRECEDE, dyn_win);
             MPI_Accumulate(&one, 1, MPI_INT, i%nproc, val_ptrs[i%nproc], 1, MPI_INT, MPI_SUM, dyn_win);
             MPI_Win_fence(MPI_MODE_NOSUCCEED, dyn_win);
@@ -45,9 +48,9 @@ int main(int argc, char **argv) {
     MPI_Barrier(MPI_COMM_WORLD);
 
     /* Read and verify my data */
-    if ( val != ITER ) {
+    if ( val != iter ) {
         errors++;
-        printf("%d -- Got %d, expected %d\n", rank, val, ITER);
+        printf("%d -- Got %d, expected %d\n", rank, val, iter);
     }
 
     MPI_Win_detach(dyn_win, &val);

-----------------------------------------------------------------------

Summary of changes:
 test/mpi/rma/win_dynamic_acc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list