Skip to content
Snippets Groups Projects
Commit c7f28e96 authored by Markus Blatt's avatar Markus Blatt
Browse files

Unfortunately in the mpich2 running on blue gene the -link_info as well as the

 -compile_info options are deprecated and default to the show option which 
displays linker as well as compile flags (at least when linking).

Introduced some magic to separate the flags. This should now work for both mpich and mpich2.


[[Imported from SVN: r5349]]
parent 1f525956
Branches
Tags
No related merge requests found
......@@ -74,15 +74,25 @@ _EOF
return 1
}
mpi_getmpichflags() {
mpi_getmpich2flags() {
# use special commands to extract options
mpi_getflags "-compile_info"
mpi_getflags "-show" "-c"
MPI_CPPFLAGS="$retval"
# remove implicitly set -c
mpi_remove "$MPI_CPPFLAGS" '-c'
MPI_CPPFLAGS="$retval"
mpi_getflags "-link_info"
# get linker options
mpi_getflags "-show" "-o"
MPI_LDFLAGS="$retval"
# strip -o option
mpi_remove "$MPI_LDFLAGS" "-o"
MPI_LDFLAGS="$retval"
#strip MPI_CPPFLAGS (which are included for mpich2 on jugene)
enc=`echo "$MPI_CPPFLAGS" | sed -e 's/\\//\\\\\\//g'`
MPI_LDFLAGS=`echo "$retval" | sed -e "s/$enc / /"`
# hack in option to disable MPICH-C++-bindings...
MPI_NOCXXFLAGS="-DMPICH_SKIP_MPICXX"
}
......@@ -98,7 +108,7 @@ _EOF
if (mpi_preprocess conftest.c \
| grep -q MPICHX_PARALLELSOCKETS_PARAMETERS); then
MPI_VERSION="MPICH"
mpi_getmpichflags
mpi_getmpich2flags
AC_MSG_RESULT([yes])
rm -f conftest*
......@@ -120,7 +130,7 @@ _EOF
if mpi_trybuild "-c conftest.c"; then
MPI_VERSION="MPICH2"
mpi_getmpichflags
mpi_getmpich2flags
AC_MSG_RESULT([yes])
rm -f conftest*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment