Commit eed78fd4 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r5681] Export the MPICH2 version and other relevant information for Hydra to

pick up (this will be displayed in mpiexec -info). This required
replacing the "VERSION" string to "MPICH2_VERSION" since VERSION seems
to be overwritten by autoconf.

Reviewed by buntinas.
parent b7c80de6
......@@ -137,7 +137,8 @@ AC_SUBST(RELEASE_DATE)
# Try to find the version
if test -s "$srcdir/maint/Version" ; then
VERSION="`cat $srcdir/maint/Version`"
MPICH2_VERSION="`cat $srcdir/maint/Version`"
export MPICH2_VERSION
else
AC_MSG_ERROR([Version information not found. Configuration aborted.])
fi
......@@ -161,11 +162,11 @@ fi
# Numeric version will have 1 digit for MAJ, 2 digits for MIN,
# 2 digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER.
changequote(<<,>>)
V1=`expr $VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
V2=`expr $VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
V3=`expr $VERSION : '[0-9]*\.[0-9]*\.*\([0-9]*\)[a-zA-Z]*[0-9]*'`
V4=`expr $VERSION : '[0-9]*\.[0-9]*\.*[0-9]*\([a-zA-Z]*\)[0-9]*'`
V5=`expr $VERSION : '[0-9]*\.[0-9]*\.*[0-9]*[a-zA-Z]*\([0-9]*\)'`
V1=`expr $MPICH2_VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
V2=`expr $MPICH2_VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
V3=`expr $MPICH2_VERSION : '[0-9]*\.[0-9]*\.*\([0-9]*\)[a-zA-Z]*[0-9]*'`
V4=`expr $MPICH2_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*\([a-zA-Z]*\)[0-9]*'`
V5=`expr $MPICH2_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*[a-zA-Z]*\([0-9]*\)'`
changequote([,])
if test "$V2" -le 9 ; then V2=0$V2 ; fi
......@@ -185,9 +186,9 @@ elif test "$V4" = "p" ; then
fi
if test "$V5" -le 9 ; then V5=0$V5 ; fi
NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`
AC_SUBST(NUMVERSION)
AC_SUBST(VERSION)
MPICH2_NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`
AC_SUBST(MPICH2_NUMVERSION)
AC_SUBST(MPICH2_VERSION)
# ABIVERSION is incremented when there are changes in the ABI. This is
......@@ -202,8 +203,8 @@ AC_SUBST(VERSION)
# We use libtool-style version numbers (see --version-info in the
# libtool manual)
changequote(<<,>>)
V1=`expr $VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
V2=`expr $VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
V1=`expr $MPICH2_VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
V2=`expr $MPICH2_VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
changequote([,])
ABIVERSION="${V1}:${V2}"
AC_SUBST(ABIVERSION)
......@@ -212,9 +213,9 @@ AC_SUBST(ABIVERSION)
CONFIGURE_ARGUMENTS="$ac_configure_args"
AC_SUBST(CONFIGURE_ARGUMENTS)
if test -n "$ac_configure_args" ; then
echo "Configuring MPICH2 version $VERSION with $ac_configure_args"
echo "Configuring MPICH2 version $MPICH2_VERSION with $ac_configure_args"
else
echo "Configuring MPICH2 version $VERSION"
echo "Configuring MPICH2 version $MPICH2_VERSION"
fi
# Add the information on the system:
echo "Running on system: `uname -a`"
......
......@@ -301,8 +301,8 @@ typedef int (MPI_Delete_function) ( MPI_Comm, int, void *, void * );
* digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER. So,
* 1.0.7rc1 will have the numeric version 10007201.
*/
#define MPICH2_VERSION "@VERSION@"
#define MPICH2_NUMVERSION @NUMVERSION@
#define MPICH2_VERSION "@MPICH2_VERSION@"
#define MPICH2_NUMVERSION @MPICH2_NUMVERSION@
#define MPICH2_RELEASE_TYPE_ALPHA 0
#define MPICH2_RELEASE_TYPE_BETA 1
......
......@@ -4,7 +4,7 @@ AC_PREREQ(2.62)
# See COPYRIGHT in top-level directory.
#
AC_INIT([Hydra], [0.1])
AC_INIT([Hydra], [0])
AC_CONFIG_AUX_DIR(mpl/confdb)
AC_CONFIG_MACRO_DIR(mpl/confdb)
AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.11])
......@@ -34,6 +34,19 @@ PAC_ARG_STRICT
PAC_C_GNU_ATTRIBUTE
PAC_CC_FUNCTION_NAME_SYMBOL
# Build information
if test "x$MPICH2_VERSION" = "x" ; then
HYDRA_VERSION="unknown"
else
HYDRA_VERSION=$MPICH2_VERSION
fi
AC_DEFINE_UNQUOTED(HYDRA_VERSION,"$HYDRA_VERSION",[Hydra version information])
AC_DEFINE_UNQUOTED(HYDRA_CC,"$CC",[C compiler])
AC_DEFINE_UNQUOTED(HYDRA_CXX,"$CXX",[C++ compiler])
AC_DEFINE_UNQUOTED(HYDRA_F77,"$F77",[Fortran 77 compiler])
AC_DEFINE_UNQUOTED(HYDRA_F90,"$F90",[Fortran 90 compiler])
AC_DEFINE_UNQUOTED(HYDRA_CONFIGURE_ARGS_CLEAN,"$ac_configure_args",[Configure arguments])
# Find the full path of the source dir (for VPATH builds)
abs_srcdir=`(cd $srcdir && pwd)`
......
......@@ -874,12 +874,34 @@ static HYD_status info_fn(char *arg, char ***argv)
HYDU_ERR_SETANDJUMP(status, HYD_GRACEFUL_ABORT, "");
}
printf("HYDRA build details:\n");
printf(" Process Manager: pmi\n");
printf(" Boot-strap servers available: %s\n", HYDRA_BSS_NAMES);
printf(" Communication sub-systems available: none\n");
printf(" Binding libraries available: %s\n", HYDRA_BINDLIB_NAMES);
printf(" Checkpointing libraries available: %s\n", HYDRA_CKPOINTLIB_NAMES);
HYDU_dump_noprefix(stdout,
"HYDRA build details:\n");
HYDU_dump_noprefix(stdout,
" Version: %s\n", HYDRA_VERSION);
HYDU_dump_noprefix(stdout,
" CC: %s\n", HYDRA_CC);
HYDU_dump_noprefix(stdout,
" CXX: %s\n", HYDRA_CXX);
HYDU_dump_noprefix(stdout,
" F77: %s\n", HYDRA_F77);
HYDU_dump_noprefix(stdout,
" F90: %s\n", HYDRA_F90);
HYDU_dump_noprefix(stdout,
" Configure options: %s\n",
HYDRA_CONFIGURE_ARGS_CLEAN);
HYDU_dump_noprefix(stdout,
" Process Manager: pmi\n");
HYDU_dump_noprefix(stdout,
" Boot-strap servers available: %s\n",
HYDRA_BSS_NAMES);
HYDU_dump_noprefix(stdout,
" Communication sub-systems available: none\n");
HYDU_dump_noprefix(stdout,
" Binding libraries available: %s\n",
HYDRA_BINDLIB_NAMES);
HYDU_dump_noprefix(stdout,
" Checkpointing libraries available: %s\n",
HYDRA_CKPOINTLIB_NAMES);
HYDU_ERR_SETANDJUMP(status, HYD_GRACEFUL_ABORT, "");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment