[mpich-commits] r10680 - mpich2/trunk/test/mpi/rma

dinan at mcs.anl.gov dinan at mcs.anl.gov
Tue Nov 27 17:40:06 CST 2012


Author: dinan
Date: 2012-11-27 17:40:06 -0600 (Tue, 27 Nov 2012)
New Revision: 10680

Modified:
   mpich2/trunk/test/mpi/rma/compare_and_swap.c
   mpich2/trunk/test/mpi/rma/fetch_and_op.c
   mpich2/trunk/test/mpi/rma/get_accumulate.c
   mpich2/trunk/test/mpi/rma/put_base.c
   mpich2/trunk/test/mpi/rma/put_bottom.c
   mpich2/trunk/test/mpi/rma/strided_acc_indexed.c
   mpich2/trunk/test/mpi/rma/strided_acc_onelock.c
   mpich2/trunk/test/mpi/rma/strided_acc_subarray.c
   mpich2/trunk/test/mpi/rma/strided_get_indexed.c
   mpich2/trunk/test/mpi/rma/strided_getacc_indexed.c
   mpich2/trunk/test/mpi/rma/strided_getacc_indexed_shared.c
   mpich2/trunk/test/mpi/rma/strided_putget_indexed.c
   mpich2/trunk/test/mpi/rma/strided_putget_indexed_shared.c
Log:
Updated RMA tests to use shared squelch code

Reviewer: goodell

Modified: mpich2/trunk/test/mpi/rma/compare_and_swap.c
===================================================================
--- mpich2/trunk/test/mpi/rma/compare_and_swap.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/compare_and_swap.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -10,22 +10,10 @@
 #include <assert.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
 #define ITER 100
 
-const int verbose = 0;
-
 int main(int argc, char **argv) {
     int       i, j, rank, nproc;
     int       errors = 0, all_errors = 0;

Modified: mpich2/trunk/test/mpi/rma/fetch_and_op.c
===================================================================
--- mpich2/trunk/test/mpi/rma/fetch_and_op.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/fetch_and_op.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -10,22 +10,10 @@
 #include <assert.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT || verbose) { \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
 #define ITER 100
 
-const int verbose = 0;
-
 #if defined (FOP_TYPE_CHAR)
 #  define TYPE_C   char
 #  define TYPE_MPI MPI_CHAR

Modified: mpich2/trunk/test/mpi/rma/get_accumulate.c
===================================================================
--- mpich2/trunk/test/mpi/rma/get_accumulate.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/get_accumulate.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -10,18 +10,8 @@
 #include <string.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                              \
-  do {                                          \
-    if (SQ_COUNT < SQ_LIMIT || verbose) {       \
-      SQ_COUNT++;                               \
-      X                                         \
-    }                                           \
-  } while (0)
-
 #define ITER  100
 #define COUNT 5
 
@@ -49,8 +39,6 @@
 #  define TYPE_MPI TYPE_MPI_BASE
 #endif
 
-const int verbose = 0;
-
 void reset_bufs(TYPE_C *win_ptr, TYPE_C *res_ptr, TYPE_C *val_ptr, TYPE_C value, MPI_Win win) {
     int rank, nproc, i;
 

Modified: mpich2/trunk/test/mpi/rma/put_base.c
===================================================================
--- mpich2/trunk/test/mpi/rma/put_base.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/put_base.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -24,6 +24,7 @@
 #include <stdint.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 1024
 #define YDIM 1024
@@ -31,19 +32,6 @@
 #define SUB_YDIM 1024
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double  *win_buf, *src_buf, *dst_buf;
@@ -61,9 +49,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &dst_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Put Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf  + i) = 1.0 + rank;
         *(src_buf + i) = 1.0 + rank;
@@ -86,9 +71,6 @@
 
       MPI_Get_address(base_ptr, &base_int);
 
-      if (rank == 0)
-        if (verbose) printf(" + iteration %d\n", i);
-
       for (j = 0; j < SUB_YDIM; j++) {
         MPI_Get_address(&src_buf[j*XDIM], &idx_loc[j]);
         idx_loc[j] = idx_loc[j] - base_int;

Modified: mpich2/trunk/test/mpi/rma/put_bottom.c
===================================================================
--- mpich2/trunk/test/mpi/rma/put_bottom.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/put_bottom.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 1024
 #define YDIM 1024
@@ -29,19 +30,6 @@
 #define SUB_YDIM 1024
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double *win_buf, *src_buf, *dst_buf;
@@ -57,9 +45,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &dst_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Put Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf  + i) = 1.0 + rank;
         *(src_buf + i) = 1.0 + rank;
@@ -77,9 +62,6 @@
       int blk_len[SUB_YDIM];
       MPI_Datatype src_type, dst_type;
 
-      if (rank == 0)
-        if (verbose) printf(" + iteration %d\n", i);
-
       for (j = 0; j < SUB_YDIM; j++) {
         MPI_Get_address(&src_buf[j*XDIM], &idx_loc[j]);
         idx_rem[j] = j*XDIM*sizeof(double);

Modified: mpich2/trunk/test/mpi/rma/strided_acc_indexed.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_acc_indexed.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_acc_indexed.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 16
 #define YDIM 16
@@ -27,21 +28,6 @@
 #define SUB_YDIM 8
 #define ITERATIONS 1
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-/*
-static int verbose = 0;
-*/
-
 int main(int argc, char **argv) {
     int itr, i, j, rank, nranks, peer, bufsize, errors;
     double *win_buf, *src_buf;
@@ -56,12 +42,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &win_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
 
-    /*
-    Commment this out to avoid gcc --enable-stricttest warning.
-    if (rank == 0)
-        if (verbose) ("MPI RMA Strided Accumulate Test:\n");
-    */
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf + i) = -1.0;
         *(src_buf + i) = 1.0 + rank;

Modified: mpich2/trunk/test/mpi/rma/strided_acc_onelock.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_acc_onelock.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_acc_onelock.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -17,24 +17,12 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 1024 
 #define YDIM 1024
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double *buffer, *src_buf;
@@ -49,9 +37,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &buffer);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Accumulate Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(buffer  + i) = 1.0 + rank;
         *(src_buf + i) = 1.0 + rank;

Modified: mpich2/trunk/test/mpi/rma/strided_acc_subarray.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_acc_subarray.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_acc_subarray.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 1024 
 #define YDIM 1024
@@ -27,19 +28,6 @@
 #define SUB_YDIM 512
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double *win_buf, *src_buf;
@@ -54,9 +42,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &win_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Accumulate Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf + i) = -1.0;
         *(src_buf + i) = 1.0 + rank;

