Skip to content
Snippets Groups Projects
Commit f25b96da authored by Christian Engwer's avatar Christian Engwer
Browse files

fix problems with Markus' strange mpicc

[[Imported from SVN: r5617]]
parent 5d5a69ec
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ AC_DEFUN([DUNE_MPI],[
MPI_CONFIG()
MPI_CPPFLAGS="$MPI_CPPFLAGS $MPI_NOCXXFLAGS -DENABLE_MPI=1"
with_mpi="yes ($MPI_VERSION)"
with_mpi="yes ($dune_MPI_VERSION)"
],[
# ACX_MPI didn't find anything
with_mpi="no"
......@@ -103,7 +103,7 @@ AC_DEFUN([DUNE_MPI],[
# if an MPI implementation was found..
if test x"$with_mpi" != xno ; then
### do a sanity check: can we compile and link a trivial MPI program?
AC_MSG_CHECKING([whether compiling with $MPI_VERSION works])
AC_MSG_CHECKING([whether compiling with $dune_MPI_VERSION works])
# store old values
ac_save_LIBS="$LIBS"
......@@ -130,9 +130,9 @@ AC_DEFUN([DUNE_MPI],[
)
if test "x$mpiruntest" != "xyes" ; then
AC_MSG_WARN([Diabled test whether running with $MPI_VERSION works.])
AC_MSG_WARN([Diabled test whether running with $dune_MPI_VERSION works.])
else
AC_MSG_CHECKING([whether running with $MPI_VERSION works])
AC_MSG_CHECKING([whether running with $dune_MPI_VERSION works])
AC_RUN_IFELSE(
AC_LANG_SOURCE(
[ #include <mpi.h>
......@@ -169,7 +169,7 @@ AC_DEFUN([DUNE_MPI],[
if test x"$with_mpi" != xno ; then
AC_SUBST(MPI_CPPFLAGS, $MPI_CPPFLAGS)
AC_SUBST(MPI_LDFLAGS, $MPI_LDFLAGS)
AC_SUBST(MPI_VERSION, $MPI_VERSION)
AC_SUBST(MPI_VERSION, $dune_MPI_VERSION)
AC_DEFINE(HAVE_MPI,ENABLE_MPI,[Define if you have the MPI library.
This is only true if MPI was found by configure
_and_ if the application uses the MPI_CPPFLAGS])
......
......@@ -51,12 +51,12 @@ _EOF
if test x"$retval" != x ; then
# seems like LAM >= 7.1 which supports extraction of parameters without
# dummy files
MPI_VERSION="LAM >= 7.1"
dune_MPI_VERSION="LAM >= 7.1"
MPI_CPPFLAGS="$retval"
mpi_getflags "-showme:link"
MPI_LDFLAGS="$retval"
else
MPI_VERSION="LAM < 7.1"
dune_MPI_VERSION="LAM < 7.1"
# use -showme and dummy parameters to extract flags
mpi_getflags "-showme" "-c $MPISOURCE"
MPI_CPPFLAGS="$retval"
......@@ -132,7 +132,7 @@ _EOF
if (mpi_preprocess conftest.c \
| grep -q MPICHX_PARALLELSOCKETS_PARAMETERS); then
MPI_VERSION="MPICH"
dune_MPI_VERSION="MPICH"
mpi_getmpichflags
AC_MSG_RESULT([yes])
......@@ -154,7 +154,7 @@ int main() { printf ("%s\n", MPICH2_VERSION); return 0; }
_EOF
if mpi_trybuild "-c conftest.c"; then
MPI_VERSION="MPICH2"
dune_MPI_VERSION="MPICH2"
mpi_getmpich2flags
AC_MSG_RESULT([yes])
......@@ -176,7 +176,7 @@ int main() { return 0; }
_EOF
if (mpi_preprocess conftest.c | grep -q ompi_communicator_t); then
MPI_VERSION="OpenMPI"
dune_MPI_VERSION="OpenMPI"
mpi_getflags "-showme:compile"
MPI_CPPFLAGS="$retval"
......@@ -198,7 +198,7 @@ test_mvapich() {
AC_MSG_CHECKING([for MVAPICH])
mpi_getflags "-v" "-c dummy.c"
if (echo $MPI_VERSION | grep ^MVAPICH>/dev/null);then
if (echo $dune_MPI_VERSION | grep ^MVAPICH>/dev/null);then
get_mpichflags
AC_MSG_RESULT([yes])
......@@ -227,7 +227,7 @@ int main() { printf("%s\n",MVAPICH2_VERSION); return 0; }
_EOF
if mpi_trybuild "-c conftest.c"; then
MPI_VERSION="MVAPICH2"
dune_MPI_VERSION="MVAPICH2"
mpi_getmpich2flags
AC_MSG_RESULT([yes])
......@@ -245,7 +245,7 @@ test_ibmmpi() {
if $MPICC -v -c conftest.c > /dev/null 2>&1; then
mpi_getflags "-v" "-c dummy.c"
if (echo $retval | grep '^xl[[cC]]'); then
MPI_VERSION="IBM MPI"
dune_MPI_VERSION="IBM MPI"
# get compilation script
# AC_LANG_CASE([C],[
......@@ -286,7 +286,7 @@ test_intelmpi() {
AC_MSG_CHECKING([for Intel MPI])
mpi_getflags "-v"
if (echo $retval | grep 'Intel(R) MPI Library'); then
MPI_VERSION="Intel MPI"
dune_MPI_VERSION="Intel MPI"
mpi_getmpich2flags
AC_MSG_RESULT([yes])
......@@ -300,7 +300,7 @@ test_intelmpi() {
get_mpiparameters() {
AC_MSG_NOTICE([Trying to identify the version of MPI compiler $MPICC])
if test x"$MPI_VERSION" != x; then
if test x"$dune_MPI_VERSION" != x; then
return
fi
......@@ -313,7 +313,7 @@ get_mpiparameters() {
test_ibmmpi && return
test_intelmpi && return
MPI_VERSION="unknown"
dune_MPI_VERSION="unknown"
AC_MSG_ERROR([Could not identify MPI-package! Please send a bugreport and tell us what MPI-package you're using.])
}
])
......
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