Skip to content
Snippets Groups Projects
Commit 21d244f4 authored by Steffen Müthing's avatar Steffen Müthing Committed by Christian Engwer
Browse files

Add support for MPICH 3.x

MPICH has stepped up its versioning scheme, jumping from MPICH2 1.x
to MPICH 3.x, but has stayed compatible to the older MPICH2 versions.
Unfortunately, the macro MPICH2_VERSION used by mpi_config.m4 to detect
the package has been renamed to MPICH_VERSION.

This patch fixes the problem by adding a separate test for MPICH_VERSION
ana making sure that the macro starts with the letter "3".
parent 29501d1a
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,12 @@ mpi_trybuild () {
return 0
}
mpi_trybuild_run () {
mpi_trybuild "-o conftest ${1}" || return 1
./conftest 2>&1 || return 1
return 0
}
mpi_preprocess () {
$MPICC -E -c ${1} 2> /dev/null
}
......@@ -177,7 +183,29 @@ _EOF
AC_MSG_RESULT([yes])
rm -f conftest*
return 0
return 0
fi
rm -f conftest*
AC_MSG_RESULT([no])
return 1
}
test_mpich3 () {
AC_MSG_CHECKING([for mpich 3.x])
cat >conftest.c <<_EOF
#include <mpi.h>
#include <stdio.h>
int main() { printf ("%s\n", MPICH_VERSION); return 0; }
_EOF
if (mpi_trybuild_run "conftest.c" | grep -q "^3\.") ; then
dune_MPI_VERSION="MPICH2"
mpi_getmpich2flags
AC_MSG_RESULT([yes])
rm -f conftest*
return 0
fi
rm -f conftest*
......@@ -316,6 +344,7 @@ get_mpiparameters() {
test_mvapich && return
test_mvapich2 && return
test_mpich2 && return
test_mpich3 && return
test_ibmmpi && return
test_intelmpi && return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment