[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2rc1-18-gdc14479
Service Account
noreply at mpich.org
Wed Oct 28 16:31:44 CDT 2015
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 dc1447982acf76dc3b80c1bd98b7ea2d034944a8 (commit)
from 592724539fc60539d75e168410afa289a72fe3d7 (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/dc1447982acf76dc3b80c1bd98b7ea2d034944a8
commit dc1447982acf76dc3b80c1bd98b7ea2d034944a8
Author: Hajime Fujita <hajime.fujita at intel.com>
Date: Tue Oct 27 14:28:25 2015 -0500
Correct Compare_and_swap usage in test cases
Usage of MPI_Compare_and_swap is wrong in the following tests, thus
causing failures.
* test/mpi/rma/win_shared_cas_flush_load 3
* test/mpi/rma/cas_flush_get 3
The variable `i` passed to MPI_Compare_and_swap is declared on stack,
however it should be alive until MPI_Win_flush is called.
Signed-off-by: Charles J Archer <charles.j.archer at intel.com>
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/test/mpi/rma/win_shared_rma_flush_load.c b/test/mpi/rma/win_shared_rma_flush_load.c
index 9edf270..1386fcd 100644
--- a/test/mpi/rma/win_shared_rma_flush_load.c
+++ b/test/mpi/rma/win_shared_rma_flush_load.c
@@ -13,6 +13,9 @@
#define ITER 10000
#define BUF_CNT 1
int local_buf[BUF_CNT], result_addr[BUF_CNT];
+#ifdef TEST_CAS
+int compare_buf[BUF_CNT];
+#endif
const int verbose = 0;
@@ -69,8 +72,8 @@ static inline void issue_rma_op(int i)
#elif defined(TEST_CAS)
static inline void issue_rma_op(int i)
{
- int compare_val = i; /* always equal to window value, thus swap happens */
- MPI_Compare_and_swap(&local_buf[i], &compare_val, &result_addr[i], MPI_INT, target, i, win);
+ compare_buf[i] = i; /* always equal to window value, thus swap happens */
+ MPI_Compare_and_swap(&local_buf[i], &compare_buf[i], &result_addr[i], MPI_INT, target, i, win);
}
#endif
diff --git a/test/mpi/rma/wrma_flush_get.c b/test/mpi/rma/wrma_flush_get.c
index c0b0fc2..e2ae828 100644
--- a/test/mpi/rma/wrma_flush_get.c
+++ b/test/mpi/rma/wrma_flush_get.c
@@ -13,6 +13,9 @@
#define ITER 10000
#define BUF_CNT 1
int local_buf[BUF_CNT], result_addr[BUF_CNT], check_addr[BUF_CNT];
+#ifdef TEST_CAS
+int compare_buf[BUF_CNT];
+#endif
const int verbose = 0;
@@ -70,8 +73,8 @@ static inline void issue_rma_op(int i)
#elif defined(TEST_CAS)
static inline void issue_rma_op(int i)
{
- int compare_val = i; /* always equal to window value, thus swap happens */
- MPI_Compare_and_swap(&local_buf[i], &compare_val, &result_addr[i], MPI_INT, target, i, win);
+ compare_buf[i] = i; /* always equal to window value, thus swap happens */
+ MPI_Compare_and_swap(&local_buf[i], &compare_buf[i], &result_addr[i], MPI_INT, target, i, win);
}
#endif
-----------------------------------------------------------------------
Summary of changes:
test/mpi/rma/win_shared_rma_flush_load.c | 7 +++++--
test/mpi/rma/wrma_flush_get.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list