[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-379-g02dacff

Service Account noreply at mpich.org
Sun Aug 14 20:07:42 CDT 2016


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  02dacff6281fa963809807ee7876623cf3826c77 (commit)
      from  3ea7589e05e629f65c9c5a4fdfe8ae73d8beef9d (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/02dacff6281fa963809807ee7876623cf3826c77

commit 02dacff6281fa963809807ee7876623cf3826c77
Author: Wesley Bland <wesley.bland at intel.com>
Date:   Tue Aug 9 16:40:29 2016 -0500

    Add custom field to mpichversion
    
    Allow the user to add a custom value to mpichversion by passing in
    `--with-custom-version-string=something` on the configure line. This
    allows us to embed extra information for cases where it's helpful to
    pass along such information.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/configure.ac b/configure.ac
index 942f780..48764a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,6 +180,11 @@ if test "$V5" -le 9 ; then V5=0$V5 ; fi
 MPICH_NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`
 AC_SUBST(MPICH_NUMVERSION)
 
+AC_ARG_WITH(custom-version-string,
+            AC_HELP_STRING([--with-custom-version-string], [Adds a user-specified value to the output of the mpichversion executable]),,with_custom_version_string="")
+MPICH_CUSTOM_STRING=$with_custom_version_string
+AC_SUBST(MPICH_CUSTOM_STRING)
+
 # ABIVERSION is the name used by simplemake, so we reassign the
 # libmpi_so_version number to it
 ABIVERSION=${libmpi_so_version}
diff --git a/src/env/mpichversion.c b/src/env/mpichversion.c
index 3b9640e..cdfd793 100644
--- a/src/env/mpichversion.c
+++ b/src/env/mpichversion.c
@@ -29,7 +29,7 @@
 
 typedef enum { Version_number=0, Date=1, 
 	       Patches=2, Configure_args=3, Device=4,
-	       Compilers=5, LastField
+	       Compilers=5, Custom=6, LastField
              } fields;
 
 /*D
@@ -81,6 +81,10 @@ int main( int argc, char *argv[] )
 		     strcmp( argv[i], "--compiler" ) == 0 ||
 		     strcmp( argv[i], "-b" ) == 0)
 		flags[Compilers] = 1;
+	    else if (strcmp( argv[i], "-custom" ) == 0 ||
+		     strcmp( argv[i], "--custom" ) == 0 ||
+		     strcmp( argv[i], "-u" ) == 0)
+		flags[Custom] = 1;
 	    else {
 		fprintf( stderr, "Unrecognized argument %s\n", argv[i] );
 		exit(1);
@@ -107,6 +111,9 @@ int main( int argc, char *argv[] )
 	printf( "MPICH F77: \t%s\n", MPII_Version_F77 );
 	printf( "MPICH FC: \t%s\n", MPII_Version_FC );
     }
+    if (flags[Custom]) {
+        printf( "MPICH Custom Information: \t%s\n", MPII_Version_custom);
+    }
 
     return 0;
 }
diff --git a/src/include/mpichinfo.h.in b/src/include/mpichinfo.h.in
index f186b75..8fbc771 100644
--- a/src/include/mpichinfo.h.in
+++ b/src/include/mpichinfo.h.in
@@ -20,5 +20,6 @@
 #define MPICH_COMPILER_CXX "@CXX@ @CXXFLAGS@"
 #define MPICH_COMPILER_F77 "@F77@ @FFLAGS@"
 #define MPICH_COMPILER_FC "@FC@ @FCFLAGS@"
+#define MPICH_CUSTOM_STRING "@MPICH_CUSTOM_STRING@"
 
 #endif
diff --git a/src/include/mpir_misc.h b/src/include/mpir_misc.h
index f827888..b7f7750 100644
--- a/src/include/mpir_misc.h
+++ b/src/include/mpir_misc.h
@@ -56,6 +56,7 @@ extern const char MPII_Version_CC[];
 extern const char MPII_Version_CXX[];
 extern const char MPII_Version_F77[];
 extern const char MPII_Version_FC[];
+extern const char MPII_Version_custom[];
 
 int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
                    void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype);
diff --git a/src/mpi/init/initinfo.c b/src/mpi/init/initinfo.c
index 71dac94..a524cf9 100644
--- a/src/mpi/init/initinfo.c
+++ b/src/mpi/init/initinfo.c
@@ -20,3 +20,4 @@ const char MPII_Version_CC[]           = MPICH_COMPILER_CC;
 const char MPII_Version_CXX[]          = MPICH_COMPILER_CXX;
 const char MPII_Version_F77[]          = MPICH_COMPILER_F77;
 const char MPII_Version_FC[]           = MPICH_COMPILER_FC;
+const char MPII_Version_custom[]       = MPICH_CUSTOM_STRING;

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

Summary of changes:
 configure.ac               |    5 +++++
 src/env/mpichversion.c     |    9 ++++++++-
 src/include/mpichinfo.h.in |    1 +
 src/include/mpir_misc.h    |    1 +
 src/mpi/init/initinfo.c    |    1 +
 5 files changed, 16 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list