[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b4-200-gbc921f8

Service Account noreply at mpich.org
Fri Aug 28 09:30:00 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  bc921f8841c7b74d7d6c6f43b4bc13cf6e460abb (commit)
       via  9e134bad036c341fcdc81d453fc231c40658d147 (commit)
       via  bbde37f78883e630d6d3964b8e6e8452f5677ad9 (commit)
      from  0c2459cc4debb5344e98de6db57d1d38062f9d5d (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/bc921f8841c7b74d7d6c6f43b4bc13cf6e460abb

commit bc921f8841c7b74d7d6c6f43b4bc13cf6e460abb
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Wed Aug 19 17:11:58 2015 -0500

    tsuite: check the result of MPI_Get_elements_x
    
    Check the large byte count in MPI_Status to ensure it is set correctly
    by the transport.
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/test/mpi/datatype/large_type_sendrec.c b/test/mpi/datatype/large_type_sendrec.c
index 14554a0..013bb68 100644
--- a/test/mpi/datatype/large_type_sendrec.c
+++ b/test/mpi/datatype/large_type_sendrec.c
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
 
     MPI_Request requests[2];
     MPI_Status statuses[2];
-    MPI_Count ocount[2];
+    MPI_Count ocount;
 
     char *rbuf = NULL;
     char *sbuf = NULL;
@@ -144,12 +144,12 @@ int main(int argc, char *argv[])
 
     if (size == 1) {
         MPI_ASSERT(MPI_Waitall(2, requests, statuses));
-        MPI_ASSERT(MPI_Get_elements_x(&(statuses[1]), MPI_CHAR, &(ocount[1])));
+        MPI_ASSERT(MPI_Get_elements_x(&(statuses[1]), MPI_CHAR, &ocount));
     }
     else {
         if (rank == (size - 1)) {
             MPI_ASSERT(MPI_Wait(&(requests[1]), &(statuses[1])));
-            MPI_ASSERT(MPI_Get_elements_x(&(statuses[1]), MPI_CHAR, &(ocount[1])));
+            MPI_ASSERT(MPI_Get_elements_x(&(statuses[1]), MPI_CHAR, &ocount));
         }
         else if (rank == 0) {
             MPI_ASSERT(MPI_Wait(&(requests[0]), &(statuses[0])));
@@ -163,6 +163,7 @@ int main(int argc, char *argv[])
         MPI_Count j, errors = 0;
         for (j = 0; j < count; j++)
             errors += (rbuf[j] != 'z');
+        if (count != ocount) ++errors;
         if (errors == 0) {
             printf(" No Errors\n");
         }

http://git.mpich.org/mpich.git/commitdiff/9e134bad036c341fcdc81d453fc231c40658d147

commit 9e134bad036c341fcdc81d453fc231c40658d147
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Wed Aug 19 17:08:16 2015 -0500

    tsuite: remove C99
    
    Move variable declarations to approriate places.
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/test/mpi/datatype/large_type_sendrec.c b/test/mpi/datatype/large_type_sendrec.c
index 7f3438b..14554a0 100644
--- a/test/mpi/datatype/large_type_sendrec.c
+++ b/test/mpi/datatype/large_type_sendrec.c
@@ -19,22 +19,19 @@
 #include <assert.h>
 static void verbose_abort(int errorcode)
 {
+    int rank;
+    char errorstring[MPI_MAX_ERROR_STRING];
+    int errorclass;
+    int resultlen;
+
     /* We do not check error codes here
      * because if MPI is in a really sorry state,
      * all of them might fail. */
-
-    int rank;
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
-    char errorstring[MPI_MAX_ERROR_STRING];
-    memset(errorstring, 0, MPI_MAX_ERROR_STRING);       /* optional */
-
-    int errorclass;
     MPI_Error_class(errorcode, &errorclass);
-
-    int resultlen;
     MPI_Error_string(errorcode, errorstring, &resultlen);
 
+    memset(errorstring, 0, MPI_MAX_ERROR_STRING);       /* optional */
     fprintf(stderr, "%d: MPI failed (%d: %s) \n", rank, errorclass, errorstring);
     fflush(stderr);     /* almost certainly redundant with the following... */
 
@@ -73,25 +70,25 @@ int Type_contiguous_x(MPI_Count count, MPI_Datatype oldtype, MPI_Datatype * newt
     MPI_Count r = count % BIGMPI_MAX;
 
     MPI_Datatype chunk;
-    MPI_ASSERT(MPI_Type_contiguous(BIGMPI_MAX, oldtype, &chunk));
-
     MPI_Datatype chunks;
-    MPI_ASSERT(MPI_Type_contiguous(c, chunk, &chunks));
-
     MPI_Datatype remainder;
-    MPI_ASSERT(MPI_Type_contiguous(r, oldtype, &remainder));
-
     int typesize;
+
+    MPI_ASSERT(MPI_Type_contiguous(BIGMPI_MAX, oldtype, &chunk));
+    MPI_ASSERT(MPI_Type_contiguous(c, chunk, &chunks));
+    MPI_ASSERT(MPI_Type_contiguous(r, oldtype, &remainder));
     MPI_ASSERT(MPI_Type_size(oldtype, &typesize));
 
-    MPI_Aint remdisp = (MPI_Aint) c * BIGMPI_MAX * typesize;    /* must explicit-cast to avoid overflow */
-    int array_of_blocklengths[2] = { 1, 1 };
-    MPI_Aint array_of_displacements[2] = { 0, remdisp };
-    MPI_Datatype array_of_types[2] = { chunks, remainder };
+    {
+        MPI_Aint remdisp = (MPI_Aint) c * BIGMPI_MAX * typesize;    /* must explicit-cast to avoid overflow */
+        int array_of_blocklengths[2] = { 1, 1 };
+        MPI_Aint array_of_displacements[2] = { 0, remdisp };
+        MPI_Datatype array_of_types[2] = { chunks, remainder };
 
-    MPI_ASSERT(MPI_Type_create_struct
-               (2, array_of_blocklengths, array_of_displacements, array_of_types, newtype));
-    MPI_ASSERT(MPI_Type_commit(newtype));
+        MPI_ASSERT(MPI_Type_create_struct
+                   (2, array_of_blocklengths, array_of_displacements, array_of_types, newtype));
+        MPI_ASSERT(MPI_Type_commit(newtype));
+    }
 
     MPI_ASSERT(MPI_Type_free(&chunk));
     MPI_ASSERT(MPI_Type_free(&chunks));
@@ -105,26 +102,29 @@ int main(int argc, char *argv[])
 {
     int provided;
     size_t i;
-    MPI_Count j;
-    MPI_ASSERT(MPI_Init_thread(&argc, &argv, MPI_THREAD_SINGLE, &provided));
 
     int rank, size;
-    MPI_ASSERT(MPI_Comm_rank(MPI_COMM_WORLD, &rank));
-    MPI_ASSERT(MPI_Comm_size(MPI_COMM_WORLD, &size));
 
     int logn = (argc > 1) ? atoi(argv[1]) : 32;
     size_t count = (size_t) 1 << logn;  /* explicit cast required */
 
     MPI_Datatype bigtype;
-    MPI_ASSERT(Type_contiguous_x((MPI_Count) count, MPI_CHAR, &bigtype));
-    MPI_ASSERT(MPI_Type_commit(&bigtype));
 
     MPI_Request requests[2];
     MPI_Status statuses[2];
+    MPI_Count ocount[2];
 
     char *rbuf = NULL;
     char *sbuf = NULL;
 
+    MPI_ASSERT(MPI_Init_thread(&argc, &argv, MPI_THREAD_SINGLE, &provided));
+
+    MPI_ASSERT(MPI_Comm_rank(MPI_COMM_WORLD, &rank));
+    MPI_ASSERT(MPI_Comm_size(MPI_COMM_WORLD, &size));
+
+    MPI_ASSERT(Type_contiguous_x((MPI_Count) count, MPI_CHAR, &bigtype));
+    MPI_ASSERT(MPI_Type_commit(&bigtype));
+
     if (rank == (size - 1)) {
         rbuf = malloc(count * sizeof(char));
         assert(rbuf != NULL);
@@ -142,8 +142,6 @@ int main(int argc, char *argv[])
         MPI_ASSERT(MPI_Isend(sbuf, 1, bigtype, size - 1, 0, MPI_COMM_WORLD, &(requests[0])));
     }
 
-    MPI_Count ocount[2];
-
     if (size == 1) {
         MPI_ASSERT(MPI_Waitall(2, requests, statuses));
         MPI_ASSERT(MPI_Get_elements_x(&(statuses[1]), MPI_CHAR, &(ocount[1])));
@@ -162,7 +160,7 @@ int main(int argc, char *argv[])
 
     /* correctness check */
     if (rank == (size - 1)) {
-        MPI_Count errors = 0;
+        MPI_Count j, errors = 0;
         for (j = 0; j < count; j++)
             errors += (rbuf[j] != 'z');
         if (errors == 0) {

http://git.mpich.org/mpich.git/commitdiff/bbde37f78883e630d6d3964b8e6e8452f5677ad9

commit bbde37f78883e630d6d3964b8e6e8452f5677ad9
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Wed Aug 19 15:54:30 2015 -0500

    netmod/portals4: use large type for message length
    
    Ensure large counts are reported correctly in MPI_Status. Fixes
    Coverity CID 105828.
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index 960073e..d2787c5 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -15,7 +15,7 @@ static void dequeue_req(const ptl_event_t *e)
 {
     int found;
     MPID_Request *const rreq = e->user_ptr;
-    int s_len, r_len;
+    MPI_Aint s_len, r_len;
 
     /* At this point we know the ME is unlinked. Invalidate the handle to
        prevent further accesses, e.g. an attempted cancel. */

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

Summary of changes:
 .../channels/nemesis/netmod/portals4/ptl_recv.c    |    2 +-
 test/mpi/datatype/large_type_sendrec.c             |   65 ++++++++++----------
 2 files changed, 33 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list