From: young Date: Sun, 7 Mar 2010 12:46:09 +0000 (+0000) Subject: Changes to the configure script to simplify and aid maintainance of the PETScWrappers... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd50a3352697f2823fb66d3c5a2970b29f091edf;p=dealii-svn.git Changes to the configure script to simplify and aid maintainance of the PETScWrappers. Support for PETSc <2.3.0 has been dropped. git-svn-id: https://svn.dealii.org/trunk@20743 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 173fb323a4..1675624938 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -5704,7 +5704,7 @@ dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl [ dnl First check for the PETSc directory - AC_MSG_CHECKING(for PETSc library directory) + AC_MSG_CHECKING([for PETSc library directory]) AC_ARG_WITH(petsc, [AS_HELP_STRING([--with-petsc=path/to/slepc], @@ -5722,8 +5722,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl dnl Make sure that what was specified is actually correct if test ! -d $DEAL_II_PETSC_DIR/include \ ; then - AC_MSG_ERROR([Path to PETSc specified with --with-petsc does not - point to a complete PETSc installation]) + AC_MSG_ERROR([Path to PETSc specified with --with-petsc does not point to a complete PETSc installation]) fi fi ], @@ -5737,20 +5736,17 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl dnl Make sure that what this is actually correct if test ! -d $DEAL_II_PETSC_DIR/include \ ; then - AC_MSG_ERROR([The path to PETSc specified in the PETSC_DIR - environment variable does not - point to a complete PETSc installation]) + AC_MSG_ERROR([The path to PETSc specified in the PETSC_DIR environment variable does not point to a complete PETSc installation]) fi else USE_CONTRIB_PETSC=no DEAL_II_PETSC_DIR="" - AC_MSG_RESULT(not found) + AC_MSG_RESULT([not found]) fi ]) if test "$USE_CONTRIB_PETSC" = "yes" ; then - AC_DEFINE(DEAL_II_USE_PETSC, 1, - [Defined if a PETSc installation was found and is going - to be used]) + AC_DEFINE([DEAL_II_USE_PETSC], [1], + [Defined if a PETSc installation was found and is going to be used]) dnl Set an additional variable (not via AC_DEFINE, since we don't want dnl to have it in config.h) which we can use in doc/doxygen/options.dox.in. @@ -5761,16 +5757,10 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl dnl Also work around a stupidity in PETSc that makes sure it interferes in dnl a completely obnoxious way with boost. - AC_DEFINE(PETSC_SKIP_UNDERSCORE_CHKERR, 1, - [Make sure PETSc doesn't re-define the underscore through the - preprocessor, since this interferes with boost. PETSc redefines - the underscore to be "__gterr =", but then forgets to undef this - thing. Boost simply wants to concatenate the underscore with another - string to form a class name, which then of course isn't valid - any more. See mails in early Feb 2006.]) + AC_DEFINE([PETSC_SKIP_UNDERSCORE_CHKERR], [1], + [Make sure PETSc doesn't re-define the underscore through the preprocessor, since this interferes with boost. PETSc redefines the underscore to be "__gterr =", but then forgets to undef this thing. Boost simply wants to concatenate the underscore with another string to form a class name, which then of course isn't valid any more. See mails in early Feb 2006.]) fi - dnl If we have found PETSc, determine additional pieces of data if test "$USE_CONTRIB_PETSC" = "yes" ; then DEAL_II_CONFIGURE_PETSC_VERSION @@ -5789,8 +5779,8 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl fi fi - dnl Make sure that the right values for PETSC vectors are written into - dnl common/template-arguments.in + dnl Make sure that the right values for PETSC vectors are written + dnl into common/template-arguments.in AC_SUBST(DEAL_II_EXPAND_PETSC_VECTOR) AC_SUBST(DEAL_II_EXPAND_PETSC_MPI_VECTOR) AC_SUBST(DEAL_II_EXPAND_PETSC_BLOCKVECTOR) @@ -5800,76 +5790,50 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl dnl ------------------------------------------------------------ -dnl Figure out the architecture used for PETSc, since that determines -dnl where object and configuration files will be found. +dnl Figure out the architecture used for PETSc, since that +dnl determines where object and configuration files will be found. dnl dnl Usage: DEAL_II_CONFIGURE_PETSC_ARCH dnl dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_ARCH, dnl [ - AC_MSG_CHECKING(for PETSc library architecture) + AC_MSG_CHECKING([for PETSc library architecture]) AC_ARG_WITH(petsc-arch, [AS_HELP_STRING([--with-petsc-arch=architecture], [Specify the architecture for your PETSc installation; use this if you want to override the PETSC_ARCH environment variable.])], - [ - DEAL_II_PETSC_ARCH="$withval" - AC_MSG_RESULT($DEAL_II_PETSC_ARCH) - ], - [ - dnl Take something from the environment variables, if it is there - if test "x$PETSC_ARCH" != "x" ; then - DEAL_II_PETSC_ARCH="$PETSC_ARCH" - AC_MSG_RESULT($DEAL_II_PETSC_ARCH) - else - AC_MSG_ERROR([If PETSc is used, you must specify the architecture - either through the PETSC_ARCH environment variable, - or through the --with-petsc-arch flag]) - fi - ]) - + [DEAL_II_PETSC_ARCH="$withval" + AC_MSG_RESULT($DEAL_II_PETSC_ARCH) + ], + [dnl Take something from the environment variables + if test "x$PETSC_ARCH" != "x" ; then + DEAL_II_PETSC_ARCH="$PETSC_ARCH" + AC_MSG_RESULT($DEAL_II_PETSC_ARCH) + else + AC_MSG_ERROR([If PETSc is used, you must specify the architecture either through the PETSC_ARCH environment variable, or through the --with-petsc-arch flag]) + fi + ]) if test "x$PETSC_ARCH" != "x" ; then - dnl Make sure that what was specified is actually correct. to be sure, - dnl petsc changed the locations where they store their libraries - dnl sometime in the middle... - case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 2.2*) - if test ! -d $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH \ - ; then - - dnl Check whether PETSc is installed but someone has simply - dnl forgotten to also compile for C++ - if test -d $DEAL_II_PETSC_DIR/lib/libg/$DEAL_II_PETSC_ARCH \ - -o -d $DEAL_II_PETSC_DIR/lib/libg_complex/$DEAL_II_PETSC_ARCH \ - ; then - AC_MSG_ERROR([PETSc has not been compiled for C++ with scalar type real, - but deal.II needs this for this PETSc version] $PETSC_VERSION) - else - AC_MSG_ERROR([PETSc has not been compiled for the architecture - specified with --with-petsc-arch]) - fi - fi - ;; - 2.3*) + dnl PETSc change the locations where they store their libraries + dnl from time-to-time; so make sure that what was specified is + dnl actually correct. + case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in + 2.3*) dnl if test ! -d $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH \ - ; then - AC_MSG_ERROR([PETSc has not been compiled for the architecture - specified with --with-petsc-arch]) + ; then + AC_MSG_ERROR([PETSc has not been compiled for the architecture specified with --with-petsc-arch]) fi ;; - - 3.*) + 3.0*) dnl if test ! -d $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib \ - ; then - AC_MSG_ERROR([PETSc has not been compiled for the architecture - specified with --with-petsc-arch]) + ; then + AC_MSG_ERROR([PETSc has not been compiled for the architecture specified with --with-petsc-arch]) fi ;; - - *) + *) dnl AC_MSG_ERROR([Unknown PETSc version]) ;; esac @@ -5888,8 +5852,7 @@ dnl dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_VERSION, dnl [ - AC_MSG_CHECKING(for PETSc version) - + AC_MSG_CHECKING([for PETSc version]) DEAL_II_PETSC_VERSION_MAJOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \ | grep "#define PETSC_VERSION_MAJOR" \ | perl -pi -e 's/.*MAJOR\s+//g;'` @@ -5900,39 +5863,52 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_VERSION, dnl | grep "#define PETSC_VERSION_SUBMINOR" \ | perl -pi -e 's/.*MINOR\s+//g;'` PETSC_VERSION="$DEAL_II_PETSC_VERSION_MAJOR.$DEAL_II_PETSC_VERSION_MINOR.$DEAL_II_PETSC_VERSION_SUBMINOR" - AC_MSG_RESULT($PETSC_VERSION) -]) + dnl Here is where we check if the PETSc version we have is a + dnl release but do nothing about it. + PETSC_RELEASE=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \ + | grep "#define PETSC_VERSION_RELEASE" \ + | perl -pi -e 's/.*RELEASE\s+//g;'` + if test "$PETSC_VERSION_RELEASE" = "0" ; then + PETSC_VERSION+="-dev" + else + PETSC_VERSION+="" + fi + AC_MSG_RESULT($PETSC_VERSION) +]) dnl ------------------------------------------------------------ dnl See if there is a library libmpiuni.a/so available. We need -dnl to link with it on some systems. +dnl to link with it on some systems where PETSc is built without +dnl a real MPI and we need to handle trivial (one process) MPI +dnl functionality. dnl dnl Usage: DEAL_II_CONFIGURE_PETSC_MPIUNI_LIB dnl dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_MPIUNI_LIB, dnl [ - AC_MSG_CHECKING(for PETSc libmpiuni library) - - if test -f $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH/libmpiuni.a ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH/libmpiuni.a" ; - else if test -f $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.a ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.a" ; - else if test -f $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.a ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.a" ; - else if test -f $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH/libmpiuni.so ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH/libmpiuni.so" ; - else if test -f $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.so ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.so" ; - else if test -f $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.so ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.so" ; - fi fi fi fi fi fi + AC_MSG_CHECKING([for PETSc libmpiuni library]) + case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in + 2.3*) dnl + if test -f $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.a ; then + DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.a" + fi + ;; + 3.0*) dnl + if test -f $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.a ; then + DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.a" + fi + ;; + *) dnl + AC_MSG_ERROR([Unknown PETSc version]) + ;; + esac if test "$DEAL_II_PETSC_MPIUNI_LIB" = "" ; then - AC_MSG_RESULT(not found) + AC_MSG_RESULT([not found]) else AC_MSG_RESULT($DEAL_II_PETSC_MPIUNI_LIB) fi @@ -5940,51 +5916,38 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_MPIUNI_LIB, dnl dnl ------------------------------------------------------------ -dnl Figure out PETSc was compiled with scalar-type = complex. -dnl To do this we need to scan the PETSc configuration file. +dnl Figure out PETSc was compiled with --scalar-type=complex by +dnl scanning PETSc configuration file. +dnl +dnl Warning: Up tp now, PETSc>3.0.0 is being supported and +dnl deal.II will not safely compile if this option is "yes". dnl dnl Usage: DEAL_II_CONFIGURE_PETSC_COMPLEX dnl dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_COMPLEX, dnl [ - AC_MSG_CHECKING(for PETSc scalar complex) - case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 2.*) - dnl This should never happen, so we ignore the test - DEAL_II_PETSC_COMPLEX="-1" - ;; - 3.*) + 3.0.1) + AC_MSG_CHECKING([for PETSc scalar complex]) DEAL_II_PETSC_COMPLEX=`cat $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/include/petscconf.h \ | grep "#define PETSC_USE_COMPLEX" \ | perl -pi -e 's/.*COMPLEX\s+//g;'` - ;; - *) - AC_MSG_ERROR([Unknown PETSc version]) + if test "$DEAL_II_PETSC_COMPLEX" = "1" ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + + dnl If we have previously found PETSc and here with a complex + dnl scalar type then set the DEAL_II_USE_COMPLEX macro + if test "$USE_CONTRIB_PETSC" = "yes" ; then + if test "$DEAL_II_PETSC_COMPLEX" = "1" ; then + AC_DEFINE([DEAL_II_USE_PETSC_COMPLEX], [1], + [Defined if a PETSc installation was found with complex scalar type and is going to be used]) + fi fi ;; esac - - if test "$DEAL_II_PETSC_COMPLEX" = "1" ; then - AC_MSG_RESULT(yes) - - dnl If the check for complex scalar is ignored, say so and why - else if test "$DEAL_II_PETSC_COMPLEX" = "-1" ; then - AC_MSG_RESULT(ignored test. complex not supported) - - dnl Here "not found" means not found! - else - AC_MSG_RESULT(not found) - fi fi - - dnl If we have previously found PETSc and here with a complex - dnl scalar type then set the DEAL_II_USE_COMPLEX macro - if test "$USE_CONTRIB_PETSC" = "yes" ; then - if test "$DEAL_II_PETSC_COMPLEX" = "1" ; then - AC_DEFINE(DEAL_II_USE_PETSC_COMPLEX, 1, - [Defined if a PETSc installation was found with complex - scalar type and is going to be used]) - fi fi ]) @@ -5998,62 +5961,55 @@ dnl dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl [ - dnl First check for the SLEPc directory - AC_MSG_CHECKING(for SLEPc include directory) - + AC_MSG_CHECKING([for SLEPc include directory]) AC_ARG_WITH(slepc, [AS_HELP_STRING([--with-slepc=path/to/slepc], [Specify the path to the SLEPc installation, for which the include directory is a subdir; use this if you want to override the SLEPC_DIR environment variable.])], - [ - dnl Special case when someone does --with-slepc=no - if test "x$withval" = "xno" ; then - AC_MSG_RESULT([explicitly disabled]) - USE_CONTRIB_SLEPC=no - else - USE_CONTRIB_SLEPC=yes - DEAL_II_SLEPC_DIR="$withval" - AC_MSG_RESULT($DEAL_II_SLEPC_DIR) - - dnl Make sure that what was specified is actually correct - if test ! -d $DEAL_II_SLEPC_DIR \ - -o ! -d $DEAL_II_SLEPC_DIR/include \ - ; then - AC_MSG_ERROR([Path to SLEPc specified with --with-slepc does not - point to a complete SLEPc installation]) - fi - - if test ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_PETSC_ARCH \ - -o ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_PETSC_ARCH/lib \ - ; then + [dnl Special case when someone does --with-slepc=no + if test "x$withval" = "xno" ; then + AC_MSG_RESULT([explicitly disabled]) + USE_CONTRIB_SLEPC=no + else + USE_CONTRIB_SLEPC=yes + DEAL_II_SLEPC_DIR="$withval" + AC_MSG_RESULT($DEAL_II_SLEPC_DIR) + + dnl Make sure that what was specified is actually correct + if test ! -d $DEAL_II_SLEPC_DIR \ + -o ! -d $DEAL_II_SLEPC_DIR/include \ + ; then + AC_MSG_ERROR([Path to SLEPc specified with --with-slepc does not point to a complete SLEPc installation]) + fi + + if test ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_PETSC_ARCH \ + -o ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_PETSC_ARCH/lib \ + ; then AC_MSG_ERROR([SLEPc has not been compiled for the PETSc architecture]) - fi - fi - ], - [ - dnl Take something from the environment variables, if it is there - if test "x$SLEPC_DIR" != "x" ; then - USE_CONTRIB_SLEPC=yes - DEAL_II_SLEPC_DIR="$SLEPC_DIR" - AC_MSG_RESULT($DEAL_II_SLEPC_DIR) + fi + fi + ], + [dnl Take something from the environment variables, if it is there + if test "x$SLEPC_DIR" != "x" ; then + USE_CONTRIB_SLEPC=yes + DEAL_II_SLEPC_DIR="$SLEPC_DIR" + AC_MSG_RESULT($DEAL_II_SLEPC_DIR) + + dnl Make sure that what this is actually correct + if test ! -d $DEAL_II_SLEPC_DIR \ + -o ! -d $DEAL_II_SLEPC_DIR/include \ + ; then + AC_MSG_ERROR([The path to SLEPc specified in the SLEPC_DIR environment variable does not point to a complete SLEPc installation]) + fi + else + USE_CONTRIB_SLEPC=no + DEAL_II_SLEPC_DIR="" + AC_MSG_RESULT(not found) + fi + ]) - dnl Make sure that what this is actually correct - if test ! -d $DEAL_II_SLEPC_DIR \ - -o ! -d $DEAL_II_SLEPC_DIR/include \ - ; then - AC_MSG_ERROR([The path to SLEPc specified in the SLEPC_DIR - environment variable does not point to a - complete SLEPc installation]) - fi - else - USE_CONTRIB_SLEPC=no - DEAL_II_SLEPC_DIR="" - AC_MSG_RESULT(not found) - fi - ]) if test "$USE_CONTRIB_SLEPC" = "yes" ; then - AC_DEFINE(DEAL_II_USE_SLEPC, 1, - [Defined if a SLEPc installation was found and is going - to be used]) + AC_DEFINE([DEAL_II_USE_SLEPC], [1], + [Defined if a SLEPc installation was found and is going to be used]) dnl Set an additional variable (not via AC_DEFINE, since we don't want dnl to have it in config.h) which we can use in doc/doxygen/options.dox.in. @@ -6071,8 +6027,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl dnl Finally set with_slepc if this hasn't happened yet if test "x$with_slepc" = "x" ; then with_slepc="yes" - fi - fi + fi fi ]) dnl ------------------------------------------------------------ @@ -6087,8 +6042,7 @@ dnl dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC_VERSION, dnl [ - AC_MSG_CHECKING(for SLEPc version) - + AC_MSG_CHECKING([for SLEPc version]) DEAL_II_SLEPC_VERSION_MAJOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ | grep "#define SLEPC_VERSION_MAJOR" \ | perl -pi -e 's/.*MAJOR\s+//g;'` @@ -6099,14 +6053,27 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC_VERSION, dnl | grep "#define SLEPC_VERSION_SUBMINOR" \ | perl -pi -e 's/.*MINOR\s+//g;'` SLEPC_VERSION="$DEAL_II_SLEPC_VERSION_MAJOR.$DEAL_II_SLEPC_VERSION_MINOR.$DEAL_II_SLEPC_VERSION_SUBMINOR" + + dnl Here is where we check if the SLEPc version we have is a + dnl release but do nothing about it. + SLEPC_RELEASE=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ + | grep "#define SLEPC_VERSION_RELEASE" \ + | perl -pi -e 's/.*RELEASE\s+//g;'` + if test "$SLEPC_RELEASE" = "0" ; then + SLEPC_VERSION+="-dev" + else + SLEPC_VERSION+="" + fi AC_MSG_RESULT($SLEPC_VERSION) - dnl Then check that PETSc and SLEPc versions are compatible - dnl ie. that they are equivalent. + dnl Then check that PETSc and SLEPc versions are compatible ie. that + dnl they are equivalent. Patch numbers don't count for anything, + dnl but, we do include whether PETSc and SLEPc are both release + dnl versions in the check. if test "${PETSC_VERSION}" != "${SLEPC_VERSION}" \ + -o "${PETSC_RELEASE}" != "${SLEPC_RELEASE}" \ ; then - AC_MSG_ERROR([If SLEPc is used, you must use the same version - number as your PETSc Installation]) + AC_MSG_ERROR([If SLEPc is used, you must use the same version number as your PETSc Installation]) fi ]) @@ -6139,8 +6106,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl dnl Make sure that what was specified is actually correct if test ! -d $DEAL_II_TRILINOS_DIR/include \ -o ! -d $DEAL_II_TRILINOS_DIR/lib ; then - AC_MSG_ERROR([Path to Trilinos specified with --with-trilinos does not - point to a complete Trilinos installation]) + AC_MSG_ERROR([Path to Trilinos specified with --with-trilinos does not point to a complete Trilinos installation]) fi DEAL_II_TRILINOS_INCDIR="$DEAL_II_TRILINOS_DIR/include" diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in index 0edb836b90..522981ad28 100644 --- a/deal.II/base/include/base/config.h.in +++ b/deal.II/base/include/base/config.h.in @@ -584,26 +584,32 @@ # define DEAL_VOLATILE #endif - /** - * Have macros that should make testing for PETSc versions - * much simpler. + * These macros are defined to make testing for PETSc versions within + * the deal.II main code as simple as possible. In brief they are used + * like this: (i) DEAL_II_PETSC_VERSION_LT is used to advance the + * PETScWrappers to newer versions of PETSc while preserving backward + * compatibility; and (ii) DEAL_II_PETSC_VERSION_GTE is used to add + * functionality to the PETScWrappers that does not exist in previous + * versions of PETSc. Examples of usage can be found in + * lac/source/petsc_matrix_base.h. Note: SLEPcWrappers do not need + * their own anological macros, since SLEPc and PETSc must have + * identical version numbers anyways. */ #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \ ((PETSC_VERSION_MAJOR * 10000 + \ - PETSC_VERSION_MINOR * 100) + \ - PETSC_VERSION_SUBMINOR \ + PETSC_VERSION_MINOR * 100 + \ + PETSC_VERSION_SUBMINOR) \ < \ - major*10000 + minor*100 + subminor) + (major)*10000 + (minor)*100 + (subminor)) -#define DEAL_II_PETSC_VERSION_GE(major,minor,subminor) \ +#define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \ ((PETSC_VERSION_MAJOR * 10000 + \ - PETSC_VERSION_MINOR * 100) + \ - PETSC_VERSION_SUBMINOR \ + PETSC_VERSION_MINOR * 100 + \ + PETSC_VERSION_SUBMINOR) \ >= \ (major)*10000 + (minor)*100 + (subminor)) - #include /** diff --git a/deal.II/configure.in b/deal.II/configure.in index d7f7a459ab..cee2b7f5cb 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -686,26 +686,32 @@ AH_BOTTOM( # define DEAL_VOLATILE #endif - /** - * Have macros that should make testing for PETSc versions - * much simpler. + * These macros are defined to make testing for PETSc versions within + * the deal.II main code as simple as possible. In brief they are used + * like this: (i) DEAL_II_PETSC_VERSION_LT is used to advance the + * PETScWrappers to newer versions of PETSc while preserving backward + * compatibility; and (ii) DEAL_II_PETSC_VERSION_GTE is used to add + * functionality to the PETScWrappers that does not exist in previous + * versions of PETSc. Examples of usage can be found in + * lac/source/petsc_matrix_base.h. Note: SLEPcWrappers do not need + * their own anological macros, since SLEPc and PETSc must have + * identical version numbers anyways. */ #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \ ((PETSC_VERSION_MAJOR * 10000 + \ PETSC_VERSION_MINOR * 100 + \ PETSC_VERSION_SUBMINOR) \ < \ - major*10000 + minor*100 + subminor) + (major)*10000 + (minor)*100 + (subminor)) -#define DEAL_II_PETSC_VERSION_GE(major,minor,subminor) \ +#define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \ ((PETSC_VERSION_MAJOR * 10000 + \ PETSC_VERSION_MINOR * 100 + \ PETSC_VERSION_SUBMINOR) \ >= \ (major)*10000 + (minor)*100 + (subminor)) - #include /**