@@ -234,6 +234,7 @@ AC_DEFUN([CHECK_MPI_VERSION],[
234234 AC_MSG_RESULT ( [ ${mpi_version}.${mpi_subversion}] )
235235 fi
236236
237+ AC_CHECK_DECL ( [ CRAY_MPICH_VERSION] , [ ] , [ ] , [ #include <mpi.h>] )
237238 AC_CHECK_DECL ( [ MPICH_VERSION] , [ ] , [ ] , [ #include <mpi.h>] )
238239 AC_CHECK_DECL ( [ MPICH2_VERSION] , [ ] , [ ] , [ #include <mpi.h>] )
239240 AC_CHECK_DECL ( [ OMPI_MAJOR_VERSION] , [ ] , [ ] , [ #include <mpi.h>] )
@@ -265,7 +266,19 @@ AC_DEFUN([CHECK_MPI_VERSION],[
265266 # Note MVAPICH2's mpi.h also defines MPICH_VERSION, so this check must be
266267 # done before MPICH.
267268 if test -f saved_conftest.i ; then
268- if test "x$ac_cv_have_decl_MVAPICH2_VERSION" = xyes ; then
269+ if test "x$ac_cv_have_decl_CRAY_MPICH_VERSION" = xyes ; then
270+ cray_mpich_version=`${GREP} " CRAY_MPICH_VERSION " saved_conftest.i | cut -d' ' -f3`
271+ if test "x$ac_cv_have_decl_MPICH_VERSION" = xyes ; then
272+ mpich_version=`${GREP} " MPICH_VERSION " saved_conftest.i | cut -d' ' -d'"' -f2`
273+ AC_MSG_RESULT ( Cray MPICH $cray_mpich_version based on MPICH $mpich_version )
274+ unset mpich_version
275+ else
276+ AC_MSG_RESULT ( Cray MPICH $cray_mpich_version )
277+ fi
278+ ax_cv_mpi_compiler_vendor="Cray MPICH"
279+ ax_cv_mpi_compiler_version=$cray_mpich_version
280+ unset cray_mpich_version
281+ elif test "x$ac_cv_have_decl_MVAPICH2_VERSION" = xyes ; then
269282 mvapich2_version=`${GREP} " MVAPICH2_VERSION " saved_conftest.i | cut -d' ' -d'"' -f2`
270283 AC_MSG_RESULT ( MVAPICH2 $mvapich2_version )
271284 ax_cv_mpi_compiler_vendor=MVAPICH2
0 commit comments