[mpich2-commits] r7996 - mpich2/trunk/test/mpi/rma

dinan at mcs.anl.gov dinan at mcs.anl.gov
Sun Feb 20 19:26:43 CST 2011


Author: dinan
Date: 2011-02-20 19:26:43 -0600 (Sun, 20 Feb 2011)
New Revision: 7996

Added:
   mpich2/trunk/test/mpi/rma/contention_put.c
   mpich2/trunk/test/mpi/rma/contention_putget.c
Removed:
   mpich2/trunk/test/mpi/rma/contention-put.c
   mpich2/trunk/test/mpi/rma/contention-putget.c
Modified:
   mpich2/trunk/test/mpi/rma/Makefile.sm
   mpich2/trunk/test/mpi/rma/testlist
Log:
Renamed tests s/-/_/ and integrated into the test suite.



Modified: mpich2/trunk/test/mpi/rma/Makefile.sm
===================================================================
--- mpich2/trunk/test/mpi/rma/Makefile.sm	2011-02-21 01:21:18 UTC (rev 7995)
+++ mpich2/trunk/test/mpi/rma/Makefile.sm	2011-02-21 01:26:43 UTC (rev 7996)
@@ -68,6 +68,8 @@
 strided_acc_subarray_SOURCES   = strided_acc_subarray.c
 strided_get_indexed_SOURCES    = strided_get_indexed.c
 window_creation_SOURCES        = window_creation.c
+contention_put_SOURCES         = contention_put.c
+contention_putget_SOURCES      = contention_putget.c
 
 ../util/mtest.o:
 	(cd ../util && $(MAKE) )

Deleted: mpich2/trunk/test/mpi/rma/contention-put.c
===================================================================
--- mpich2/trunk/test/mpi/rma/contention-put.c	2011-02-21 01:21:18 UTC (rev 7995)
+++ mpich2/trunk/test/mpi/rma/contention-put.c	2011-02-21 01:26:43 UTC (rev 7996)
@@ -1,84 +0,0 @@
-/** Contended RMA put test -- James Dinan <dinan at mcs.anl.gov>
-  *
-  * Each process issues COUNT put operations to non-overlapping locations on
-  * every other processs.
-  */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <mpi.h>
-
-#define MAXELEMS      6400
-#define COUNT         1000
-
-static int me, nproc;
-static const int verbose = 0;
-
-void test_put() {
-  MPI_Win  dst_win;
-  double  *dst_buf;
-  double   src_buf[MAXELEMS];
-  int      i, j;
-
-  MPI_Alloc_mem(sizeof(double)*nproc*MAXELEMS, MPI_INFO_NULL, &dst_buf);
-  MPI_Win_create(dst_buf, sizeof(double)*nproc*MAXELEMS, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &dst_win);
-
-  for (i = 0; i < MAXELEMS; i++)
-    src_buf[i] = me + 1.0;
-
-  MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, me, dst_win);
-
-  for (i = 0; i < nproc*MAXELEMS; i++)
-    dst_buf[i] = 0.0;
-
-  MPI_Win_unlock(me, dst_win);
-
-  MPI_Barrier(MPI_COMM_WORLD);
-
-  for(i = 0; i < nproc; i++) {
-    /* int target = (me + i) % nproc; */
-    int target = i;
-    for(j = 0; j < COUNT; j++) {
-      if (verbose) printf("%2d -> %2d [%2d]\n", me, target, j); 
-      MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, dst_win);
-      MPI_Put(&src_buf[j], sizeof(double), MPI_BYTE, target, (me*MAXELEMS+j)*sizeof(double), sizeof(double), MPI_BYTE, dst_win);
-      MPI_Win_unlock(target, dst_win);
-    }
-  }
-
-  MPI_Barrier(MPI_COMM_WORLD);
-
-  MPI_Win_free(&dst_win);
-  MPI_Free_mem(dst_buf);
-}
-
-
-int main(int argc, char* argv[]) {
-  MPI_Init(&argc, &argv);
-  MPI_Comm_size(MPI_COMM_WORLD, &nproc);
-  MPI_Comm_rank(MPI_COMM_WORLD, &me);
-
-  assert(COUNT <= MAXELEMS);
-
-  if (me == 0 && verbose) {
-    printf("Test starting on %d processes\n", nproc); 
-    fflush(stdout);
-  }
-
-  test_put();
-
-  MPI_Barrier(MPI_COMM_WORLD);
-
-  MPI_Finalize();
-
-  if (me == 0 && verbose) {
-    printf("Test completed.\n");
-    fflush(stdout);
-  }
-
-  if (me == 0)
-    printf(" No Errors\n");
-
-  return 0;
-}

