Commit a44029bb authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Do not fail the configure script if MPI_LAUNCH does not work and the mpirun...

Do not fail the configure script if MPI_LAUNCH does not work and the mpirun check is not requested explicitly.
parent 56eb6698
......@@ -41,13 +41,13 @@ AC_ARG_ENABLE([mpi],
# for some systems (e.g. CRAY) mpirun/aprun check is not possible
AC_ARG_ENABLE([mpirun-check],
[AS_HELP_STRING([--disable-mpirun-check],
[disable mpirun checks which might not work on some systems @<:@default: no@:>@])],
[disable mpirun checks which might not work on some systems @<:@default: auto@:>@])],
[case "${enableval}" in
yes) with_mpirun_check=true ;;
no) with_mpirun_check=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-mpirun-check]) ;;
esac],
[with_mpirun_check=true])
[with_mpirun_check=auto])
# OpenMP
AC_ARG_ENABLE([openmp],
......@@ -64,7 +64,6 @@ AC_ARG_ENABLE([openmp],
AM_CONDITIONAL([OPENMP], [test x"$openmp" = xtrue])
AM_CONDITIONAL([MPI], [test x"$mpi" = xtrue])
AM_CONDITIONAL([MPICHECK], [test x"$with_mpirun_check" = xtrue])
# DEBUG
AC_ARG_ENABLE([debug],
......@@ -179,7 +178,7 @@ AX_PROG_FC_MPI([test x"$mpi" != xfalse],
AS_IF([test x"$mpi" != xfalse],
# do not check for launch if mpirun-check is disabled
[AS_IF([test "x$with_mpirun_check" != "xtrue"],
[AS_IF([test "x$with_mpirun_check" = "xfalse"],
[AC_MSG_WARN([check for MPI_LAUNCH disabled])],
[AC_PATH_PROGS([MPI_LAUNCH], [poe mpirun mpiexec], [true])
# set MP_HOSTFILE if we are using IBM PE
......@@ -235,13 +234,17 @@ main(int argc, char **argv)
return (procnum == cmdnum)?EXIT_SUCCESS:EXIT_FAILURE;
}
])],
[AS_IF([$MPI_LAUNCH -n 4 ./conftest$EXEEXT 4],
[AS_IF([$MPI_LAUNCH -n 4 ./conftest$EXEEXT 4 >&AS_MESSAGE_LOG_FD 2>&1],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_FAILURE([$MPI_LAUNCH doesn't work])])],
AS_VAR_IF([with_mpirun_check], [auto],
[AC_MSG_WARN([$MPI_LAUNCH doesn't work])
with_mpirun_check=false],
[AC_MSG_FAILURE([$MPI_LAUNCH doesn't work])])])],
[AC_MSG_FAILURE([Cannot compile simple MPI program])])
])
])])
AM_CONDITIONAL([MPICHECK], [test x"$with_mpirun_check" != xfalse])
AC_FC_PP_SRCEXT([f90])
......
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