[mpich-commits] [mpich] MPICH primary repository branch, mpich-dev/mytests, created. v3.2-448-g3579e4c
Service Account
noreply at mpich.org
Thu Sep 15 23:12:26 CDT 2016
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, mpich-dev/mytests has been created
at 3579e4c003ca80093dcfebac334045ffecffe218 (commit)
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/3579e4c003ca80093dcfebac334045ffecffe218
commit 3579e4c003ca80093dcfebac334045ffecffe218
Author: Min Si <msi at anl.gov>
Date: Mon Sep 12 23:38:24 2016 -0500
Added win_alloc version for all tests under error/rma.
diff --git a/test/mpi/errors/rma/Makefile.am b/test/mpi/errors/rma/Makefile.am
index 80eaed1..43517d0 100644
--- a/test/mpi/errors/rma/Makefile.am
+++ b/test/mpi/errors/rma/Makefile.am
@@ -24,5 +24,52 @@ noinst_PROGRAMS = \
win_sync_lock_pt \
win_sync_lock_fence \
win_sync_nested \
- win_sync_op
+ win_sync_op \
+ winalloc_err \
+ winalloc_err2 \
+ winalloc_cas_type_check \
+ winalloc_sync_unlock \
+ winalloc_sync_free_pt \
+ winalloc_sync_free_at \
+ winalloc_sync_complete \
+ winalloc_sync_lock_at \
+ winalloc_sync_lock_pt \
+ winalloc_sync_lock_fence \
+ winalloc_sync_nested \
+ winalloc_sync_op
+winalloc_err_SOURCES = winerr.c
+winalloc_err_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_err2_SOURCES = winerr2.c
+winalloc_err2_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_cas_type_check_SOURCES = cas_type_check.c
+winalloc_cas_type_check_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_unlock_SOURCES = win_sync_unlock.c
+winalloc_sync_unlock_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_free_pt_SOURCES = win_sync_free_pt.c
+winalloc_sync_free_pt_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_free_at_SOURCES = win_sync_free_at.c
+winalloc_sync_free_at_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_complete_SOURCES = win_sync_complete.c
+winalloc_sync_complete_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_lock_at_SOURCES = win_sync_lock_at.c
+winalloc_sync_lock_at_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_lock_pt_SOURCES = win_sync_lock_pt.c
+winalloc_sync_lock_pt_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_lock_fence_SOURCES = win_sync_lock_fence.c
+winalloc_sync_lock_fence_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_nested_SOURCES = win_sync_nested.c
+winalloc_sync_nested_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
+
+winalloc_sync_op_SOURCES = win_sync_op.c
+winalloc_sync_op_CPPFLAGS = -DTEST_WIN_ALLOC $(AM_CPPFLAGS)
diff --git a/test/mpi/errors/rma/cas_type_check.c b/test/mpi/errors/rma/cas_type_check.c
index eb0b1fb..ebe0143 100644
--- a/test/mpi/errors/rma/cas_type_check.c
+++ b/test/mpi/errors/rma/cas_type_check.c
@@ -8,18 +8,19 @@
#include <stdio.h>
#include <assert.h>
#include "mpitest.h"
+#include "win_create.h"
#define CAS_CHECK_TYPE(c_type, mpi_type, expected_err) \
do { \
int err, err_class, i; \
c_type val, cmp_val; \
- c_type buf, res; \
+ c_type buf, res, *bufptr = &buf; \
MPI_Win win; \
\
val = cmp_val = buf = 0; \
\
- MPI_Win_create(&buf, sizeof(c_type), sizeof(c_type), \
- MPI_INFO_NULL, MPI_COMM_WORLD, &win); \
+ WIN_CREATE(bufptr, sizeof(c_type), sizeof(c_type), \
+ MPI_INFO_NULL, MPI_COMM_WORLD, &win);\
\
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); \
\
diff --git a/test/mpi/errors/rma/testlist b/test/mpi/errors/rma/testlist
index 5fd1788..6a21b41 100644
--- a/test/mpi/errors/rma/testlist
+++ b/test/mpi/errors/rma/testlist
@@ -10,3 +10,15 @@ win_sync_lock_pt 2
win_sync_lock_fence 2
win_sync_nested 2
win_sync_op 2
+winalloc_err 2
+winalloc_err2 2
+winalloc_cas_type_check 2
+winalloc_sync_unlock 2
+winalloc_sync_free_pt 2
+winalloc_sync_free_at 2
+winalloc_sync_complete 2
+winalloc_sync_lock_at 2
+winalloc_sync_lock_pt 2
+winalloc_sync_lock_fence 2
+winalloc_sync_nested 2
+winalloc_sync_op 2
\ No newline at end of file
diff --git a/test/mpi/errors/rma/win_create.h b/test/mpi/errors/rma/win_create.h
new file mode 100644
index 0000000..f73242e
--- /dev/null
+++ b/test/mpi/errors/rma/win_create.h
@@ -0,0 +1,17 @@
+/* -*- Mode: C; c-basic-offset:4 ; -*- */
+/*
+ * (C) 2015 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#ifndef WIN_CREATE_H_
+#define WIN_CREATE_H_
+
+#ifdef TEST_WIN_ALLOC
+#define WIN_CREATE(bufptr_,size_, disp_, info_, comm_, winptr_) \
+ MPI_Win_allocate(size_, disp_, info_, comm_, &bufptr_, winptr_)
+#else
+#define WIN_CREATE(bufptr_,size_, disp_, info_, comm_, winptr_) \
+ MPI_Win_create(bufptr_, size_, disp_, info_, comm_, winptr_)
+#endif
+
+#endif /* WIN_CREATE_H_ */
diff --git a/test/mpi/errors/rma/win_sync_complete.c b/test/mpi/errors/rma/win_sync_complete.c
index 2684043..1a6ed01 100644
--- a/test/mpi/errors/rma/win_sync_complete.c
+++ b/test/mpi/errors/rma/win_sync_complete.c
@@ -8,18 +8,19 @@
#include <stdio.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank;
int errors = 0, all_errors = 0;
- int buf = 0;
+ int buf = 0, *bufptr = &buf;
MPI_Win win;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Win_create(&buf, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_free_at.c b/test/mpi/errors/rma/win_sync_free_at.c
index 92124bb..a8a729a 100644
--- a/test/mpi/errors/rma/win_sync_free_at.c
+++ b/test/mpi/errors/rma/win_sync_free_at.c
@@ -9,12 +9,13 @@
#include <stdlib.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank, nproc, i;
int errors = 0, all_errors = 0;
- int buf = 0, *my_buf;
+ int buf = 0, *my_buf, *bufptr = &buf;
MPI_Win win;
MPI_Group world_group;
@@ -22,7 +23,7 @@ int main(int argc, char *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);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_free_pt.c b/test/mpi/errors/rma/win_sync_free_pt.c
index 9d81b3d..8b5869d 100644
--- a/test/mpi/errors/rma/win_sync_free_pt.c
+++ b/test/mpi/errors/rma/win_sync_free_pt.c
@@ -8,19 +8,19 @@
#include <stdio.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank;
int errors = 0, all_errors = 0;
- int buf = 0;
+ int buf = 0, *bufptr = &buf;
MPI_Win win;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Win_create(&buf, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
-
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
MPI_Win_lock(MPI_LOCK_SHARED, 0, MPI_MODE_NOCHECK, win);
diff --git a/test/mpi/errors/rma/win_sync_lock_at.c b/test/mpi/errors/rma/win_sync_lock_at.c
index 1e1511f..212e881 100644
--- a/test/mpi/errors/rma/win_sync_lock_at.c
+++ b/test/mpi/errors/rma/win_sync_lock_at.c
@@ -9,12 +9,13 @@
#include <stdlib.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank, nproc, i;
int errors = 0, all_errors = 0;
- int buf = 0, *my_buf;
+ int buf = 0, *my_buf, *bufptr = &buf;
MPI_Win win;
MPI_Group world_group;
@@ -22,7 +23,7 @@ int main(int argc, char *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);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_lock_fence.c b/test/mpi/errors/rma/win_sync_lock_fence.c
index ec7b63c..b8bf69c 100644
--- a/test/mpi/errors/rma/win_sync_lock_fence.c
+++ b/test/mpi/errors/rma/win_sync_lock_fence.c
@@ -9,19 +9,20 @@
#include <stdlib.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank, nproc;
int errors = 0, all_errors = 0;
- int buf = 0, my_buf;
+ int buf = 0, my_buf, *bufptr = &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);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_lock_pt.c b/test/mpi/errors/rma/win_sync_lock_pt.c
index 6be8e8f..61029ab 100644
--- a/test/mpi/errors/rma/win_sync_lock_pt.c
+++ b/test/mpi/errors/rma/win_sync_lock_pt.c
@@ -8,18 +8,19 @@
#include <stdio.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank;
int errors = 0, all_errors = 0;
- int buf = 0;
+ int buf = 0, *bufptr = &buf;
MPI_Win win;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Win_create(&buf, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_nested.c b/test/mpi/errors/rma/win_sync_nested.c
index 3e3defd..722b40e 100644
--- a/test/mpi/errors/rma/win_sync_nested.c
+++ b/test/mpi/errors/rma/win_sync_nested.c
@@ -9,12 +9,13 @@
#include <stdlib.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank, nproc, i;
int errors = 0, all_errors = 0;
- int buf = 0, *my_buf;
+ int buf = 0, *my_buf, *bufptr = &buf;
MPI_Win win;
MPI_Group world_group;
@@ -22,7 +23,7 @@ int main(int argc, char *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);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_op.c b/test/mpi/errors/rma/win_sync_op.c
index 2048888..d60afec 100644
--- a/test/mpi/errors/rma/win_sync_op.c
+++ b/test/mpi/errors/rma/win_sync_op.c
@@ -9,19 +9,20 @@
#include <stdlib.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank, nproc;
int errors = 0, all_errors = 0;
- int buf = 0, my_buf;
+ int buf = 0, my_buf, *bufptr = &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);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/win_sync_unlock.c b/test/mpi/errors/rma/win_sync_unlock.c
index ccef067..617677b 100644
--- a/test/mpi/errors/rma/win_sync_unlock.c
+++ b/test/mpi/errors/rma/win_sync_unlock.c
@@ -8,18 +8,19 @@
#include <stdio.h>
#include "mpitest.h"
#include "win_sync.h"
+#include "win_create.h"
int main(int argc, char *argv[])
{
int rank;
int errors = 0, all_errors = 0;
- int buf = 0;
+ int buf = 0, *bufptr = &buf;
MPI_Win win;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Win_create(&buf, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+ WIN_CREATE(bufptr, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
diff --git a/test/mpi/errors/rma/winerr.c b/test/mpi/errors/rma/winerr.c
index ad66486..1ac477d 100644
--- a/test/mpi/errors/rma/winerr.c
+++ b/test/mpi/errors/rma/winerr.c
@@ -7,6 +7,7 @@
#include "mpi.h"
#include <stdio.h>
#include "mpitest.h"
+#include "win_create.h"
/*
static char MTEST_Descrip[] = "Test the routines to control error handlers on windows";
@@ -36,7 +37,7 @@ void weh(MPI_Win * win, int *err, ...)
int main(int argc, char *argv[])
{
int err;
- int buf[2];
+ int buf[2], *bufptr = &buf[0];
MPI_Win win;
MPI_Comm comm;
MPI_Errhandler newerr, olderr;
@@ -47,7 +48,7 @@ int main(int argc, char *argv[])
comm = MPI_COMM_WORLD;
MPI_Win_create_errhandler(weh, &newerr);
- MPI_Win_create(buf, 2 * sizeof(int), sizeof(int), MPI_INFO_NULL, comm, &win);
+ WIN_CREATE(bufptr, 2 * sizeof(int), sizeof(int), MPI_INFO_NULL, comm, &win);
mywin = win;
MPI_Win_get_errhandler(win, &olderr);
@@ -59,7 +60,7 @@ int main(int argc, char *argv[])
MPI_Win_set_errhandler(win, newerr);
expected_err_class = MPI_ERR_RANK;
- err = MPI_Put(buf, 1, MPI_INT, -5, 0, 1, MPI_INT, win);
+ err = MPI_Put(bufptr, 1, MPI_INT, -5, 0, 1, MPI_INT, win);
if (calls != 1) {
errs++;
printf("newerr not called\n");
diff --git a/test/mpi/errors/rma/winerr2.c b/test/mpi/errors/rma/winerr2.c
index e2f6700..3c9296c 100644
--- a/test/mpi/errors/rma/winerr2.c
+++ b/test/mpi/errors/rma/winerr2.c
@@ -7,6 +7,7 @@
#include "mpi.h"
#include <stdio.h>
#include "mpitest.h"
+#include "win_create.h"
/*
static char MTEST_Descrip[] = "Test the routines to control error handlers on windows";
@@ -59,7 +60,7 @@ void weh2(MPI_Win * win, int *err, ...)
int main(int argc, char *argv[])
{
int err;
- int buf[2];
+ int buf[2], *bufptr = &buf[0];
MPI_Win win;
MPI_Comm comm;
MPI_Errhandler newerr1, newerr2, olderr;
@@ -71,7 +72,7 @@ int main(int argc, char *argv[])
MPI_Win_create_errhandler(weh1, &newerr1);
MPI_Win_create_errhandler(weh2, &newerr2);
- MPI_Win_create(buf, 2 * sizeof(int), sizeof(int), MPI_INFO_NULL, comm, &win);
+ WIN_CREATE(bufptr, 2 * sizeof(int), sizeof(int), MPI_INFO_NULL, comm, &win);
mywin = win;
MPI_Win_get_errhandler(win, &olderr);
@@ -86,7 +87,7 @@ int main(int argc, char *argv[])
MPI_Errhandler_free(&newerr1);
expected_err_class = MPI_ERR_RANK;
- err = MPI_Put(buf, 1, MPI_INT, -5, 0, 1, MPI_INT, win);
+ err = MPI_Put(bufptr, 1, MPI_INT, -5, 0, 1, MPI_INT, win);
if (w1Called != 1) {
errs++;
printf("newerr1 not called\n");
@@ -110,7 +111,7 @@ int main(int argc, char *argv[])
MPI_Errhandler_free(&newerr2);
expected_err_class = MPI_ERR_RANK;
- err = MPI_Put(buf, 1, MPI_INT, -5, 0, 1, MPI_INT, win);
+ err = MPI_Put(bufptr, 1, MPI_INT, -5, 0, 1, MPI_INT, win);
if (w2Called != 1) {
errs++;
printf("newerr2 not called\n");
-----------------------------------------------------------------------
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list