Deleted: mpich2/trunk/test/mpi/rma/contention-putget.c
===================================================================
--- mpich2/trunk/test/mpi/rma/contention-putget.c	2011-02-21 01:21:18 UTC (rev 7995)
+++ mpich2/trunk/test/mpi/rma/contention-putget.c	2011-02-21 01:26:43 UTC (rev 7996)
@@ -1,91 +0,0 @@
-/** Contended RMA put/get test -- James Dinan <dinan at mcs.anl.gov>
-  *
-  * Each process issues COUNT put and get operations to non-overlapping
-  * locations on every other processs.
-  */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <mpi.h>
-
-#define MAXELEMS      6400
-#define COUNT         1000
-
-static int me, nproc;
-static const int verbose = 0;
-
-void test_put() {
-  MPI_Win  dst_win;
-  double  *dst_buf;
-  double   src_buf[MAXELEMS];
-  int      i, j;
-
-  MPI_Alloc_mem(sizeof(double)*nproc*MAXELEMS, MPI_INFO_NULL, &dst_buf);
-  MPI_Win_create(dst_buf, sizeof(double)*nproc*MAXELEMS, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &dst_win);
-
-  for (i = 0; i < MAXELEMS; i++)
-    src_buf[i] = me + 1.0;
-
-  MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, me, dst_win);
-
-  for (i = 0; i < nproc*MAXELEMS; i++)
-    dst_buf[i] = 0.0;
-
-  MPI_Win_unlock(me, dst_win);
-
-  MPI_Barrier(MPI_COMM_WORLD);
-
-  for(i = 0; i < nproc; i++) {
-    int target = i;
-
-    for(j = 0; j < COUNT; j++) {
-      if (verbose) printf("%2d -> %2d [%2d]\n", me, target, j); 
-      MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, dst_win);
-      MPI_Put(&src_buf[j], sizeof(double), MPI_BYTE, target, (me*MAXELEMS+j)*sizeof(double), sizeof(double), MPI_BYTE, dst_win);
-      MPI_Win_unlock(target, dst_win);
-    }
-
-    for(j = 0; j < COUNT; j++) {
-      if (verbose) printf("%2d <- %2d [%2d]\n", me, target, j); 
-      MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, dst_win);
-      MPI_Get(&src_buf[j], sizeof(double), MPI_BYTE, target, (me*MAXELEMS+j)*sizeof(double), sizeof(double), MPI_BYTE, dst_win);
-      MPI_Win_unlock(target, dst_win);
-    }
-  }
-
-  MPI_Barrier(MPI_COMM_WORLD);
-
-  MPI_Win_free(&dst_win);
-  MPI_Free_mem(dst_buf);
-}
-
-
-int main(int argc, char* argv[]) {
-  MPI_Init(&argc, &argv);
-  MPI_Comm_size(MPI_COMM_WORLD, &nproc);
-  MPI_Comm_rank(MPI_COMM_WORLD, &me);
-
-  assert(COUNT <= MAXELEMS);
-
-  if (me == 0 && verbose) {
-    printf("Test starting on %d processes\n", nproc); 
-    fflush(stdout);
-  }
-
-  test_put();
-
-  MPI_Barrier(MPI_COMM_WORLD);
-
-  MPI_Finalize();
-
-  if (me == 0 && verbose) {
-    printf("Test completed.\n");
-    fflush(stdout);
-  }
-
-  if (me == 0)
-    printf(" No Errors\n");
-
-  return 0;
-}

Copied: mpich2/trunk/test/mpi/rma/contention_put.c (from rev 7994, mpich2/trunk/test/mpi/rma/contention-put.c)
===================================================================
--- mpich2/trunk/test/mpi/rma/contention_put.c	                        (rev 0)
+++ mpich2/trunk/test/mpi/rma/contention_put.c	2011-02-21 01:26:43 UTC (rev 7996)
@@ -0,0 +1,84 @@
+/** Contended RMA put test -- James Dinan <dinan at mcs.anl.gov>
+  *
+  * Each process issues COUNT put operations to non-overlapping locations on
+  * every other processs.
+  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <mpi.h>
+
+#define MAXELEMS      6400
+#define COUNT         1000
+
+static int me, nproc;
+static const int verbose = 0;
+
+void test_put() {
+  MPI_Win  dst_win;
+  double  *dst_buf;
+  double   src_buf[MAXELEMS];
+  int      i, j;
+
+  MPI_Alloc_mem(sizeof(double)*nproc*MAXELEMS, MPI_INFO_NULL, &dst_buf);
+  MPI_Win_create(dst_buf, sizeof(double)*nproc*MAXELEMS, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &dst_win);
+
+  for (i = 0; i < MAXELEMS; i++)
+    src_buf[i] = me + 1.0;
+
+  MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, me, dst_win);
+
+  for (i = 0; i < nproc*MAXELEMS; i++)
+    dst_buf[i] = 0.0;
+
+  MPI_Win_unlock(me, dst_win);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  for(i = 0; i < nproc; i++) {
+    /* int target = (me + i) % nproc; */
+    int target = i;
+    for(j = 0; j < COUNT; j++) {
+      if (verbose) printf("%2d -> %2d [%2d]\n", me, target, j); 
+      MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, dst_win);
+      MPI_Put(&src_buf[j], sizeof(double), MPI_BYTE, target, (me*MAXELEMS+j)*sizeof(double), sizeof(double), MPI_BYTE, dst_win);
+      MPI_Win_unlock(target, dst_win);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  MPI_Win_free(&dst_win);
+  MPI_Free_mem(dst_buf);
+}
+
+
+int main(int argc, char* argv[]) {
+  MPI_Init(&argc, &argv);
+  MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+  MPI_Comm_rank(MPI_COMM_WORLD, &me);
+
+  assert(COUNT <= MAXELEMS);
+
+  if (me == 0 && verbose) {
+    printf("Test starting on %d processes\n", nproc); 
+    fflush(stdout);
+  }
+
+  test_put();
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  MPI_Finalize();
+
+  if (me == 0 && verbose) {
+    printf("Test completed.\n");
+    fflush(stdout);
+  }
+
+  if (me == 0)
+    printf(" No Errors\n");
+
+  return 0;
+}

Copied: mpich2/trunk/test/mpi/rma/contention_putget.c (from rev 7994, mpich2/trunk/test/mpi/rma/contention-putget.c)
===================================================================
--- mpich2/trunk/test/mpi/rma/contention_putget.c	                        (rev 0)
+++ mpich2/trunk/test/mpi/rma/contention_putget.c	2011-02-21 01:26:43 UTC (rev 7996)
@@ -0,0 +1,91 @@
+/** Contended RMA put/get test -- James Dinan <dinan at mcs.anl.gov>
+  *
+  * Each process issues COUNT put and get operations to non-overlapping
+  * locations on every other processs.
+  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <mpi.h>
+
+#define MAXELEMS      6400
+#define COUNT         1000
+
+static int me, nproc;
+static const int verbose = 0;
+
+void test_put() {
+  MPI_Win  dst_win;
+  double  *dst_buf;
+  double   src_buf[MAXELEMS];
+  int      i, j;
+
+  MPI_Alloc_mem(sizeof(double)*nproc*MAXELEMS, MPI_INFO_NULL, &dst_buf);
+  MPI_Win_create(dst_buf, sizeof(double)*nproc*MAXELEMS, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &dst_win);
+
+  for (i = 0; i < MAXELEMS; i++)
+    src_buf[i] = me + 1.0;
+
+  MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, me, dst_win);
+
+  for (i = 0; i < nproc*MAXELEMS; i++)
+    dst_buf[i] = 0.0;
+
+  MPI_Win_unlock(me, dst_win);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  for(i = 0; i < nproc; i++) {
+    int target = i;
+
+    for(j = 0; j < COUNT; j++) {
+      if (verbose) printf("%2d -> %2d [%2d]\n", me, target, j); 
+      MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, dst_win);
+      MPI_Put(&src_buf[j], sizeof(double), MPI_BYTE, target, (me*MAXELEMS+j)*sizeof(double), sizeof(double), MPI_BYTE, dst_win);
+      MPI_Win_unlock(target, dst_win);
+    }
+
+    for(j = 0; j < COUNT; j++) {
+      if (verbose) printf("%2d <- %2d [%2d]\n", me, target, j); 
+      MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, dst_win);
+      MPI_Get(&src_buf[j], sizeof(double), MPI_BYTE, target, (me*MAXELEMS+j)*sizeof(double), sizeof(double), MPI_BYTE, dst_win);
+      MPI_Win_unlock(target, dst_win);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  MPI_Win_free(&dst_win);
+  MPI_Free_mem(dst_buf);
+}
+
+
+int main(int argc, char* argv[]) {
+  MPI_Init(&argc, &argv);
+  MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+  MPI_Comm_rank(MPI_COMM_WORLD, &me);
+
+  assert(COUNT <= MAXELEMS);
+
+  if (me == 0 && verbose) {
+    printf("Test starting on %d processes\n", nproc); 
+    fflush(stdout);
+  }
+
+  test_put();
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  MPI_Finalize();
+
+  if (me == 0 && verbose) {
+    printf("Test completed.\n");
+    fflush(stdout);
+  }
+
+  if (me == 0)
+    printf(" No Errors\n");
+
+  return 0;
+}

Modified: mpich2/trunk/test/mpi/rma/testlist
===================================================================
--- mpich2/trunk/test/mpi/rma/testlist	2011-02-21 01:21:18 UTC (rev 7995)
+++ mpich2/trunk/test/mpi/rma/testlist	2011-02-21 01:26:43 UTC (rev 7996)
@@ -52,3 +52,5 @@
 strided_get_indexed 2
 strided_putget_indexed 2
 window_creation 2
+contention_put 4
+contention_putget 4



More information about the mpich2-commits mailing list