From: Toby D. Young Date: Mon, 22 Jun 2009 05:18:47 +0000 (+0000) Subject: Redirection of the slepc-arch detection in the deal.II configure system: slepc-arch... X-Git-Tag: v8.0.0~7607 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd3767311701acb32fd038e6260552688baa7f39;p=dealii.git Redirection of the slepc-arch detection in the deal.II configure system: slepc-arch is now directly compared to the petsc-arch, ie. the user need not specify the arch of the former. git-svn-id: https://svn.dealii.org/trunk@18943 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 701baaae19..703af12725 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -497,7 +497,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl First the flags for gcc compilers if test "$GXX" = yes ; then CXXFLAGSO="$CXXFLAGS -O2 -Wuninitialized -felide-constructors -ftemplate-depth-128" - CXXFLAGSG="$CXXFLAGS -DDEBUG -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Woverloaded-virtual -Wsign-compare -Wswitch -ftemplate-depth-128" + CXXFLAGSG="$CXXFLAGS -DDEBUG -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Woverloaded-virtual -Wsynth -Wsign-compare -Wswitch -ftemplate-depth-128" dnl BOOST uses long long, so don't warn about this CXXFLAGSG="$CXXFLAGSG -Wno-long-long" @@ -4327,6 +4327,50 @@ AC_DEFUN(DEAL_II_CHECK_TYPE_QUALIFIER_BUG, dnl +dnl ------------------------------------------------------------- +dnl In the gcc libstdc++ headers for std::complex, there is +dnl no defined default copy constructor, but a templated copy +dnl constructor. So when using using a normal assignment +dnl between identical types, the compiler synthesizes the +dnl default operator, rather than using the template. +dnl The code will still be ok, though. +dnl +dnl With -Wsynth in gcc we then get a warning. So if we find that +dnl this is still the case, disable -Wsynth, i.e. remove it from +dnl the list of warning flags. +dnl +dnl This is gcc bug 18644: +dnl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18644 +dnl +dnl Usage: DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX +dnl +dnl ------------------------------------------------------------- +AC_DEFUN(DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX, dnl +[ + if test "x$GXX" = "xyes" ; then + AC_MSG_CHECKING(for problem with -Wsynth and std::complex) + AC_LANG(C++) + CXXFLAGS="-Wsynth -Werror" + AC_TRY_COMPILE( + [ +# include + ], + [ + std::complex x; + x = std::complex(1,0); + ], + [ + AC_MSG_RESULT(no) + ], + [ + AC_MSG_RESULT(yes) + CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-Wsynth\s*//g;'`" + ]) + fi +]) + + + dnl ------------------------------------------------------------- dnl Older gcc version appear to frown upon the way we write the dnl IsBlockMatrix template. If that's the case, @@ -4400,8 +4444,52 @@ AC_DEFUN(DEAL_II_CHECK_BOOST, dnl [AC_MSG_ERROR([Your boost installation is incomplete!])]) AC_CHECK_HEADER(boost/tuple/tuple.hpp,, [AC_MSG_ERROR([Your boost installation is incomplete!])]) + DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT ]) +dnl ------------------------------------------------------------- +dnl The boost::shared_ptr class has a templated assignment operator +dnl but no assignment operator matching the default operator +dnl signature (this if for boost 1.29 at least). So when using +dnl using a normal assignment between identical types, the +dnl compiler synthesizes teh default operator, rather than using +dnl the template. It doesn't matter here, but is probably an +dnl oversight on behalf of the operators. It should be fixed in newer +dnl versions of boost. +dnl +dnl With -Wsynth in gcc we then get a warning. So if we find that +dnl this is still the case, disable -Wsynth, i.e. remove it from +dnl the list of warning flags. +dnl +dnl Usage: DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT +dnl +dnl ------------------------------------------------------------- +AC_DEFUN(DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT, dnl +[ + if test "x$GXX" = "xyes" ; then + AC_MSG_CHECKING(for boost::shared_ptr assignment operator= template buglet) + AC_LANG(C++) + CXXFLAGS="-Wsynth -Werror" + AC_TRY_COMPILE( + [ +# include + ], + [ + boost::shared_ptr a,b; + a = b; + ], + [ + AC_MSG_RESULT(no) + ], + [ + AC_MSG_RESULT(yes) + CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-Wsynth\s*//g;'`" + ]) + fi +]) + + + dnl ------------------------------------------------------------- dnl Some versions of icc on some platforms issue a lot of warnings dnl about the unreliability of floating point comparisons. Check @@ -5688,6 +5776,12 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl 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 ], [ @@ -5727,7 +5821,6 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl dnl If we have found SLEPc, determine additional pieces of data if test "$USE_CONTRIB_SLEPC" = "yes" \ ; then - DEAL_II_CONFIGURE_SLEPC_ARCH DEAL_II_CONFIGURE_SLEPC_VERSION dnl Finally set with_slepc if this hasn't happened yet @@ -5737,64 +5830,6 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl fi ]) - - -dnl ------------------------------------------------------------ -dnl Figure out the architecture used for SLEPc and if the -dnl library directory exists, since that determines where object -dnl and configuration files will be found. -dnl -dnl Usage: DEAL_II_CONFIGURE_SLEPC_ARCH -dnl -dnl ------------------------------------------------------------ -AC_DEFUN(DEAL_II_CONFIGURE_SLEPC_ARCH, dnl -[ - AC_MSG_CHECKING(for SLEPc library architecture) - - AC_ARG_WITH(slepc-arch, - [ --with-slepc-arch=architecture - Specify the architecture for your SLEPc installation; - use this if you want to override the SLEPC_ARCH - environment variable.], - [ - DEAL_II_SLEPC_ARCH="$withval" - AC_MSG_RESULT($DEAL_II_SLEPC_ARCH) - ], - [ - dnl Take something from the environment variables, if it is there - if test "x$SLEPC_ARCH" != "x" ; then - DEAL_II_SLEPC_ARCH="$SLEPC_ARCH" - AC_MSG_RESULT($DEAL_II_SLEPC_ARCH) - else - AC_MSG_ERROR([If SLEPc is used, you must specify the architecture - either through the SLEPC_ARCH environment variable, - or through the --with-slepc-arch flag]) - fi - ]) - - if test "x$SLEPC_ARCH" != "x" ; then - dnl Make sure that what was specified is actually correct. - if test ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_SLEPC_ARCH \ - -o ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_SLEPC_ARCH/lib \ - ; then - AC_MSG_ERROR([SLEPc has not been compiled for the architecture - specified with --with-slepc-arch]) - fi - fi - - dnl Then check that PETSc and SLEPc architectures are compatible - dnl ie. that they are the same. - if test "$DEAL_II_SLEPC_ARCH" != "$DEAL_II_PETSC_ARCH" \ - ; then - AC_MSG_ERROR([If SLEPc is used, you must specify the same - architecture as your PETSc Installation either - through the SLEPC_ARCH environment variable, - or through the --with-slepc-arch flag]) - fi -]) - - - dnl ------------------------------------------------------------ dnl Figure out the version numbers of SLEPc and compare with dnl version numbers of PETSc. This is not strictly necessary diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 9ad8dc73b1..c7a277526a 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -55,7 +55,6 @@ DEAL_II_PETSC_MPIUNI_LIB = @DEAL_II_PETSC_MPIUNI_LIB@ USE_CONTRIB_SLEPC = @USE_CONTRIB_SLEPC@ DEAL_II_SLEPC_DIR = @DEAL_II_SLEPC_DIR@ -DEAL_II_SLEPC_ARCH = @DEAL_II_SLEPC_ARCH@ DEAL_II_SLEPC_VERSION_MAJOR = @DEAL_II_SLEPC_VERSION_MAJOR@ DEAL_II_SLEPC_VERSION_MINOR = @DEAL_II_SLEPC_VERSION_MINOR@ DEAL_II_SLEPC_VERSION_SUBMINOR = @DEAL_II_SLEPC_VERSION_SUBMINOR@ @@ -169,7 +168,7 @@ ifeq ($(USE_CONTRIB_PETSC),yes) endif ifeq ($(USE_CONTRIB_SLEPC),yes) - lib-contrib-slepc = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_SLEPC_ARCH)/lib/libslepc$(lib-suffix) + lib-contrib-slepc = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libslepc$(lib-suffix) endif # same for metis, except that there is only one library in that case @@ -263,7 +262,7 @@ else include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/include endif include-path-slepc = $(DEAL_II_SLEPC_DIR)/include -include-path-slepc-conf = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_SLEPC_ARCH)/conf +include-path-slepc-conf = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/conf include-path-trilinos = $(DEAL_II_TRILINOS_INCDIR) include-path-metis = $(DEAL_II_METIS_INCDIR) diff --git a/deal.II/configure.in b/deal.II/configure.in index e9a27260a8..499fabb33b 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -189,6 +189,7 @@ DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG DEAL_II_CHECK_TYPE_QUALIFIER_BUG +DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX DEAL_II_CHECK_CTOR_DTOR_PRIVACY DEAL_II_HAVE_PRETTY_FUNCTION DEAL_II_HAVE_STD_ITERATOR @@ -397,7 +398,6 @@ AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_PETSC) DEAL_II_CONFIGURE_SLEPC AC_SUBST(USE_CONTRIB_SLEPC) AC_SUBST(DEAL_II_SLEPC_DIR) -AC_SUBST(DEAL_II_SLEPC_ARCH) AC_SUBST(DEAL_II_SLEPC_VERSION_MAJOR) AC_SUBST(DEAL_II_SLEPC_VERSION_MINOR) AC_SUBST(DEAL_II_SLEPC_VERSION_SUBMINOR)