Hi again,

> I've seen this as well on my new laptop: when configuring without MPI it 
> tells 
> me that the Trilinos 9.x installation uses MPI, but when I give --enable-mpi 
> to deal.II it tells me that the Trilinos installation doesn't use MPI. In 
> other words, it doesn't work either way. So you're not the only one who sees 
> this.
> 
> I haven't gotten around to figuring out what's going on and since I'm 
> traveling with another laptop I won't be able to before the weekend. I'll 
> take a look early next week unless someone beats me to it.

OK, the Epetra_config.h file defines macros for PACKAGE_BUGREPORT,
PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, and PACKAGE_VERSION which
get redefined because they are in confdefs.h. I think we can just
undefine these variables from confdefs.h for this test in aclocal.m4,
just as we undefine HAVE_INTTYPES_H further down. Wolfgang, can you
please check whether my suggestion is correct (see attached patch) and
possibly check it in? I can't change configure anyway because my
autoconf is the wrong version and will generate too many unnecessary
changes. I tested it with Trilinos version 8.0.8, 9.0.2, and 10.6.1 and
all work fine on my system.

Best,
Martin

Index: aclocal.m4
===================================================================
--- aclocal.m4	(revision 22609)
+++ aclocal.m4	(working copy)
@@ -6153,6 +6153,21 @@
   OLD_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS="$CXXFLAGS -I$DEAL_II_TRILINOS_INCDIR"
 
+  dnl Trilinos Epetra's Epetra_config.h might provide
+  dnl   #define PACKAGE_BUGREPORT
+  dnl   #define PACKAGE_NAME
+  dnl   #define PACKAGE_STRING
+  dnl   #define PACKAGE_TARNAME
+  dnl   #define PACKAGE_VERSION
+  dnl which is already set for the deal.II package. So undefine them for
+  dnl this test.
+  cp confdefs.h confdefs.h.bak
+  echo "#undef PACKAGE_BUGREPORT" >> confdefs.h
+  echo "#undef PACKAGE_NAME" >> confdefs.h
+  echo "#undef PACKAGE_STRING" >> confdefs.h
+  echo "#undef PACKAGE_TARNAME" >> confdefs.h
+  echo "#undef PACKAGE_VERSION" >> confdefs.h
+
   if test "x$DEAL_II_USE_MPI" = "xyes" ; then
     dnl So we support MPI. Check that our Trilinos installation
     dnl does too. Epetra sets the variable HAVE_MPI to 1 in case
@@ -6194,6 +6209,8 @@
 	exit 1;
       ])
   fi
+
+  mv confdefs.h.bak confdefs.h
   CXXFLAGS="${OLD_CXXFLAGS}"
 ])
 
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to