Skip to content
Snippets Groups Projects
Commit a6c2a01b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'autotools-update' into 'master'

Autotools update

Check that we have at least OpenMPI version 1.8.6 and warn if we do not.

See merge request !24


Former-commit-id: 5b04516684c7a6d4c89b88c4a453f198cff693b9
parents 4de9aea3 0871dcd9
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ AC_ARG_ENABLE([mpi], ...@@ -57,6 +57,7 @@ AC_ARG_ENABLE([mpi],
[enable_mpi="$enableval"], [enable_mpi="$enableval"],
[enable_mpi="yes"] [enable_mpi="yes"]
) )
good_mpi="yes"
if test "$enable_mpi" = "yes"; then if test "$enable_mpi" = "yes"; then
AX_MPI([CC="$MPICC" AC_DEFINE(HAVE_MPI, 1, [Define if you have the MPI library.]) ]) AX_MPI([CC="$MPICC" AC_DEFINE(HAVE_MPI, 1, [Define if you have the MPI library.]) ])
...@@ -86,6 +87,15 @@ if test "$enable_mpi" = "yes"; then ...@@ -86,6 +87,15 @@ if test "$enable_mpi" = "yes"; then
*"Open MPI"*) *"Open MPI"*)
MPI_THREAD_LIBS="" MPI_THREAD_LIBS=""
AC_MSG_RESULT([Open MPI]) AC_MSG_RESULT([Open MPI])
# OpenMPI should be 1.8.6 or later, if not complain.
# Version is last word on first line of -version output.
revision=`mpirun -version 2>&1 | grep "Open MPI" | awk '{print $NF}'`
AX_COMPARE_VERSION( $revision, [ge], [1.8.6],,[good_mpi="no"] )
if test "$good_mpi" = "no"; then
AC_MSG_WARN([
Open MPI version should be at least 1.8.6 (is $revision)])
enable_mpi="yes (but with warning)"
fi
;; ;;
*) *)
MPI_THREAD_LIBS="" MPI_THREAD_LIBS=""
...@@ -97,6 +107,8 @@ if test "$enable_mpi" = "yes"; then ...@@ -97,6 +107,8 @@ if test "$enable_mpi" = "yes"; then
fi fi
AM_CONDITIONAL([HAVEMPI],[test -n "$MPICC"]) AM_CONDITIONAL([HAVEMPI],[test -n "$MPICC"])
# Need C99 and inline support. # Need C99 and inline support.
AC_PROG_CC_C99 AC_PROG_CC_C99
AC_C_INLINE AC_C_INLINE
...@@ -219,7 +231,7 @@ AX_LIB_HDF5 ...@@ -219,7 +231,7 @@ AX_LIB_HDF5
# The default is to use MPI support if it is available, i.e. this is # The default is to use MPI support if it is available, i.e. this is
# a parallel HDF5. # a parallel HDF5.
# To do this need to ask the HDF5 compiler about its configuration, # To do this need to ask the HDF5 compiler about its configuration,
# -showconfig should have yes/no. # -showconfig should have yes/no.
have_parallel_hdf5="no" have_parallel_hdf5="no"
if test "$with_hdf5" = "yes"; then if test "$with_hdf5" = "yes"; then
AC_ARG_ENABLE([parallel-hdf5], AC_ARG_ENABLE([parallel-hdf5],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment