[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.2-2-g3424959

mysql vizuser noreply at mpich.org
Mon Feb 4 12:42:54 CST 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  34249593d1229da56c14beaa5fb8287b70aab08e (commit)
      from  7e56bfc9f79ce102c7b907e7397efa1a278bfd74 (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/34249593d1229da56c14beaa5fb8287b70aab08e

commit 34249593d1229da56c14beaa5fb8287b70aab08e
Author: James Dinan <dinan at mcs.anl.gov>
Date:   Mon Feb 4 12:37:37 2013 -0600

    Fix type incompat. for size_t in BSend degug msgs
    
    This patch updates BSend debugging messages to be compatible with new size_t
    arguments added in [7fa7e2cf].  Format strings are updated and size_t args are
    cast to unsigned long long.  Upconverting to the largest unsinged integer type
    is the only safe way to deal with this in pre-C99.  If we were coding to C99,
    we could have avoided the type cast and used '%z' directly in the format
    strings.  This closes ticket #1786.
    
    Reviewer: goodell

diff --git a/src/mpi/pt2pt/bsendutil.c b/src/mpi/pt2pt/bsendutil.c
index 1776b1b..6c2dda0 100644
--- a/src/mpi/pt2pt/bsendutil.c
+++ b/src/mpi/pt2pt/bsendutil.c
@@ -334,11 +334,12 @@ static void MPIR_Bsend_free_segment( MPIR_Bsend_data_t *p )
     MPIR_Bsend_data_t *prev = p->prev, *avail = BsendBuffer.avail, *avail_prev;
 
     MPIU_DBG_MSG_FMT(BSEND,TYPICAL,(MPIU_DBG_FDEST,
-                 "Freeing bsend segment at %p of size %d, next at %p",
-		 p,p->size, ((char *)p)+p->total_size));
+                 "Freeing bsend segment at %p of size %llu, next at %p",
+                 p, (unsigned long long) p->size, ((char *)p)+p->total_size));
 
     MPIU_DBG_MSG_D(BSEND,TYPICAL,
-	     "At the begining of free_segment with size %d:", p->total_size );
+                   "At the begining of free_segment with size %llu:",
+                   (unsigned long long) p->total_size );
     MPIU_DBG_STMT(BSEND,TYPICAL,MPIR_Bsend_dump());
 
     /* Remove the segment from the active list */
@@ -530,8 +531,8 @@ static void MPIR_Bsend_take_buffer( MPIR_Bsend_data_t *p, int size  )
        allocate for this buffer. */
 
     MPIU_DBG_MSG_FMT(BSEND,TYPICAL,(MPIU_DBG_FDEST,
-			    "Taking %d bytes from a block with %d bytes\n", 
-				    alloc_size, p->total_size ));
+                                    "Taking %d bytes from a block with %llu bytes\n",
+                                    alloc_size, (unsigned long long) p->total_size ));
 
     /* Is there enough space left to create a new block? */
     if (alloc_size + (int)BSENDDATA_HEADER_TRUE_SIZE + MIN_BUFFER_BLOCK <= p->size) {
@@ -559,8 +560,9 @@ static void MPIR_Bsend_take_buffer( MPIR_Bsend_data_t *p, int size  )
 	p->size       = p->total_size - BSENDDATA_HEADER_TRUE_SIZE;
 
 	MPIU_DBG_MSG_FMT(BSEND,TYPICAL,(MPIU_DBG_FDEST,
-		   "broken blocks p (%d) and new (%d)\n",
-		    p->total_size, newp->total_size ));
+                                        "broken blocks p (%llu) and new (%llu)\n",
+                                        (unsigned long long) p->total_size,
+                                        (unsigned long long) newp->total_size ));
     }
 
     /* Remove p from the avail list and add it to the active list */
@@ -610,12 +612,13 @@ static void MPIR_Bsend_dump( void )
 {
     MPIR_Bsend_data_t *a = BsendBuffer.avail;
 
-    MPIU_DBG_MSG_D(BSEND,TYPICAL,"Total size is %d",BsendBuffer.buffer_size );
+    MPIU_DBG_MSG_D(BSEND, TYPICAL, "Total size is %llu",
+                   (unsigned long long) BsendBuffer.buffer_size);
     MPIU_DBG_MSG(BSEND,TYPICAL,"Avail list is:" );
     while (a) {
-	MPIU_DBG_MSG_FMT(BSEND,TYPICAL,(MPIU_DBG_FDEST,
-				"[%p] totalsize = %d(%x)", a, a->total_size, 
-					a->total_size ));
+        MPIU_DBG_MSG_FMT(BSEND, TYPICAL, (MPIU_DBG_FDEST, "[%p] totalsize = %llu(%llx)",
+                                          a, (unsigned long long) a->total_size,
+                                          (unsigned long long) a->total_size));
 	if (a == a->next) {
 	    MPIU_DBG_MSG(BSEND,TYPICAL,
 			 "@@@Corrupt list; avail block points at itself" );
@@ -627,9 +630,9 @@ static void MPIR_Bsend_dump( void )
     MPIU_DBG_MSG(BSEND,TYPICAL,"Active list is:" );
     a = BsendBuffer.active;
     while (a) {
-	MPIU_DBG_MSG_FMT(BSEND,TYPICAL,(MPIU_DBG_FDEST,
-				"[%p] totalsize = %d(%x)", a, a->total_size, 
-					a->total_size ));
+        MPIU_DBG_MSG_FMT(BSEND, TYPICAL, (MPIU_DBG_FDEST, "[%p] totalsize = %llu(%llx)",
+                                          a, (unsigned long long) a->total_size,
+                                          (unsigned long long) a->total_size));
 	if (a == a->next) {
 	    MPIU_DBG_MSG(BSEND,TYPICAL,
 			 "@@@Corrupt list; active block points at itself" );

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

Summary of changes:
 src/mpi/pt2pt/bsendutil.c |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list