[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-353-g1ffd39b

mysql vizuser noreply at mpich.org
Fri Jul 19 13:11:20 CDT 2013


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  1ffd39ba42b3ef1c6ae7e09484d7257b756bfab1 (commit)
      from  057bb8be6bc9e1ced3ef42eb7335dbe833b4d188 (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/1ffd39ba42b3ef1c6ae7e09484d7257b756bfab1

commit 1ffd39ba42b3ef1c6ae7e09484d7257b756bfab1
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Jul 19 11:52:30 2013 -0500

    Added a new test for checking for zero-byte window creations.
    
    MPICH currently has a bug that causes it to abort when all processes
    provide zero bytes to the window allocation routine.  While it can be
    considered a user error, the MPI-3 standard does not explicitly
    disallow this case.

diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index 3950aa2..1c33a1b 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -83,6 +83,7 @@ noinst_PROGRAMS =          \
     win_shared             \
     win_shared_noncontig   \
     win_shared_noncontig_put \
+    win_zero               \
     win_dynamic_acc        \
     get_acc_local          \
     compare_and_swap       \
diff --git a/test/mpi/rma/testlist b/test/mpi/rma/testlist
index 006c4f5..4da3c0f 100644
--- a/test/mpi/rma/testlist
+++ b/test/mpi/rma/testlist
@@ -68,6 +68,7 @@ manyrma2 2 timeLimit=500
 win_shared 4 mpiversion=3.0
 win_shared_noncontig 4 mpiversion=3.0
 win_shared_noncontig_put 4 mpiversion=3.0
+win_zero 4 mpiversion=3.0
 win_dynamic_acc 4 mpiversion=3.0
 get_acc_local 1 mpiversion=3.0
 linked_list 4 mpiversion=3.0
diff --git a/test/mpi/rma/win_zero.c b/test/mpi/rma/win_zero.c
new file mode 100644
index 0000000..24bac4e
--- /dev/null
+++ b/test/mpi/rma/win_zero.c
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* test MPI_WIN_ALLOCATE_SHARED when size of total shared memory region is 0. */
+
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+    MPI_Win win;
+    void *win_buf = NULL;
+    int world_rank, shm_rank;
+    MPI_Comm shm_comm;
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
+
+    MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, world_rank, MPI_INFO_NULL, &shm_comm);
+
+    MPI_Comm_rank(shm_comm, &shm_rank);
+
+    /* Some ranks allocate zero bytes */
+    if (shm_rank % 2 == 0)
+        MPI_Win_allocate_shared(0, sizeof(char), MPI_INFO_NULL, shm_comm, &win_buf, &win);
+    else
+        MPI_Win_allocate_shared(1, sizeof(char), MPI_INFO_NULL, shm_comm, &win_buf, &win);
+    MPI_Win_free(&win);
+
+    if (world_rank % 2 == 0)
+        MPI_Win_allocate(0, sizeof(char), MPI_INFO_NULL, MPI_COMM_WORLD, &win_buf, &win);
+    else
+        MPI_Win_allocate(1, sizeof(char), MPI_INFO_NULL, MPI_COMM_WORLD, &win_buf, &win);
+    MPI_Win_free(&win);
+
+    win_buf = NULL;
+    if (world_rank % 2 == 0)
+        MPI_Win_create(NULL, 0, sizeof(char), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+    else {
+        win_buf = (void *) malloc(sizeof(char));
+        MPI_Win_create(win_buf, 1, sizeof(char), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+    }
+    MPI_Win_free(&win);
+    if (win_buf)
+        free(win_buf);
+
+    /* All ranks allocate zero bytes */
+    MPI_Win_allocate_shared(0, sizeof(char), MPI_INFO_NULL, shm_comm, &win_buf, &win);
+    MPI_Win_free(&win);
+    MPI_Win_allocate(0, sizeof(char), MPI_INFO_NULL, MPI_COMM_WORLD, &win_buf, &win);
+    MPI_Win_free(&win);
+    MPI_Win_create(NULL, 0, sizeof(char), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+    MPI_Win_free(&win);
+
+    MPI_Comm_free(&shm_comm);
+
+    if (world_rank == 0)
+        printf(" No Errors\n");
+
+    MPI_Finalize();
+
+    return 0;
+
+}

-----------------------------------------------------------------------

Summary of changes:
 test/mpi/rma/Makefile.am |    1 +
 test/mpi/rma/testlist    |    1 +
 test/mpi/rma/win_zero.c  |   68 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 test/mpi/rma/win_zero.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list