#!/bin/sh


_HMPI_VERSION=1.0.0


#Platform information on which HMPI is being built
PLATFORM=`uname -s`
DATE=`date`
VERSION="`uname -r`"

if [ "$PLATFORM" = "AIX" ] ; then
        VERSION="`oslevel`"
fi

if [ "$PLATFORM" = "OSF1" ] ; then
        PLATFORM="Tru64 Unix"
        VERSION="`uname -r` (Rev. `uname -v`)"
fi

#Obtain HMPI information
HMPIINFO="HMPI $_HMPI_VERSION"

#Obtain mpC information
MPCINFO="`mpcc -v`"

#Obtain MPI information
if test -f $MPIDIR/bin/lamd; then
	if test -f $MPIDIR/bin/laminfo; then
		MPIINFO="`laminfo -version lam full`"
	else
		MPIINFO="LAM"
	fi
fi

if test -f $MPIDIR/bin/mpichversion; then
	MPIINFO="`mpichversion | grep "MPICH Version:" | awk '{print $3}'`"
fi

if test -f $MPIDIR/bin/ompi_info; then
	MPIINFO="`ompi_info | grep "Open MPI:"`"
fi

echo "PLATFORM: $PLATFORM $VERSION"
echo "HMPI:     $HMPIINFO"
echo "MPC:      $MPCINFO"
echo "MPI:      $WHICHMPI $MPIINFO"
