[mpich-commits] r10676 - mpich2/trunk/test/mpi/errors/rma
dinan at mcs.anl.gov
dinan at mcs.anl.gov
Tue Nov 27 17:39:58 CST 2012
Author: dinan
Date: 2012-11-27 17:39:58 -0600 (Tue, 27 Nov 2012)
New Revision: 10676
Added:
mpich2/trunk/test/mpi/errors/rma/win_sync_lock_fence.c
Modified:
mpich2/trunk/test/mpi/errors/rma/Makefile.am
mpich2/trunk/test/mpi/errors/rma/testlist
Log:
RMA State Tracking: Lock/Fence interleaving test
This test checks for invalid interleaving of passive and active target epochs.
Currently, we do not detect this error, so this test case is disabled in the
test suite.
Reviewer: goodell
Modified: mpich2/trunk/test/mpi/errors/rma/Makefile.am
===================================================================
--- mpich2/trunk/test/mpi/errors/rma/Makefile.am 2012-11-27 23:39:57 UTC (rev 10675)
+++ mpich2/trunk/test/mpi/errors/rma/Makefile.am 2012-11-27 23:39:58 UTC (rev 10676)
@@ -22,6 +22,7 @@
win_sync_complete \
win_sync_lock_at \
win_sync_lock_pt \
+ win_sync_lock_fence \
win_sync_nested \
win_sync_op
Modified: mpich2/trunk/test/mpi/errors/rma/testlist
===================================================================
--- mpich2/trunk/test/mpi/errors/rma/testlist 2012-11-27 23:39:57 UTC (rev 10675)
+++ mpich2/trunk/test/mpi/errors/rma/testlist 2012-11-27 23:39:58 UTC (rev 10676)
@@ -7,5 +7,8 @@
win_sync_complete 2
win_sync_lock_at 2
win_sync_lock_pt 2
+# FIXME - MPICH currently does not detect the erroneous synchronization in
+# win_sync_lock_fence.
+#win_sync_lock_fence 2
win_sync_nested 2
win_sync_op 2
Added: mpich2/trunk/test/mpi/errors/rma/win_sync_lock_fence.c
===================================================================
--- mpich2/trunk/test/mpi/errors/rma/win_sync_lock_fence.c (rev 0)
+++ mpich2/trunk/test/mpi/errors/rma/win_sync_lock_fence.c 2012-11-27 23:39:58 UTC (rev 10676)
@@ -0,0 +1,47 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2012 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+#include "win_sync.h"
+
+int main(int argc, char *argv[])
+{
+ int rank, nproc;
+ int errors = 0, all_errors = 0;
+ int buf, my_buf;
+ MPI_Win win;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+
+ MPI_Win_create(&buf, sizeof(int), sizeof(int),
+ MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+
+ MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
+
+ MPI_Win_fence(0, win);
+
+ MPI_Win_lock(MPI_LOCK_SHARED, 0, MPI_MODE_NOCHECK, win);
+ MPI_Get(&my_buf, 1, MPI_INT, 0, 0, 1, MPI_INT, win);
+ MPI_Win_unlock(0, win);
+
+ /* This should fail because the window is no longer in a fence epoch */
+ CHECK_ERR(MPI_Get(&my_buf, 1, MPI_INT, 0, 0, 1, MPI_INT, win));
+
+ MPI_Win_fence(0, win);
+ MPI_Win_free(&win);
+
+ MPI_Reduce(&errors, &all_errors, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+
+ if (rank == 0 && all_errors == 0) printf(" No Errors\n");
+ MPI_Finalize();
+
+ return 0;
+}
More information about the commits
mailing list