Better support for OpenMPI
@@ -275,6 +275,20 @@ AC_ARG_ENABLE(mpi-checks,
disables these checks.]),
[ [[ ${enableval} = no ]] && ENABLE_MPI_CHECKS=0 ])
+# Set MPI_DIR with respect to a system OpenMPI
+if [[ ${USE_MPI_DIR} == 0 ]] && [[ ${ENABLE_CUSTOM_MPI} == 0 ]]
+then
+ OPENMPI=/usr/lib/x86_64-linux-gnu/openmpi
+ if [[ -r ${OPENMPI}/include/mpi.h ]]
+ then
+ AC_MSG_RESULT([Using OpenMPI directory: ${OPENMPI}])
+ USE_MPI_DIR=${OPENMPI}
+ USE_LAUNCHER=/usr/bin/mpiexec
+ USE_MPI_INCLUDE=${USE_MPI_DIR}/include
+ USE_MPI_LIB=${USE_MPI_DIR}/lib
+ fi
+fi
+
# Set MPI_DIR with respect to an mpicc in PATH
if [[ ${USE_MPI_DIR} == 0 ]]
then
