skip to main content

Algorithm 978: Safe Scaling in the Level 1 BLAS

Published:24 July 2017Publication History
Skip Abstract Section

Abstract

The square root of a sum of squares is well known to be prone to overflow and underflow. Ad hoc scaling of intermediate results, as has been done in numerical software such as the BLAS and LAPACK, mostly avoids the problem, but it can still occur at extreme values in the range of representable numbers. More careful scaling, as has been implemented in recent versions of the standard algorithms, may come at the expense of performance or clarity. This work reimplements the vector 2-norm and the generation of Givens rotations from the Level 1 BLAS to improve their performance and design. In addition, support for negative increments is extended to the Level 1 BLAS operations on a single vector, and a comprehensive test suite for all the Level 1 BLAS is included.

Skip Supplemental Material Section

Supplemental Material

References

  1. E. Anderson. 2002. LAPACK3E—A Fortran 90-enhanced Version of LAPACK. UT-CS-02--497 (LAPACK Working Note 158). University of Tennessee, Knoxville.Google ScholarGoogle Scholar
  2. E. Anderson and M. Fahey. 1997. Performance Improvements to LAPACK for the Cray Scientific Library. UT-CS-97-359 (LAPACK Working Note 126). University of Tennessee, Knoxville.Google ScholarGoogle Scholar
  3. E. Anderson, Z. Bai, C. Bischof, S. Blackford, J. Demmel, J. Dongarra, J. Du Croz, A. Greenbaum, S. Hammarling, A. McKenney, and D. Sorensen. 1999. LAPACK Users’ Guide (3rd ed.). SIAM, Philadelphia. Google ScholarGoogle ScholarCross RefCross Ref
  4. D. Bindel, J. Demmel, W. Kahan, and O. Marques. 2002, On computing givens rotations reliably and efficiently, ACM Trans. Math. Softw. 28, 2 (Jun. 2002), 206--238. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. S. Blackford, J. Demmel, J. Dongarra, I. Duff, S. Hammarling, G. Henry, M. Heroux, L. Kaufman, A. Lumsdaine, A. Petitet, R. Pozo, K. Remington, and R. C. Whaley. 2002. An updated set of basic linear algebra subprograms (BLAS). ACM Trans. Math. Softw. 28, 2 (Jun. 2002), 135--151. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. L. Blue. 1978. A portable fortran program to find the euclidean norm of a vector. ACM Trans. Math. Softw. 4, 1 (Mar. 1978), 15--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. W. J. Cody. 1988. MACHAR: A subroutine to dynamically determine machine parameters. ACM Trans. Math. Softw. 14, 4 (Dec. 1988), 303--311. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cray Research Inc. 1993. Scientific Libraries Reference Manual. SR-2081 8.0.Google ScholarGoogle Scholar
  9. J. Demmel. 1997. Applied Numerical Linear Algebra. SIAM, Philadelphia. Google ScholarGoogle ScholarCross RefCross Ref
  10. J. Demmel. 2002. Software for Accurate and Efficient Givens Rotations. Retrieved from http://www.cs.berkeley.edu/∼demmel/Givens.Google ScholarGoogle Scholar
  11. J. J. Dongarra. 1980. Fortran BLAS Timing. ANL-80-24 (LINPACK Working Note #3). Argonne National Laboratory, Argonne, IL. Google ScholarGoogle ScholarCross RefCross Ref
  12. J. J. Dongarra, J. R. Bunch, C. B. Moler, and G. W. Stewart. 1979. LINPACK Users’ Guide. SIAM, Philadelphia. Google ScholarGoogle ScholarCross RefCross Ref
  13. J. J. Dongarra, J. Du Croz, S. Hammarling, and I. Duff. 1990. A set of level 3 basic linear algebra subprograms. ACM Trans. Math. Softw. 16, 1 (Mar. 1990), 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. J. Dongarra, J. Du Croz, S. Hammarling, and R. J. Hanson. 1988. An extended set of fortran basic linear algebra subprograms. ACM Trans. Math. Softw. 14, 1 (Mar. 1988), 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. J. Dongarra and E. Grosse. 1987. Distribution of mathematical software via electronic mail. Commun. ACM 30, 403--407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. A. Fox, A. D. Hall, and N. L. Schryer. 1978. Algorithm 528: Framework for a portable library. ACM Trans. Math. Softw. 4, 2 (Jun. 1978), 177--188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. J. Hanson and T. Hopkins. 2004. Algorithm 830: Another visit with standard and modified givens transformations and a remark on algorithm 539. ACM Trans. Math. Softw. 30, 1 (Mar. 2004), 86--94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. J. Higham. 1996. Accuracy and Stability of Numerical Algorithms. SIAM, Philadelphia.Google ScholarGoogle Scholar
  19. T. Hopkins. 1997. Restructuring the BLAS level 1 routine for computing the modified givens transformation. ACM SIGNUM Newslett. 32, 4 (Oct. 1997), 2--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. IBM. 2012. IBM Engineering and Scientific Subroutine Library (ESSL) Guide and Reference, Version 5.1 Release 1.Google ScholarGoogle Scholar
  21. IEEE. 2008. IEEE Standard for Floating-Point Arithmetic. Institute for Electrical and Electronics Engineers Inc., New York, NY.Google ScholarGoogle Scholar
  22. Intel. 2015. Intel Math Kernel Library Reference Manual.Google ScholarGoogle Scholar
  23. C. L. Lawson, R. J. Hanson, D. R. Kincaid, and F. T. Krogh. 1979. Basic linear algebra subprograms for fortran usage. ACM Trans. Math. Soft. 5, 3 (Sep. 1979), 308--323. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. McGuckin. 2010. N-Dimensional Euclidean Norms. (personal communication).Google ScholarGoogle Scholar
  25. Q. Sheikh, P. Vu, C. Yang, and M. Merchant. 1992. Implementation of the level 2 and 3 BLAS on the CRAY Y-MP and CRAY-2. J. Supercomput. 5 (1992), 291--305. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. H. Sujon, R. C. Whaley, and Q. Yi. 2013. Vectorization past dependent branches through speculation. In Proceedings of the 22nd International Conference on Parallel Architectures and Compilation Techniques, 353--362.Google ScholarGoogle Scholar
  27. R. C. Whaley, A. Petitet, and J. J. Dongarra. 2001. Automated empirical optimization of software and the ATLAS project. Parallel Comput. 27, 1--2 (2001), 3--35.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Algorithm 978: Safe Scaling in the Level 1 BLAS

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Mathematical Software
        ACM Transactions on Mathematical Software  Volume 44, Issue 1
        March 2018
        308 pages
        ISSN:0098-3500
        EISSN:1557-7295
        DOI:10.1145/3071076
        Issue’s Table of Contents

        Copyright © 2017 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 24 July 2017
        • Revised: 1 March 2017
        • Accepted: 1 March 2017
        • Received: 1 June 2015
        Published in toms Volume 44, Issue 1

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader