Performance optimization of tensor contraction expressions for many-body methods in quantum chemistry.

The Ohio State University, Columbus, Ohio, USA.
The Journal of Physical Chemistry A (Impact Factor: 2.77). 11/2009; 113(45):12715-23. DOI: 10.1021/jp9051215
Source: PubMed

ABSTRACT Complex tensor contraction expressions arise in accurate electronic structure models in quantum chemistry, such as the coupled cluster method. This paper addresses two complementary aspects of performance optimization of such tensor contraction expressions. Transformations using algebraic properties of commutativity and associativity can be used to significantly decrease the number of arithmetic operations required for evaluation of these expressions. The identification of common subexpressions among a set of tensor contraction expressions can result in a reduction of the total number of operations required to evaluate the tensor contractions. The first part of the paper describes an effective algorithm for operation minimization with common subexpression identification and demonstrates its effectiveness on tensor contraction expressions for coupled cluster equations. The second part of the paper highlights the importance of data layout transformation in the optimization of tensor contraction computations on modern processors. A number of considerations, such as minimization of cache misses and utilization of multimedia vector instructions, are discussed. A library for efficient index permutation of multidimensional tensors is described, and experimental performance data is provided that demonstrates its effectiveness.

1 Bookmark
  • [Show abstract] [Hide abstract]
    ABSTRACT: We present a new implementation of a recent open-ended response theory formulation for time- and perturbation-dependent basis sets (Thorvaldsen et al., J. Chem. Phys. 2008, 129, 214108) at the Hartree-Fock and density functional levels of theory. A novel feature of the new implementation is the use of recursive programming techniques, making it possible to write highly compact code for the analytic calculation of any response property at any valid choice of rule for the order of perturbation at which to include perturbed density matrices. The formalism is expressed in terms of the density matrix in the atomic orbital basis, allowing the recursive scheme presented here to be used in linear-scaling formulations of response theory as well as with two- and four-component relativistic wave functions. To demonstrate the new code, we present calculations of the third geometrical derivatives of the frequency-dependent second hyperpolarizability for HSOH at the Hartree-Fock level of theory, a seventh-order energy derivative involving basis sets that are both time and perturbation dependent. © 2014 Wiley Periodicals, Inc.
    Journal of Computational Chemistry 02/2014; · 3.84 Impact Factor
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: In this article we report on the coupled-cluster factorization problem. We describe the first implementation that optimizes (i) the contraction order for each term, (ii) the identification of reusable intermediates, (iii) the selection and factoring out of common factors simultaneously, considering all projection levels in a single step. The optimization is achieved by means of a genetic algorithm. Taking a one-term-at-a-time strategy as reference our factorization yields speedups of up to 4 (for intermediate excitation levels, smaller basis sets). We derive a theoretical lower bound for the highest order scaling cost and show that it is met by our implementation. Additionally, we report on the performance of the resulting highly excited coupled-cluster algorithms and find significant improvements with respect to the implementation of Kállay and Surján [J. Chem. Phys. 115, 2945 (2001)] and comparable performance with respect to MOLPRO's handwritten and dedicated open shell coupled cluster with singles and doubles substitutions implementation [P. J. Knowles, C. Hampel, and H.-J. Werner, J. Chem. Phys. 99, 5219 (1993)].
    The Journal of Chemical Physics 03/2011; 134(12):124106. · 3.12 Impact Factor
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: Empirical optimizers like ATLAS have been very effective in optimizing computational kernels in libraries. The best choice of parameters such as tile size and degree of loop unrolling is determined by executing different versions of the computation. In contrast, optimizing compilers use a model-driven approach to program transformation. While the model-driven approach of optimizing compilers is generally orders of magnitude faster than ATLAS-like library generators, its effectiveness can be limited by the accuracy of the performance models used. In this paper, we describe an approach where a class of computations is modeled in terms of constituent operations that are empirically measured, thereby allowing modeling of the overall execution time. The performance model with empirically determined cost components is used to perform data layout optimization together with the selection of library calls and layout transformations in the context of the Tensor Contraction Engine, a compiler for a high-level domain-specific language for expressing computational models in quantum chemistry. The effectiveness of the approach is demonstrated through experimental measurements on representative computations from quantum chemistry.
    J. Parallel Distrib. Comput. 01/2012; 72:338-352.

Full-text (2 Sources)

Available from
Jun 5, 2014