Modified: mpich2/trunk/test/mpi/rma/strided_get_indexed.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_get_indexed.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_get_indexed.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,25 +20,13 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 8
 #define YDIM 1024
 #define SUB_XDIM 8
 #define SUB_YDIM 256
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double *win_buf, *loc_buf;
@@ -57,9 +45,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &win_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &loc_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Get Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf + i) =  1.0 + rank;
         *(loc_buf + i) = -1.0;

Modified: mpich2/trunk/test/mpi/rma/strided_getacc_indexed.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_getacc_indexed.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_getacc_indexed.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 8
 #define YDIM 1024
@@ -27,19 +28,6 @@
 #define SUB_YDIM 2
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double *win_buf, *src_buf, *dst_buf;
@@ -55,9 +43,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &dst_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Accumulate Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf + i) = -1.0;
         *(src_buf + i) =  1.0 + rank;

Modified: mpich2/trunk/test/mpi/rma/strided_getacc_indexed_shared.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_getacc_indexed_shared.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_getacc_indexed_shared.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 8
 #define YDIM 1024
@@ -27,19 +28,6 @@
 #define SUB_YDIM 2
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int rank, nranks, rank_world, nranks_world;
     int i, j, peer, bufsize, errors;
@@ -61,9 +49,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &dst_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Accumulate Test (shared memory window):\n");
-
     MPI_Win_allocate_shared(bufsize, 1, MPI_INFO_NULL, shr_comm, &win_buf, &buf_win);
 
     MPI_Win_fence(0, buf_win);

Modified: mpich2/trunk/test/mpi/rma/strided_putget_indexed.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_putget_indexed.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_putget_indexed.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 8
 #define YDIM 1024
@@ -27,19 +28,6 @@
 #define SUB_YDIM 255
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int i, j, rank, nranks, peer, bufsize, errors;
     double *win_buf, *src_buf, *dst_buf;
@@ -55,9 +43,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &dst_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Accumulate Test:\n");
-
     for (i = 0; i < XDIM*YDIM; i++) {
         *(win_buf + i) = -1.0;
         *(src_buf + i) =  1.0 + rank;

Modified: mpich2/trunk/test/mpi/rma/strided_putget_indexed_shared.c
===================================================================
--- mpich2/trunk/test/mpi/rma/strided_putget_indexed_shared.c	2012-11-27 23:40:04 UTC (rev 10679)
+++ mpich2/trunk/test/mpi/rma/strided_putget_indexed_shared.c	2012-11-27 23:40:06 UTC (rev 10680)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <mpi.h>
 #include "mpitest.h"
+#include "squelch.h"
 
 #define XDIM 8
 #define YDIM 1024
@@ -27,19 +28,6 @@
 #define SUB_YDIM 255
 #define ITERATIONS 10
 
-static const int SQ_LIMIT = 10;
-static       int SQ_COUNT = 0;
-
-#define SQUELCH(X)                      \
-  do {                                  \
-    if (SQ_COUNT < SQ_LIMIT) {          \
-      SQ_COUNT++;                       \
-      X                                 \
-    }                                   \
-  } while (0)
-
-static int verbose = 0;
-
 int main(int argc, char **argv) {
     int rank, nranks, rank_world, nranks_world;
     int i, j, peer, bufsize, errors;
@@ -61,9 +49,6 @@
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &src_buf);
     MPI_Alloc_mem(bufsize, MPI_INFO_NULL, &dst_buf);
 
-    if (rank == 0)
-        if (verbose) printf("MPI RMA Strided Accumulate Test (shared memory window):\n");
-
     MPI_Win_allocate_shared(bufsize, 1, MPI_INFO_NULL, shr_comm, &win_buf, &buf_win);
 
     MPI_Win_fence(0, buf_win);



More information about the commits mailing list