From ce9e2c2894002e3f409918f808091f28739892c1 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 1 Feb 2015 07:19:40 -0500 Subject: [PATCH] Removed references to autoconf. Also updated documentation about UMFPACK, as it is now built unless explicitly disabled. --- contrib/utilities/lapack_templates.h.in | 136 ---------------- contrib/utilities/lapack_templates.pl | 153 ------------------ .../lapack_templates_custom_target.cmake | 27 ---- examples/step-22/doc/intro.dox | 7 +- examples/step-29/step-29.cc | 7 +- include/deal.II/base/vectorization.h | 5 +- include/deal.II/lac/full_matrix.templates.h | 10 +- include/deal.II/lac/lapack_full_matrix.h | 12 +- include/deal.II/lac/solver_control.h | 5 +- include/deal.II/lac/sparse_direct.h | 10 +- source/base/function_lib.cc | 8 +- source/base/timer.cc | 3 - tests/benchmarks/benchrev.sh | 1 - 13 files changed, 29 insertions(+), 355 deletions(-) delete mode 100644 contrib/utilities/lapack_templates.h.in delete mode 100644 contrib/utilities/lapack_templates.pl delete mode 100644 contrib/utilities/lapack_templates_custom_target.cmake diff --git a/contrib/utilities/lapack_templates.h.in b/contrib/utilities/lapack_templates.h.in deleted file mode 100644 index 7eb37440cc..0000000000 --- a/contrib/utilities/lapack_templates.h.in +++ /dev/null @@ -1,136 +0,0 @@ -// vector update of the form y += alpha*x with a scalar, x,y vectors -void daxpy_ (const int* n, const double* alpha, const double* x, - const int* incx, double* y, const int* incy); - -// General Matrix -// Matrix vector product -void dgemv_ (const char* trans, const int* m, const int* n, - const double* alpha, const double* A, const int* lda, - const double* x, const int* incx, - const double* b, double* y, const int* incy); - -// Matrix matrix product -void dgemm_ (const char* transa, const char* transb, - const int* m, const int* n, const int* k, - const double* alpha, const double* A, const int* lda, - const double* B, const int* ldb, - const double* beta, double* C, const int* ldc); - -// Compute LU factorization -void dgetrf_ (const int* m, const int* n, double* A, - const int* lda, int* ipiv, int* info); -// Apply forward/backward substitution to LU factorization -void dgetrs_ (const char* trans, const int* n, const int* nrhs, - const double* A, const int* lda, const int* ipiv, - double* b, const int* ldb, int* info); -// Invert matrix from LU factorization -void dgetri_ (const int* n, double* A, const int* lda, - int* ipiv, double* inv_work, const int* lwork, int* info); - -// Compute QR factorization (Householder) -void dgeqrf_ (const int* m, const int* n, double* A, - const int* lda, double* tau, double* work, - const int* lwork, int* info); -// Compute vector Q^T B, where Q is the result from dgeqrf_ -void dormqr_ (const char* side, const char* trans, const int* m, - const int* n, const int* k, const double* A, const int* lda, - const double* tau, double* B, const int* ldb, - double* work, const int* lwork, int* info); -// Compute matrix Q from the result of dgeqrf_ -void dorgqr_ (const int* m, const int* n, const int* k, const double* A, - const int* lda, const double* tau, double* work, const int* lwork, - int* info); -// Compute Rx = b -void dtrtrs_ (const char* uplo, const char* trans, - const char* diag, const int* n, const int* n_rhs, - const double* A, const int* lda, double* B, const int* ldb, - int* info); - -// Compute eigenvalues and vectors -void dgeev_ (const char* jobvl, const char* jobvr, - const int* n, double* A, const int* lda, - double* lambda_re, double* lambda_im, - double* vl, const int* ldvl, - double* vr, const int* ldva, - double* work, const int* lwork, - int* info); -// Compute eigenvalues and vectors (expert) -void dgeevx_ (const char* balanc, const char* jobvl, const char* jobvr, - const char* sense, - const int* n, double* A, const int* lda, - double* lambda_re, double* lambda_im, - double* vl, const int* ldvl, - double* vr, const int* ldvr, - int* ilo, int* ihi, - double* scale, double* abnrm, - double* rconde, double* rcondv, - double* work, const int* lwork, - int* iwork, int* info); -// Eigenvalues for a symmetric matrix -void dsyev_ (const char *jobz, const char *uplo, const int *n, - double *A, const int *lda, double *w, - double *work, const int *lwork, int *info); -// Same functionality as dsyev_ but with more options: E.g. -// Compute only eigenvalues in a specific interval, -// Compute only eigenvalues with a specific index, -// Set tolerance for eigenvalue computation -void dsyevx_ (const char* jobz, const char* range, - const char* uplo, const int* n, double* A, const int* lda, - const double* vl, const double* vu, - const int* il, const int* iu, const double* abstol, - int* m, double* w, double* z, - const int* ldz, double* work, const int* lwork, int* iwork, - int* ifail, int* info); -// Generalized eigenvalues and eigenvectors of -// 1: A*x = lambda*B*x; 2: A*B*x = lambda*x; 3: B*A*x = lambda*x -// A and B are symmetric and B is definite -void dsygv_ (const int* itype, const char* jobz, const char* uplo, - const int* n, double* A, const int* lda, double* B, - const int* ldb, double* w, double* work, - const int* lwork, int* info); -// Same functionality as dsygv_ but with more options: E.g. -// Compute only eigenvalues in a specific interval, -// Compute only eigenvalues with a specific index, -// Set tolerance for eigenvalue computation -void dsygvx_ (const int* itype, const char* jobz, const char* range, - const char* uplo, const int* n, double* A, const int* lda, - double* B, const int* ldb, const double* vl, const double* vu, - const int* il, const int* iu, const double* abstol, - int* m, double* w, double* z, - const int* ldz, double* work, const int* lwork, int* iwork, - int* ifail, int* info); - -// Compute singular value decomposition using divide and conquer -void dgesdd_ (const char* jobz, - const int* m, const int* n, double* A, const int* lda, - double* s, - double* u, const int* ldu, - double* vt, const int* ldvt, - double* work, const int* lwork, - int* iwork, - int* info); - -// Compute singular value decomposition -void dgesvd_ (int* jobu, int* jobvt, - const int* n, const int* m, double* A, const int* lda, - double* s, - double* u, const int* ldu, - double* vt, const int* ldvt, - double* work, const int* lwork, - int* info); - -// Solve a least squares problem using SVD -void dgelsd_ (const int* m, const int* n, const int* nrhs, - const double* A, const int* lda, - double* B, const int* ldb, - double* s, const double* rcond, - int* rank, - double* work, const int* lwork, int* iwork, - int* info); - -// Symmetric tridiagonal matrix -void dstev_ (const char* jobz, const int* n, - double* d, double* e, double* z, - const int* ldz, double* work, - int* info); - diff --git a/contrib/utilities/lapack_templates.pl b/contrib/utilities/lapack_templates.pl deleted file mode 100644 index d19f1f8abc..0000000000 --- a/contrib/utilities/lapack_templates.pl +++ /dev/null @@ -1,153 +0,0 @@ -## --------------------------------------------------------------------- -## -## Copyright (C) 2005 - 2013 by the deal.II authors -## -## This file is part of the deal.II library. -## -## The deal.II library is free software; you can use it, redistribute -## it, and/or modify it under the terms of the GNU Lesser General -## Public License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## The full text of the license can be found in the file LICENSE at -## the top level of the deal.II distribution. -## -## --------------------------------------------------------------------- - -# -# This perl script translates lapack_templates.h.in to lapack_templates.h -# -# In the *.in file, every BLAS/LAPACK function which is defined for -# double precision, i.e. having a name like 'dfoo_', is expanded to -# itself plus the same function for single precision, namely -# 'sfoo_'. Additionally, a C++ function 'foo' without the prefix -# letter and the trailing underscore is generated, such that the -# fortran functions can easily be called from templates. The -# implementation of this function is modified due to the configure -# variables 'HAVE_DFOO_' and 'HAVE_DFOO_': if these are set, then the -# lapack functions 'dfoo_' and 'sfoo_' will be called, if not, an -# exception will be thrown. -# -# Therefore, in order to be able to call a LAPACK function, the -# functions have to be tested by configure. Search for the section -# "Check for LAPACK..." in deal.II/configure.in and add the functions -# 'dfoo_' and 'sfoo_' to the tests at the end of that section. -# - - -my $templates; -my $double; - - -print << 'EOT' -// --------------------------------------------------------------------- -// -// Copyright (C) 2005 - 2013 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE at -// the top level of the deal.II distribution. -// -// --------------------------------------------------------------------- - -#ifndef __LAPACK_TEMPLATES_H -#define __LAPACK_TEMPLATES_H - -#include -#include - -extern "C" -{ -EOT - ; - -while(<>) -{ - # Write comment lines literally - if (m'^\s*//') - { - print; - next; - } - # Lines of the form 'typename functionname (...' - # where functionname is of the form d..._, - # that is a double precision LAPACK function - if (m'\s*(\w+)\s+d(\w+)_\s*\(') - { - $double = $_; - my $type = $1; - my $name = $2; - my $capname = $name; - $capname =~ tr/[a-z]/[A-Z]/; - while (<>) - { - $double .= $_; - last if (m';'); - } - my $single = $double; - $single =~ s/d$name/s$name/; - $single =~ s/double/float/g; - print $double,$single; - - $double =~ m/\(([^\)]*)/; - my $args = $1; - # The arglist for the C++ function - $args =~ s/\s+/ /g; - # The arglist handed down to the FORTRAN function - $args2 = $args; - # Fortunately, all arguments are pointers, so we can use the * - # to separate data type and argument name - $args2 =~ s/\w+\*//g; - $args2 =~ s/const//g; - $args2 =~ s/\s//g; - # The arglist of the empty C++ function - $args0 = $args; - $args0 =~ s/\*[^,]*,/\*,/g; - $args0 =~ s/\*[^,]*$/\*/g; - - # First, do the general template None of these functions is - # implemented, but they allow us to link for instance with - # long double lapack support - my $numbers = 1; - my $argst = $args0; - my $typet = $type; - while ($argst =~ s/double/number$numbers/) - { - $numbers++; - } - $typet =~ s/double/number1/g; - - $templates .= "\n\n/// Template wrapper for LAPACK functions d$name and s$name\n"; - $templates .= "template ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/lapack_templates.h - ) - -ADD_CUSTOM_TARGET(lapack_templates ALL - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/lapack_templates.h - ) diff --git a/examples/step-22/doc/intro.dox b/examples/step-22/doc/intro.dox index 73030c4dc9..e7cf3a57ed 100644 --- a/examples/step-22/doc/intro.dox +++ b/examples/step-22/doc/intro.dox @@ -505,10 +505,9 @@ matrix. So here's what we're going to do: if in 2d, we use the ultimate preconditioner, namely a direct sparse LU decomposition of the matrix. This is implemented using the SparseDirectUMFPACK class that uses the UMFPACK direct solver to compute the decomposition. To -use it, you will have to specify the --with-umfpack -switch when configuring the deal.II library, see the ReadMe file for -instructions. With this, the inner solver converges in one iteration. +use it, you will have to build deal.II with UMFPACK support (which is the +default); see the ReadMe file +for instructions. With this, the inner solver converges in one iteration. In 2d, we can do this sort of thing because even reasonably large problems rarely have more than a few 100,000 unknowns with relatively few nonzero diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index beabda99fc..f2af6693df 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -59,8 +59,7 @@ // provided by UMFPACK (see the SparseDirectUMFPACK class), for which the // following header file is needed. Note that in order to compile this // tutorial program, the deal.II-library needs to be built with UMFPACK -// support, which can be most easily achieved by giving the -// --with-umfpack switch when configuring the library: +// support, which is enabled by default: #include // The FESystem class allows us to stack several FE-objects to one compound, @@ -810,9 +809,7 @@ namespace Step29 // solve our linear system with just 3 lines of code. // Note again that for compiling this example program, you need to have the - // deal.II library built with UMFPACK support, which can be achieved by - // providing the --with-umfpack switch to the configure script - // prior to compilation of the library. + // deal.II library built with UMFPACK support. template void UltrasoundProblem::solve () { diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index f73d54f089..ae337415bf 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -34,8 +34,9 @@ // #else // #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0 // #endif -// In addition to checking the flags __AVX__ and __SSE2__, a configure test -// ensures that these feature are not only present but also working properly. +// In addition to checking the flags __AVX__ and __SSE2__, a CMake test, +// 'check_01_cpu_features.cmake', ensures that these feature are not only +// present but also working properly. #if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 // AVX, AVX-512 #include diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index a5683e4aed..2d4c88dde5 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -554,7 +554,7 @@ void FullMatrix::mmult (FullMatrix &dst, types_are_equal::value) if (this->n()*this->m()*src.n() > 300) { - // In case we have the BLAS function gemm detected at configure, we + // In case we have the BLAS function gemm detected by CMake, we // use that algorithm for matrix-matrix multiplication since it // provides better performance than the deal.II native function (it // uses cache and register blocking in order to access local data). @@ -624,7 +624,7 @@ void FullMatrix::Tmmult (FullMatrix &dst, types_are_equal::value) if (this->n()*this->m()*src.n() > 300) { - // In case we have the BLAS function gemm detected at configure, we + // In case we have the BLAS function gemm detected by CMake, we // use that algorithm for matrix-matrix multiplication since it // provides better performance than the deal.II native function (it // uses cache and register blocking in order to access local data). @@ -714,7 +714,7 @@ void FullMatrix::mTmult (FullMatrix &dst, types_are_equal::value) if (this->n()*this->m()*src.m() > 300) { - // In case we have the BLAS function gemm detected at configure, we + // In case we have the BLAS function gemm detected by CMake, we // use that algorithm for matrix-matrix multiplication since it // provides better performance than the deal.II native function (it // uses cache and register blocking in order to access local data). @@ -802,7 +802,7 @@ void FullMatrix::TmTmult (FullMatrix &dst, types_are_equal::value) if (this->n()*this->m()*src.m() > 300) { - // In case we have the BLAS function gemm detected at configure, we + // In case we have the BLAS function gemm detected by CMake, we // use that algorithm for matrix-matrix multiplication since it // provides better performance than the deal.II native function (it // uses cache and register blocking in order to access local data). @@ -1720,7 +1720,7 @@ FullMatrix::gauss_jordan () if (this->n_cols() > 15) { // In case we have the LAPACK functions - // getrf and getri detected at configure, + // getrf and getri detected by CMake, // we use these algorithms for inversion // since they provide better performance // than the deal.II native functions. diff --git a/include/deal.II/lac/lapack_full_matrix.h b/include/deal.II/lac/lapack_full_matrix.h index fea33a56f7..5ec1306431 100644 --- a/include/deal.II/lac/lapack_full_matrix.h +++ b/include/deal.II/lac/lapack_full_matrix.h @@ -431,8 +431,8 @@ public: * eigenvalues and the corresponding eigenvectors will be stored in the * columns of eigenvectors, whose dimension is set accordingly. * - * @note Calls the LAPACK function Xsyevx. For this to work, ./configure has - * to be told to use LAPACK. + * @note Calls the LAPACK function Xsyevx. For this to work, deal.II must + * be configured to use LAPACK. */ void compute_eigenvalues_symmetric (const number lower_bound, const number upper_bound, @@ -458,8 +458,8 @@ public: * eigenvalues and the corresponding eigenvectors will be stored in * eigenvectors, whose dimension is set accordingly. * - * @note Calls the LAPACK function Xsygvx. For this to work, ./configure has - * to be told to use LAPACK. + * @note Calls the LAPACK function Xsygvx. For this to work, deal.II must + * be configured to use LAPACK. */ void compute_generalized_eigenvalues_symmetric (LAPACKFullMatrix &B, const number lower_bound, @@ -482,8 +482,8 @@ public: * be retrieved using the eigenvalue() function. The number of computed * eigenvectors is equal to eigenvectors.size() * - * @note Calls the LAPACK function Xsygv. For this to work, ./configure has - * to be told to use LAPACK. + * @note Calls the LAPACK function Xsygv. For this to work, deal.II must + * be configured to use LAPACK. */ void compute_generalized_eigenvalues_symmetric (LAPACKFullMatrix &B, std::vector > &eigenvectors, diff --git a/include/deal.II/lac/solver_control.h b/include/deal.II/lac/solver_control.h index f8d6c58bcb..100e697247 100644 --- a/include/deal.II/lac/solver_control.h +++ b/include/deal.II/lac/solver_control.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -178,7 +178,8 @@ public: * The iteration is also aborted if the residual becomes a denormalized * value (@p NaN). Note, however, that this check is only performed if the * @p isnan function is provided by the operating system, which is not - * always true. The @p configure scripts checks for this and sets the flag + * always true. CMake checks this with the 'check_01_cxx_features.cmake' + * test and sets the flag * @p DEAL_II_HAVE_ISNAN in the include file deal.II/base/config.h * if this function was found. * diff --git a/include/deal.II/lac/sparse_direct.h b/include/deal.II/lac/sparse_direct.h index 30541d8fc2..f0126fec85 100644 --- a/include/deal.II/lac/sparse_direct.h +++ b/include/deal.II/lac/sparse_direct.h @@ -50,13 +50,9 @@ DEAL_II_NAMESPACE_OPEN * class provides an older interface, consisting of the functions factorize() * and solve(). Both interfaces are interchangeable. * - * @note This class only exists if support for UMFPACK was - * enabled during configure and if the UMFPACK library - * was configured. The steps to do this are explained in the deal.II ReadMe - * file. If you do nothing at the time you configure deal.II, then this class - * will simply not work. + * @note This class exists if the UMFPACK + * interface was not explicitly disabled during configuration. * * @note UMFPACK has its own license, independent of that of deal.II. If you * want to use the UMFPACK you have to accept that license. It is linked to diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 71b5e99e58..ad798b65bd 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2180,7 +2180,7 @@ namespace Functions #ifdef DEAL_II_HAVE_JN return jn(order, r*wave_number); #else - Assert(false, ExcMessage("Bessel function jn was not found by configure")); + Assert(false, ExcMessage("The Bessel function jn was not found by CMake.")); return r; #endif } @@ -2201,7 +2201,7 @@ namespace Functions const double r = points[k].distance(center); values[k] = jn(order, r*wave_number); #else - Assert(false, ExcMessage("Bessel function jn was not found by configure")); + Assert(false, ExcMessage("The Bessel function jn was not found by CMake.")); #endif } } @@ -2226,7 +2226,7 @@ namespace Functions result[1] = wave_number * si * dJn; return result; #else - Assert(false, ExcMessage("Bessel function jn was not found by configure")); + Assert(false, ExcMessage("The Bessel function jn was not found by CMake.")); return Tensor<1,dim>(); #endif } @@ -2255,7 +2255,7 @@ namespace Functions : (.5*(jn(order-1, wave_number*r) -jn(order+1, wave_number*r))); #else const double dJn = 0.; - Assert(false, ExcMessage("Bessel function jn was not found by configure")); + Assert(false, ExcMessage("The Bessel function jn was not found by CMake.")); #endif Tensor<1,dim> &result = gradients[k]; result[0] = wave_number * co * dJn; diff --git a/source/base/timer.cc b/source/base/timer.cc index 911358bc52..821e130b4a 100644 --- a/source/base/timer.cc +++ b/source/base/timer.cc @@ -22,9 +22,6 @@ #include #include -// these includes should probably be properly -// ./configure'd using the AC_HEADER_TIME macro: - #if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H) # include # include diff --git a/tests/benchmarks/benchrev.sh b/tests/benchmarks/benchrev.sh index b3666444dd..45a963e596 100755 --- a/tests/benchmarks/benchrev.sh +++ b/tests/benchmarks/benchrev.sh @@ -12,7 +12,6 @@ echo "testing $PREVREVISION" echo "configure" cd build cmake ../deal.II || exit 2 - #./configure --disable-threads --with-petsc=no || exit 2 echo "compiling" $MAKECMD || exit 3 -- 2.39.5