[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1-54-gcfe6626

Service Account noreply at mpich.org
Mon Mar 17 16:36:16 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  cfe6626bb15dea1530d30388506977ca8534c2a5 (commit)
       via  c6f930129a5c8427be34b41084e57bb983cf7f29 (commit)
       via  4db583eda9cd5a727bd31191c4340fe49a54d93c (commit)
      from  d4e30cc0f69f5f2b3d225803d0417d6cf07355c9 (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/cfe6626bb15dea1530d30388506977ca8534c2a5

commit cfe6626bb15dea1530d30388506977ca8534c2a5
Author: William Gropp <wgropp at illinois.edu>
Date:   Sun Mar 16 04:54:35 2014 -0500

    Add style comments for coding style checker
    
    These file had allowed uses of routines that aren't always permitted
    according to our coding style.  These edits let the coding style
    checker know that these uses are ok (most uses of printf or malloc/free
    in MPICH are incorrect - see the style guide).
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/env/mpivars.c b/src/env/mpivars.c
index 6d87d41..772f8f5 100644
--- a/src/env/mpivars.c
+++ b/src/env/mpivars.c
@@ -4,6 +4,12 @@
  *      See COPYRIGHT in top-level directory.
  */
 
+/* style:allow:snprintf:9 sig:0 */
+/* style:allow:strncpy:3 sig:0 */
+/* style:allow:fprintf:26 sig:0 */
+/* style:allow:free:3 sig:0 */
+/* style:allow:malloc:3 sig:0 */
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
diff --git a/src/mpi/debugger/allcommdbg.c b/src/mpi/debugger/allcommdbg.c
index a7a2cdd..690301c 100644
--- a/src/mpi/debugger/allcommdbg.c
+++ b/src/mpi/debugger/allcommdbg.c
@@ -7,6 +7,8 @@
 #include "mpi.h"
 #include <stdio.h>
 
+/* style: allow:printf:6 sig:0 */
+
 /* This definition is almost the same as the MPIR_Comm_list in dbginit, 
    except a void * is used instead of MPID_Comm * for head; for the use
    here, void * is all that is needed */
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index d8f7d1c..b2184d5 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -6,6 +6,11 @@
 
 #include "mpiimpl.h"
 
+/* style:PMPIuse:PMPI_Get_processor_name:2 sig:0 */
+/* style:PMPIuse:PMPI_Recv:2 sig:0 */
+/* style:PMPIuse:PMPI_Ssend:2 sig:0 */
+/* style: allow:printf:1 sig:0 */
+
 /* For getpid */
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
diff --git a/src/mpi/debugger/dbgstub.c b/src/mpi/debugger/dbgstub.c
index 821c14b..52c8d74 100644
--- a/src/mpi/debugger/dbgstub.c
+++ b/src/mpi/debugger/dbgstub.c
@@ -4,6 +4,8 @@
  *      See COPYRIGHT in top-level directory.
  */
 
+/* style: allow:printf:13 sig:0 */
+
 #include "mpiimpl.h"
 /* These are pointers to the static variables in src/mpid/ch3/src/ch3u_recvq.c
    that contains the *addresses* of the posted and unexpected queue head 
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index 121d0e7..0e20b80 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -7,6 +7,8 @@
 
 #include "mpiimpl.h"
 
+/* style:PMPIuse:PMPI_Status_f2c:2 sig:0 */
+
 #undef FUNCNAME
 #define FUNCNAME MPIR_Progress_wait_request
 #undef FCNAME

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

commit c6f930129a5c8427be34b41084e57bb983cf7f29
Author: William Gropp <wgropp at illinois.edu>
Date:   Sun Mar 16 04:50:34 2014 -0500

    Use MPIR_MIN/MPIR_MAX instead of MIN/MAX
    
    The coding standards are clear on this; since we can't trust the system
    header files not to make definitions that conflict with ours, good
    coding practice is to make all MPICH names distinct.  The MPIR_MIN
    and MPIR_MAX definitions were made long ago for just this purpose.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpi/datatype/get_elements_x.c b/src/mpi/datatype/get_elements_x.c
index 57bef2b..b15b7c2 100644
--- a/src/mpi/datatype/get_elements_x.c
+++ b/src/mpi/datatype/get_elements_x.c
@@ -16,10 +16,6 @@
 #endif
 /* -- End Profiling Symbol Block */
 
-#ifndef MIN
-#define MIN(__a, __b) (((__a) < (__b)) ? (__a) : (__b))
-#endif
-
 /* Internal helper routines.  If you want to get the number of elements from
  * within the MPI library, call MPIR_Get_elements_x_impl instead. */
 PMPI_LOCAL MPI_Count MPIR_Type_get_basic_type_elements(MPI_Count *bytes_p,
@@ -78,7 +74,7 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_basic_type_elements(MPI_Count *bytes_p,
         usable_bytes = *bytes_p;
     }
     else {
-        usable_bytes = MIN(*bytes_p,
+        usable_bytes = MPIR_MIN(*bytes_p,
                            count * MPID_Datatype_get_basic_size(datatype));
     }
 
diff --git a/src/mpi/datatype/type_create_darray.c b/src/mpi/datatype/type_create_darray.c
index 528581f..bcb70c2 100644
--- a/src/mpi/datatype/type_create_darray.c
+++ b/src/mpi/datatype/type_create_darray.c
@@ -17,10 +17,6 @@
 #endif
 /* -- End Profiling Symbol Block */
 
-#ifndef MIN
-#define MIN(__a, __b) (((__a) < (__b)) ? (__a) : (__b))
-#endif
-
 PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes,
 			       int dim,
 			       int ndims,
@@ -105,7 +101,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes,
     }
 
     j = global_size - blksize*rank;
-    mysize = MIN(blksize, j);
+    mysize = MPIR_MIN(blksize, j);
     if (mysize < 0) mysize = 0;
 
     stride = orig_extent;
@@ -222,7 +218,7 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes,
     else {
 	local_size = ((end_index - st_index + 1)/(nprocs*blksize))*blksize;
 	rem = (end_index - st_index + 1) % (nprocs*blksize);
-	local_size += MIN(rem, blksize);
+	local_size += MPIR_MIN(rem, blksize);
     }
 
     count = local_size/blksize;

http://git.mpich.org/mpich.git/commitdiff/4db583eda9cd5a727bd31191c4340fe49a54d93c

commit 4db583eda9cd5a727bd31191c4340fe49a54d93c
Author: William Gropp <wgropp at illinois.edu>
Date:   Sun Mar 16 04:48:14 2014 -0500

    Add style commands to generated files
    
    The coding checker sometimes needs some hints that certain uses are
    permitted.  This adds the necessary information to some of the generated
    files.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index 5fa6310..7c1ff1b 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -2098,6 +2098,9 @@ sub build_specials {
     print $OUTFD "#include <stdarg.h>\n";    # Required for pcontrol
     print $OUTFD "#include \"mpichconf.h\"\n"; # Requires for HAVE_FORTRAN_BINDING
 
+    # Add exception for coding style checker
+    print $OUTFD "/* style:PMPIuse:PMPI_Type_set_name:4 sig:0 */\n";
+
     # The coverage header is included in mpicxx.h.in
     #&printCoverageHeader( $OUTFD, 0 );
 
diff --git a/src/binding/f90/buildiface b/src/binding/f90/buildiface
index 6580643..b1eb8b1 100755
--- a/src/binding/f90/buildiface
+++ b/src/binding/f90/buildiface
@@ -450,10 +450,12 @@ if ($is_MPI) {
             \@WTIME_DOUBLE_TYPE\@ MPI_WTICK
         END FUNCTION MPI_WTICK
 
+! style:PMPIuse:PMPI_WTIME:3 sig:0
         FUNCTION PMPI_WTIME()
             \@WTIME_DOUBLE_TYPE\@ PMPI_WTIME
         END FUNCTION PMPI_WTIME
 !
+! style:PMPIuse:PMPI_WTICK:3 sig:0
         FUNCTION PMPI_WTICK()
             \@WTIME_DOUBLE_TYPE\@ PMPI_WTICK
         END FUNCTION PMPI_WTICK

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

Summary of changes:
 src/binding/cxx/buildiface            |    3 +++
 src/binding/f90/buildiface            |    2 ++
 src/env/mpivars.c                     |    6 ++++++
 src/mpi/datatype/get_elements_x.c     |    6 +-----
 src/mpi/datatype/type_create_darray.c |    8 ++------
 src/mpi/debugger/allcommdbg.c         |    2 ++
 src/mpi/debugger/dbginit.c            |    5 +++++
 src/mpi/debugger/dbgstub.c            |    2 ++
 src/mpi/pt2pt/mpir_request.c          |    2 ++
 9 files changed, 25 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list