[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-111-g477d83f

mysql vizuser noreply at mpich.org
Sun Dec 29 14:59:39 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  477d83fbd4e90a536f5cba01b624cb179f8a6e86 (commit)
       via  809977529103625095d6a6614ead747d608af4ed (commit)
      from  0bc9871d9318a6b53c68a58648868de797685cb2 (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/477d83fbd4e90a536f5cba01b624cb179f8a6e86

commit 477d83fbd4e90a536f5cba01b624cb179f8a6e86
Author: Sameh Sharkawi <sssharka at us.ibm.com>
Date:   Sat Aug 17 00:30:51 2013 -0400

    Allow env variables to control memory initialization.
    
    Signed-off-by: Charles Archer <archerc at us.ibm.com>
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpl/src/mpltrmem.c b/src/mpl/src/mpltrmem.c
index 6a04f86..e91a215 100644
--- a/src/mpl/src/mpltrmem.c
+++ b/src/mpl/src/mpltrmem.c
@@ -120,6 +120,7 @@ static unsigned char TRDefaultByte = 0xda;
 static unsigned char TRFreedByte = 0xfc;
 #define MAX_TR_STACK 20
 static int TRdebugLevel = 0;
+static int TRSetBytes   = 0;
 #define TR_MALLOC 0x1
 #define TR_FREE   0x2
 
@@ -164,6 +165,10 @@ void MPL_trinit(int rank)
      * variables */
     /* these should properly only be "MPL_" parameters, but for backwards
      * compatibility we also support "MPICH_" parameters. */
+    s = getenv("MPICH_TRMEM_INIT");
+    if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
+        TRSetBytes = 1;
+    }
     s = getenv("MPICH_TRMEM_VALIDATE");
     if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
         TRdebugLevel = 1;
@@ -173,6 +178,10 @@ void MPL_trinit(int rank)
         TRDefaultByte = 0;
         TRFreedByte = 0;
     }
+    s = getenv("MPL_TRMEM_INIT");
+    if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
+        TRSetBytes = 1;
+    }
     s = getenv("MPL_TRMEM_VALIDATE");
     if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
         TRdebugLevel = 1;
@@ -232,7 +241,9 @@ void *MPL_trmalloc(size_t a, int lineno, const char fname[])
     if (!new)
         goto fn_exit;
 
-    memset(new, TRDefaultByte, nsize + sizeof(TrSPACE) + sizeof(unsigned long));
+    if(TRSetBytes)
+      memset(new, TRDefaultByte, nsize + sizeof(TrSPACE) + sizeof(unsigned long));
+
     /* Cast to (void*) to avoid false warnings about alignment issues */
     head = (TRSPACE *) (void *)new;
     new += sizeof(TrSPACE);
@@ -433,7 +444,8 @@ void MPL_trfree(void *a_ptr, int line, const char file[])
          * them then our memset will elicit "invalid write" errors from
          * valgrind.  Mark it as accessible but undefined here to prevent this. */
         MPL_VG_MAKE_MEM_UNDEFINED((char *)a_ptr + 2 * sizeof(int), nset);
-        memset((char *)a_ptr + 2 * sizeof(int), TRFreedByte, nset);
+        if(TRSetBytes)
+          memset((char *)a_ptr + 2 * sizeof(int), TRFreedByte, nset);
     }
     free(head);
 }

http://git.mpich.org/mpich.git/commitdiff/809977529103625095d6a6614ead747d608af4ed

commit 809977529103625095d6a6614ead747d608af4ed
Author: Sameh Sharkawi <sssharka at us.ibm.com>
Date:   Sat Aug 17 00:30:51 2013 -0400

    Debug lib memory tracing signature
    
    (ibm) D192180: Changing MPIU_Malloc size from unsigned to size_t
    
    Signed-off-by: Charles Archer <archerc at us.ibm.com>
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpimem.h b/src/include/mpimem.h
index 59e965d..a217e8b 100644
--- a/src/include/mpimem.h
+++ b/src/include/mpimem.h
@@ -145,7 +145,7 @@ void MPIU_trinit(int);
 void *MPIU_trmalloc(size_t, int, const char []);
 void MPIU_trfree(void *, int, const char []);
 int MPIU_trvalid(const char []);
-void MPIU_trspace(int *, int *);
+void MPIU_trspace(size_t *, size_t *);
 void MPIU_trid(int);
 void MPIU_trlevel(int);
 void MPIU_trDebugLevel(int);
diff --git a/src/mpl/include/mpltrmem.h b/src/mpl/include/mpltrmem.h
index 1f2349b..4253bac 100644
--- a/src/mpl/include/mpltrmem.h
+++ b/src/mpl/include/mpltrmem.h
@@ -16,7 +16,7 @@ void *MPL_trmalloc(size_t, int, const char[]);
 void MPL_trfree(void *, int, const char[]);
 int MPL_trvalid(const char[]);
 int MPL_trvalid2(const char[],int,const char[]);
-void MPL_trspace(int *, int *);
+void MPL_trspace(size_t *, size_t *);
 void MPL_trid(int);
 void MPL_trlevel(int);
 void MPL_trDebugLevel(int);
diff --git a/src/mpl/src/mpltrmem.c b/src/mpl/src/mpltrmem.c
index 9d0d919..6a04f86 100644
--- a/src/mpl/src/mpltrmem.c
+++ b/src/mpl/src/mpltrmem.c
@@ -561,13 +561,13 @@ int MPL_trvalid2(const char str[], int line, const char file[] )
 .   space - number of bytes currently allocated
 .   frags - number of blocks currently allocated
  +*/
-void MPL_trspace(int *space, int *fr)
+void MPL_trspace(size_t *space, size_t *fr)
 {
     /* We use ints because systems without prototypes will usually
      * allow calls with ints instead of longs, leading to unexpected
      * behavior */
-    *space = (int) allocated;
-    *fr = (int) frags;
+    *space =  allocated;
+    *fr =  frags;
 }
 
 /*+C
diff --git a/src/util/mem/trmem.c b/src/util/mem/trmem.c
index 19adda8..48e009e 100644
--- a/src/util/mem/trmem.c
+++ b/src/util/mem/trmem.c
@@ -47,7 +47,7 @@ int MPIU_trvalid(const char str[])
     return retval;
 }
 
-void MPIU_trspace(int *space, int *fr)
+void MPIU_trspace(size_t *space, size_t *fr)
 {
     MPIU_THREAD_CS_ENTER(MEMALLOC,);
     MPL_trspace(space, fr);

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

Summary of changes:
 src/include/mpimem.h       |    2 +-
 src/mpl/include/mpltrmem.h |    2 +-
 src/mpl/src/mpltrmem.c     |   22 +++++++++++++++++-----
 src/util/mem/trmem.c       |    2 +-
 4 files changed, 20 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list