[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1-183-g87de5b0

Service Account noreply at mpich.org
Mon Apr 28 12:52:18 CDT 2014


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  87de5b090b505993b7519cf01900e0fedf3e352f (commit)
      from  d20f90c6ec7dcc3107d448273d29cc08f0b8d50c (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/87de5b090b505993b7519cf01900e0fedf3e352f

commit 87de5b090b505993b7519cf01900e0fedf3e352f
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Tue Apr 1 21:31:48 2014 +0000

    modify MPL_trdump to make a single fprintf call
    
    if there are a lot of mpi processes with memory errors, the output can
    get horribly jumbled if the "memory at address" bit is emitted in one
    fprintf call and the "at file/line" bit emitted in a second.  For each
    memory region, Build up the address/file-name string in memory and make
    one fprintf (instead of two) per memory region.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpl/src/mpltrmem.c b/src/mpl/src/mpltrmem.c
index e91a215..5efdbbe 100644
--- a/src/mpl/src/mpltrmem.c
+++ b/src/mpl/src/mpltrmem.c
@@ -606,19 +606,25 @@ void MPL_trdump(FILE * fp, int minid)
     }
     head = TRhead[1];
     while (head) {
+	/* these "rank and size" strings are supposed to be small: enough to
+	 * hold an mpi rank, a size, and a hexadecimal address. */
+#define ADDRESS_STR_BUFLEN 256
+
+	char address_str[ADDRESS_STR_BUFLEN];
         MPL_VG_MAKE_MEM_DEFINED(head, sizeof(*head));
         if (head->id >= minid) {
             addrToHex((char *) head + sizeof(TrSPACE), hexstring);
-            fprintf(fp, "[%d] %lu at [%s], ", world_rank, 
+            address_str[ADDRESS_STR_BUFLEN-1] = 0;
+            snprintf(address_str, ADDRESS_STR_BUFLEN-1, "[%d] %lu at [%s],", world_rank,
                     (unsigned long)head->size, hexstring);
             head->fname[TR_FNAME_LEN - 1] = 0;  /* Be extra careful */
             if (TRidSet) {
                 /* For head->id >= 0, we can add code to map the id to
                  * the name of a package, rather than using a raw number */
-                fprintf(fp, "id = %d %s[%d]\n", head->id, head->fname, head->lineno);
+                fprintf(fp, "%s id = %d %s[%d]\n", address_str, head->id, head->fname, head->lineno);
             }
             else {
-                fprintf(fp, "%s[%d]\n", head->fname, head->lineno);
+                fprintf(fp, "%s %s[%d]\n", address_str, head->fname, head->lineno);
             }
         }
 #ifdef VALGRIND_MAKE_MEM_NOACCESS

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

Summary of changes:
 src/mpl/src/mpltrmem.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list