]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also try mpicxx when using --enable-mpi for ./configure.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 22 Jan 2011 13:06:16 +0000 (13:06 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 22 Jan 2011 13:06:16 +0000 (13:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@23238 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/configure
deal.II/configure.in
deal.II/doc/news/changes.h

index efbb8f8a059eeaf4ff5b2f0d1faf66b0442a02b3..9cc1253867e5dea6e31fc29aadf020ee363dfc82 100755 (executable)
@@ -2589,8 +2589,37 @@ $as_echo_n "checking whether to explicitly use MPI... " >&6; }
          if test "x$enableval" = "xyes" ; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-           if test "x$CXX" = "x" ; then CXX=mpiCC ; fi
-           if test "x$CC" = "x" ; then CC=mpicc ; fi
+
+           if test "x$CXX" = "x" ; then
+             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI C++ compiler" >&5
+$as_echo_n "checking for MPI C++ compiler... " >&6; }
+             if ((which mpiCC 2>&1) > /dev/null) ; then
+                CXX=mpiCC ;
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: mpiCC" >&5
+$as_echo "mpiCC" >&6; }
+              else
+               if ((which mpicxx 2>&1) > /dev/null) ; then
+                  CXX=mpicxx ;
+                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: mpicxx" >&5
+$as_echo "mpicxx" >&6; }
+                else
+                 as_fn_error $? "no MPI C++ compiler found" "$LINENO" 5
+                fi
+              fi
+            fi
+
+           if test "x$CC" = "x" ; then
+             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI C compiler" >&5
+$as_echo_n "checking for MPI C compiler... " >&6; }
+             if ((which mpicc 2>&1) > /dev/null) ; then
+                CC=mpicc ;
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: mpicc" >&5
+$as_echo "mpicc" >&6; }
+              else
+               as_fn_error $? "no MPI C compiler found" "$LINENO" 5
+              fi
+            fi
+
          else
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
index aafdb82ab2f35337de85b163c0f62cd1e57da005..68336502ad8af9973631a693ae5ebd4ee21490ad 100644 (file)
@@ -85,7 +85,9 @@ AC_MSG_RESULT(---------------- configuring C/C++ compilers ----------------)
 
 
 dnl See if the user has specified --enable-mpi. If so, and if $CXX and $CC have
-dnl not been set to a particular value, then override them with 'mpiCC' and 'mpicc'.
+dnl not been set to a particular value, then override them with 'mpiCC' and
+dnl 'mpicc'. The latter should always work, but sometimes the former is
+dnl called 'mpicxx' instead :-(
 AC_ARG_ENABLE(mpi,
        AS_HELP_STRING([--enable-mpi],
        [Select MPI-enabled compilers and MPI support in deal.II.]),
@@ -93,8 +95,32 @@ AC_ARG_ENABLE(mpi,
          AC_MSG_CHECKING(whether to explicitly use MPI)
          if test "x$enableval" = "xyes" ; then
            AC_MSG_RESULT(yes)
-           if test "x$CXX" = "x" ; then CXX=mpiCC ; fi
-           if test "x$CC" = "x" ; then CC=mpicc ; fi
+
+           if test "x$CXX" = "x" ; then 
+             AC_MSG_CHECKING(for MPI C++ compiler)
+             if ((which mpiCC 2>&1) > /dev/null) ; then
+                CXX=mpiCC ;
+               AC_MSG_RESULT(mpiCC)
+              else
+               if ((which mpicxx 2>&1) > /dev/null) ; then
+                  CXX=mpicxx ;
+                 AC_MSG_RESULT(mpicxx)
+                else
+                 AC_MSG_ERROR(no MPI C++ compiler found)
+                fi
+              fi
+            fi
+
+           if test "x$CC" = "x" ; then
+             AC_MSG_CHECKING(for MPI C compiler)
+             if ((which mpicc 2>&1) > /dev/null) ; then
+                CC=mpicc ;
+               AC_MSG_RESULT(mpicc)
+              else
+               AC_MSG_ERROR(no MPI C compiler found)
+              fi
+            fi
+
          else
            AC_MSG_RESULT(no)
          fi])
index be58a2aae73f85bbc090e607267f979013a85ac8..80b942b22f4d382b3782d4afe982dbbe086cb598 100644 (file)
@@ -29,9 +29,16 @@ inconvenience this causes.
 <h3>General</h3>
 
 <ol>
+<li> Fixed: When using the <code>--enable-mpi</code> to 
+<code>./configure</code>, the script only tried <code>mpiCC</code>
+as the MPI C++ compiler. However, on some systems, it is called
+<code>mpicxx</code>. The script now tries that as well.
+<br>
+(Wolfgang Bangerth, 2011/01/22)
+
 <li> Fixed: When using Trilinos and using the Intel C++ compiler,
 we accidentally used invalid compiler flags that led to a warning
-every time we compiled a file..
+every time we compiled a file.
 <br>
 (Wolfgang Bangerth, 2011/01/22)
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.