Flexiblas - a flexible BLAS Library with Runtime Exchangeable Backends

Total Page:16

File Type:pdf, Size:1020Kb

Flexiblas - a flexible BLAS Library with Runtime Exchangeable Backends FlexiBLAS - A flexible BLAS library with runtime exchangeable backends Martin K¨ohler Jens Saak December 20, 2013 Abstract The BLAS library is one of the central libraries for the implementation of nu- merical algorithms. It serves as the basis for many other numerical libraries like LAPACK, PLASMA or MAGMA (to mention only the most obvious). Thus a fast BLAS implementation is the key ingredient for efficient applications in this area. However, for debugging or benchmarking purposes it is often necessary to replace the underlying BLAS implementation of an application, e.g. to disable threading or to include debugging symbols. In this paper we present a novel framework that allows one to exchange the BLAS implementation at run-time via an envi- ronment variable. Our concept neither requires relinkage, nor recompilation of the application. Numerical experiments show that there is no notable overhead introduced by this new approach. For only a very little overhead the framework naturally extends to a minimal profiling setup that allows one to count numbers of calls to the BLAS routines used and measure the time spent therein. Contents 1 Introduction2 2 Implementation Details5 3 Usage 11 4 Numerical Test 15 5 Conclusions 16 6 Acknowledgment 17 1 libblas.so Application liblapack.so libblas.so libumfpack.so Figure 1: Shared library dependencies of an example application. 1 Introduction The BLAS library [2,3,6] is one of the most important basic software libraries in sci- entific computing. The Netlib reference implementation defines the standard Fortran interface and its general behavior. Besides this, optimized variants for nearly every computer architecture exist. These implementations are mostly provided by the CPU or hardware vendors to get the maximum performance out of their specific devices. In addition to the vendor implementations powerful Open Source implementations like OpenBLAS [7] and the Automatically Tuned Linear Algebra Software (ATLAS) [8] exist. Besides the standard Fortran interface Netlib provides a C interface too. The so called CBLAS is normally only a wrapper to the Fortran interface which converts some data types and make the calling sequences more convenient for C programmers in the end. Although one is only interested in using the most efficient BLAS implementation on each hardware, it is often helpful to exchange the BLAS implementation during development. This is, for example, necessary in the debugging process to turn off multithreading or to include additional debug symbols. Benchmarks, comparing dif- ferent BLAS versions to find the best one for the current hardware, are other reasons to switch the BLAS implementation. Our FlexiBLAS concept accelerates this process and resolves the issues often encountered. The three main categories of these issues, the authors are aware of, are explained below. Normally the exchange of a library is performed by relinking the program or even recompiling the entire software project. This can be a difficult and time consuming process. Unfortunately this procedure does not always solve all the problems regarding the change of the BLAS library in the whole application. The main problems are the following: Problem 1: Dynamically Linked Libraries and their dependencies. To explain this issue, we consider an example application which uses BLAS directly for some com- putations and relies on LAPACK and UMFPACK [1] for more complex operations. If LAPACK and UMFPACK are linked dynamically they are usually linked against BLAS, 2 Symbol Resultion Conflicts libopenblas.so Application liblapack.so libblas.so libumfpack.so Figure 2: Wrong symbol resolution after relinking the example application. as well, since this is necessary to resolve their internal symbols. We assume that the example application is compiled and linked dynamically using gcc Applicaton.c -o Applicaton -lblas -llapack -lumfpack with LAPACK and UMFPACK as shared libraries too. The dependencies between the application and the libraries are shown in Figure1. We observe that the BLAS library is referenced several times. First it is directly connected to the application and second it is an indirect dependency through LAPACK and UMFPACK. If one now wants to use an alternative BLAS implementation, e.g. to check if the application performs well with threading, one might link the above program against OpenBLAS via: gcc Applicaton.c -o Applicaton -lopenblas -llapack -lumfpack If we now take a look at the dependencies of the example application we see in Figure2 that we integrated two different BLAS libraries. The program now tries to resolve all symbols by looking in both libraries and we can not influence which one is used. Pro- gram crashes, segmentations faults or other unwanted effects are possible and indeed often observed in this situation. Problem 2: Incompatibilities Even though the Netlib BLAS implementation defines the standard interface and the behavior, not all available BLAS variants are 100% compatible with this interface. For example the auxiliary functions SCABS1/DZABS1 are only used as tools by some BLAS routines, i.e., they are not part of the official BLAS subroutines [6], still they are provided by the Netlib reference implementation and might be called by users unaware of this fact. In order to end up with an 100% Netlib compatible interface we have to provide these functions even if they are not available in some BLAS implementations like ATLAS or Apple Accelerate. Other examples for incompatibilities are differing interfaces for functions returning complex values inside the Intel® MKL [5]. This affects ZDOTC, ZDOTU, CDOTC and CDOTU. However, there is a GNU compatible interface of the MKL in which these functions behave like the 3 Backends liblapack.so Netlib Application libumfpack.so OpenBLAS libflexiblas.so Intel MKL Environment Variables ... Profiling Figure 3: Application with integrated FlexiBLAS. ones from the reference. If we use the icc/ifort compatible interface the signature of these functions changes, though. Intel® introduced an additional parameter to return the result and not as a normal return value. In turn it changes the Fortran function to a Fortran subroutine. If a program uses at least one of those functions when recompiling against different BLAS version, the source code needs to be modified to match the varying BLAS interfaces. Problem 3: Easy Profiling In many cases it is desirable to count how often a certain BLAS function is called in a given context and how much time is spent inside this function. This type of profiling is normally enabled by special compiler options. If the BLAS library was not compiled with these options and we can not recompile it ourselves to enable them, profiling can be complicated or impossible. This is often the case when we use a vendor provided BLAS implementation like Intel® MKL or AMD ACML. Besides the recompilation, additional tools like gprof are necessary. Also enabling the profiling flags can considerably slow down the entire application because the compiler integrates additional code and information. With FlexiBLAS we try to overcome all three problems by providing a wrapper library which acts as an interface between the application and the real BLAS imple- mentation. The API of the wrapper looks exactly like the standard Netlib Fortran reference implementation and behaves like that independent of the actual implemen- tation used. Additionally FlexiBLAS can also provide the CBLAS reference interface defined by Netlib. The underlying BLAS, the so called backend, is selected via config- uration files or an environment variable. Figure3 shows how the application and its dependencies connect to FlexiBLAS. Inside our wrapper a simple profiling system to analyze the function calls can be integrated very naturally and at very limited cost. The remainder of our article is structured as follows. In the following section we describe the basic techniques behind the FlexiBLAS implementation and its usage. The computational results in Section4 will show that the additional overhead caused by 4 FlexiBLAS is negligible. 2 Implementation Details The main idea behind our wrapper library is to use the dlopen-mechanism specified in POSIX.1-2001 [4]. The mechanism allows one to open shared libraries or other elf-binaries and search for functions or symbols inside of them. This technique is often used for plugin infrastructures where parts of a program are loaded at runtime instead of linking the entire program against them. This mechanism gives us great flexibility to enhance the features of a program or exchange parts of the program without recompiling it. This corresponds to our requirements from Section1. The dlopen-mechanism consists of four functions that we will use in our implemen- tation: dlopen The dlopen function is an interface to the dynamic loader. It loads a shared object or an arbitrary elf-binary in the address space of the current program and returns a handle to deal with the loaded object. The shared object can be addressed either by a relative or an absolute path. If it is an absolute path it is opened directly, otherwise it searches in the default linker paths (as they are defined in ld.so.conf or LD LIBRARY PATH. Additionally the behavior of the symbol resolution can be influenced by a flag. Basically there are two options. The first one, RTLD NOW, resolves all symbols when a shared object is opened. The second one, RTLD LAZY allows one to resolve only the necessary symbols when a function out of the shared object is called. Other flags decide if the symbols of the library are integrated into the global address space or not. dlsym The dlsym function is the look up function of the dlopen mechanism. It searches a given shared object handle for a desired symbol. In this way one can extract pointers to functions or variables inside the previously loaded shared library. If a symbol is not found inside the specified handle it returns a NULL pointer. Using two predefined library handles RTLD NEXT and RTLD DEFAULT one can search inside the current address space for a symbol too.
Recommended publications
  • Recursive Approach in Sparse Matrix LU Factorization
    51 Recursive approach in sparse matrix LU factorization Jack Dongarra, Victor Eijkhout and the resulting matrix is often guaranteed to be positive Piotr Łuszczek∗ definite or close to it. However, when the linear sys- University of Tennessee, Department of Computer tem matrix is strongly unsymmetric or indefinite, as Science, Knoxville, TN 37996-3450, USA is the case with matrices originating from systems of Tel.: +865 974 8295; Fax: +865 974 8296 ordinary differential equations or the indefinite matri- ces arising from shift-invert techniques in eigenvalue methods, one has to revert to direct methods which are This paper describes a recursive method for the LU factoriza- the focus of this paper. tion of sparse matrices. The recursive formulation of com- In direct methods, Gaussian elimination with partial mon linear algebra codes has been proven very successful in pivoting is performed to find a solution of Eq. (1). Most dense matrix computations. An extension of the recursive commonly, the factored form of A is given by means technique for sparse matrices is presented. Performance re- L U P Q sults given here show that the recursive approach may per- of matrices , , and such that: form comparable to leading software packages for sparse ma- LU = PAQ, (2) trix factorization in terms of execution time, memory usage, and error estimates of the solution. where: – L is a lower triangular matrix with unitary diago- nal, 1. Introduction – U is an upper triangular matrix with arbitrary di- agonal, Typically, a system of linear equations has the form: – P and Q are row and column permutation matri- Ax = b, (1) ces, respectively (each row and column of these matrices contains single a non-zero entry which is A n n A ∈ n×n x where is by real matrix ( R ), and 1, and the following holds: PPT = QQT = I, b n b, x ∈ n and are -dimensional real vectors ( R ).
    [Show full text]
  • Abstract 1 Introduction
    Implementation in ScaLAPACK of Divide-and-Conquer Algorithms for Banded and Tridiagonal Linear Systems A. Cleary Department of Computer Science University of Tennessee J. Dongarra Department of Computer Science University of Tennessee Mathematical Sciences Section Oak Ridge National Laboratory Abstract Described hereare the design and implementation of a family of algorithms for a variety of classes of narrow ly banded linear systems. The classes of matrices include symmetric and positive de - nite, nonsymmetric but diagonal ly dominant, and general nonsymmetric; and, al l these types are addressed for both general band and tridiagonal matrices. The family of algorithms captures the general avor of existing divide-and-conquer algorithms for banded matrices in that they have three distinct phases, the rst and last of which arecompletely paral lel, and the second of which is the par- al lel bottleneck. The algorithms have been modi ed so that they have the desirable property that they are the same mathematical ly as existing factorizations Cholesky, Gaussian elimination of suitably reordered matrices. This approach represents a departure in the nonsymmetric case from existing methods, but has the practical bene ts of a smal ler and more easily hand led reduced system. All codes implement a block odd-even reduction for the reduced system that al lows the algorithm to scale far better than existing codes that use variants of sequential solution methods for the reduced system. A cross section of results is displayed that supports the predicted performance results for the algo- rithms. Comparison with existing dense-type methods shows that for areas of the problem parameter space with low bandwidth and/or high number of processors, the family of algorithms described here is superior.
    [Show full text]
  • Overview of Iterative Linear System Solver Packages
    Overview of Iterative Linear System Solver Packages Victor Eijkhout July, 1998 Abstract Description and comparison of several packages for the iterative solu- tion of linear systems of equations. 1 1 Intro duction There are several freely available packages for the iterative solution of linear systems of equations, typically derived from partial di erential equation prob- lems. In this rep ort I will give a brief description of a numberofpackages, and giveaninventory of their features and de ning characteristics. The most imp ortant features of the packages are which iterative metho ds and preconditioners supply; the most relevant de ning characteristics are the interface they present to the user's data structures, and their implementation language. 2 2 Discussion Iterative metho ds are sub ject to several design decisions that a ect ease of use of the software and the resulting p erformance. In this section I will give a global discussion of the issues involved, and how certain p oints are addressed in the packages under review. 2.1 Preconditioners A go o d preconditioner is necessary for the convergence of iterative metho ds as the problem to b e solved b ecomes more dicult. Go o d preconditioners are hard to design, and this esp ecially holds true in the case of parallel pro cessing. Here is a short inventory of the various kinds of preconditioners found in the packages reviewed. 2.1.1 Ab out incomplete factorisation preconditioners Incomplete factorisations are among the most successful preconditioners devel- op ed for single-pro cessor computers. Unfortunately, since they are implicit in nature, they cannot immediately b e used on parallel architectures.
    [Show full text]
  • Accelerating the LOBPCG Method on Gpus Using a Blocked Sparse Matrix Vector Product
    Accelerating the LOBPCG method on GPUs using a blocked Sparse Matrix Vector Product Hartwig Anzt and Stanimire Tomov and Jack Dongarra Innovative Computing Lab University of Tennessee Knoxville, USA Email: [email protected], [email protected], [email protected] Abstract— the computing power of today’s supercomputers, often accel- erated by coprocessors like graphics processing units (GPUs), This paper presents a heterogeneous CPU-GPU algorithm design and optimized implementation for an entire sparse iter- becomes challenging. ative eigensolver – the Locally Optimal Block Preconditioned Conjugate Gradient (LOBPCG) – starting from low-level GPU While there exist numerous efforts to adapt iterative lin- data structures and kernels to the higher-level algorithmic choices ear solvers like Krylov subspace methods to coprocessor and overall heterogeneous design. Most notably, the eigensolver technology, sparse eigensolvers have so far remained out- leverages the high-performance of a new GPU kernel developed side the main focus. A possible explanation is that many for the simultaneous multiplication of a sparse matrix and a of those combine sparse and dense linear algebra routines, set of vectors (SpMM). This is a building block that serves which makes porting them to accelerators more difficult. Aside as a backbone for not only block-Krylov, but also for other from the power method, algorithms based on the Krylov methods relying on blocking for acceleration in general. The subspace idea are among the most commonly used general heterogeneous LOBPCG developed here reveals the potential of eigensolvers [1]. When targeting symmetric positive definite this type of eigensolver by highly optimizing all of its components, eigenvalue problems, the recently developed Locally Optimal and can be viewed as a benchmark for other SpMM-dependent applications.
    [Show full text]
  • ARM HPC Ecosystem
    ARM HPC Ecosystem Darren Cepulis HPC Segment Manager ARM Business Segment Group HPC Forum, Santa Fe, NM 19th April 2017 © ARM 2017 ARM Collaboration for Exascale Programs United States Japan ARM is currently a participant in Fujitsu and RIKEN announced that the two Department of Energy funded Post-K system targeted at Exascale will pre-Exascale projects: Data be based on ARMv8 with new Scalable Movement Dominates and Fast Vector Extensions. Forward 2. European Union China Through FP7 and Horizon 2020, James Lin, vice director for the Center ARM has been involved in several of HPC at Shanghai Jiao Tong University funded pre-Exascale projects claims China will build three pre- including the Mont Blanc program Exascale prototypes to select the which deployed one of the first architecture for their Exascale system. ARM prototype HPC systems. The three prototypes are based on AMD, SunWei TaihuLight, and ARMv8. 2 © ARM 2017 ARM HPC deployments starting in 2H2017 Tw o recent announcements about ARM in HPC in Europe: 3 © ARM 2017 Japan Exascale slides from Fujitsu at ISC’16 4 © ARM 2017 Foundational SW Ecosystem for HPC . Linux OS’s – RedHat, SUSE, CENTOS, UBUNTU,… Commercial . Compilers – ARM, GNU, LLVM,… . Libraries – ARM, OpenBLAS, BLIS, ATLAS, FFTW… . Parallelism – OpenMP, OpenMPI, MVAPICH2,… . Debugging – Allinea, RW Totalview, GDB,… Open-source . Analysis – ARM, Allinea, HPCToolkit, TAU,… . Job schedulers – LSF, PBS Pro, SLURM,… . Cluster mgmt – Bright, CMU, warewulf,… Predictable Baseline 5 © ARM 2017 – now on ARM Functional Supported packages / components Areas OpenHPC defines a baseline. It is a community effort to Base OS RHEL/CentOS 7.1, SLES 12 provide a common, verified set of open source packages for Administrative Conman, Ganglia, Lmod, LosF, ORCM, Nagios, pdsh, HPC deployments Tools prun ARM’s participation: Provisioning Warewulf Resource Mgmt.
    [Show full text]
  • Over-Scalapack.Pdf
    1 2 The Situation: Parallel scienti c applications are typically Overview of ScaLAPACK written from scratch, or manually adapted from sequen- tial programs Jack Dongarra using simple SPMD mo del in Fortran or C Computer Science Department UniversityofTennessee with explicit message passing primitives and Mathematical Sciences Section Which means Oak Ridge National Lab oratory similar comp onents are co ded over and over again, co des are dicult to develop and maintain http://w ww .ne tl ib. org /ut k/p e opl e/J ackDo ngarra.html debugging particularly unpleasant... dicult to reuse comp onents not really designed for long-term software solution 3 4 What should math software lo ok like? The NetSolve Client Many more p ossibilities than shared memory Virtual Software Library Multiplicityofinterfaces ! Ease of use Possible approaches { Minimum change to status quo Programming interfaces Message passing and ob ject oriented { Reusable templates { requires sophisticated user Cinterface FORTRAN interface { Problem solving environments Integrated systems a la Matlab, Mathematica use with heterogeneous platform Interactiveinterfaces { Computational server, like netlib/xnetlib f2c Non-graphic interfaces Some users want high p erf., access to details {MATLAB interface Others sacri ce sp eed to hide details { UNIX-Shell interface Not enough p enetration of libraries into hardest appli- Graphic interfaces cations on vector machines { TK/TCL interface Need to lo ok at applications and rethink mathematical software { HotJava Browser
    [Show full text]
  • 0 BLIS: a Modern Alternative to the BLAS
    0 BLIS: A Modern Alternative to the BLAS FIELD G. VAN ZEE and ROBERT A. VAN DE GEIJN, The University of Texas at Austin We propose the portable BLAS-like Interface Software (BLIS) framework which addresses a number of short- comings in both the original BLAS interface and present-day BLAS implementations. The framework allows developers to rapidly instantiate high-performance BLAS-like libraries on existing and new architectures with relatively little effort. The key to this achievement is the observation that virtually all computation within level-2 and level-3 BLAS operations may be expressed in terms of very simple kernels. Higher-level framework code is generalized so that it can be reused and/or re-parameterized for different operations (as well as different architectures) with little to no modification. Inserting high-performance kernels into the framework facilitates the immediate optimization of any and all BLAS-like operations which are cast in terms of these kernels, and thus the framework acts as a productivity multiplier. Users of BLAS-dependent applications are supported through a straightforward compatibility layer, though calling sequences must be updated for those who wish to access new functionality. Experimental performance of level-2 and level-3 operations is observed to be competitive with two mature open source libraries (OpenBLAS and ATLAS) as well as an established commercial product (Intel MKL). Categories and Subject Descriptors: G.4 [Mathematical Software]: Efficiency General Terms: Algorithms, Performance Additional Key Words and Phrases: linear algebra, libraries, high-performance, matrix, BLAS ACM Reference Format: ACM Trans. Math. Softw. 0, 0, Article 0 ( 0000), 31 pages.
    [Show full text]
  • Prospectus for the Next LAPACK and Scalapack Libraries
    Prospectus for the Next LAPACK and ScaLAPACK Libraries James Demmel1, Jack Dongarra23, Beresford Parlett1, William Kahan1, Ming Gu1, David Bindel1, Yozo Hida1, Xiaoye Li1, Osni Marques1, E. Jason Riedy1, Christof Voemel1, Julien Langou2, Piotr Luszczek2, Jakub Kurzak2, Alfredo Buttari2, Julie Langou2, Stanimire Tomov2 1 University of California, Berkeley CA 94720, USA, 2 University of Tennessee, Knoxville TN 37996, USA, 3 Oak Ridge National Laboratory, Oak Ridge, TN 37831, USA, 1 Introduction Dense linear algebra (DLA) forms the core of many scienti¯c computing appli- cations. Consequently, there is continuous interest and demand for the devel- opment of increasingly better algorithms in the ¯eld. Here 'better' has a broad meaning, and includes improved reliability, accuracy, robustness, ease of use, and most importantly new or improved algorithms that would more e±ciently use the available computational resources to speed up the computation. The rapidly evolving high end computing systems and the close dependence of DLA algo- rithms on the computational environment is what makes the ¯eld particularly dynamic. A typical example of the importance and impact of this dependence is the development of LAPACK [1] (and later ScaLAPACK [2]) as a successor to the well known and formerly widely used LINPACK [3] and EISPACK [3] libraries. Both LINPACK and EISPACK were based, and their e±ciency depended, on optimized Level 1 BLAS [4]. Hardware development trends though, and in par- ticular an increasing Processor-to-Memory speed gap of approximately 50% per year, started to increasingly show the ine±ciency of Level 1 BLAS vs Level 2 and 3 BLAS, which prompted e®orts to reorganize DLA algorithms to use block matrix operations in their innermost loops.
    [Show full text]
  • Jack Dongarra: Supercomputing Expert and Mathematical Software Specialist
    Biographies Jack Dongarra: Supercomputing Expert and Mathematical Software Specialist Thomas Haigh University of Wisconsin Editor: Thomas Haigh Jack J. Dongarra was born in Chicago in 1950 to a he applied for an internship at nearby Argonne National family of Sicilian immigrants. He remembers himself as Laboratory as part of a program that rewarded a small an undistinguished student during his time at a local group of undergraduates with college credit. Dongarra Catholic elementary school, burdened by undiagnosed credits his success here, against strong competition from dyslexia.Onlylater,inhighschool,didhebeginto students attending far more prestigious schools, to Leff’s connect material from science classes with his love of friendship with Jim Pool who was then associate director taking machines apart and tinkering with them. Inspired of the Applied Mathematics Division at Argonne.2 by his science teacher, he attended Chicago State University and majored in mathematics, thinking that EISPACK this would combine well with education courses to equip Dongarra was supervised by Brian Smith, a young him for a high school teaching career. The first person in researcher whose primary concern at the time was the his family to go to college, he lived at home and worked lab’s EISPACK project. Although budget cuts forced Pool to in a pizza restaurant to cover the cost of his education.1 make substantial layoffs during his time as acting In 1972, during his senior year, a series of chance director of the Applied Mathematics Division in 1970– events reshaped Dongarra’s planned career. On the 1971, he had made a special effort to find funds to suggestion of Harvey Leff, one of his physics professors, protect the project and hire Smith.
    [Show full text]
  • Distibuted Dense Numerical Linear Algebra Algorithms on Massively Parallel Architectures: DPLASMA
    Distibuted Dense Numerical Linear Algebra Algorithms on massively parallel architectures: DPLASMA † George Bosilca∗, Aurelien Bouteiller∗, Anthony Danalis∗ , Mathieu Faverge∗, Azzam Haidar∗, ‡ §¶ Thomas Herault∗ , Jakub Kurzak∗, Julien Langou , Pierre Lemarinier∗, Hatem Ltaief∗, † Piotr Luszczek∗, Asim YarKhan∗ and Jack Dongarra∗ ∗University of Tennessee Innovative Computing Laboratory †Oak Ridge National Laboratory ‡University Paris-XI §University of Colorado Denver ¶Research was supported by the National Science Foundation grant no. NSF CCF-811520 Abstract—We present DPLASMA, a new project related first two, combined with the economic necessity of using to PLASMA, that operates in the distributed memory many thousands of CPUs to scale up to petascale and regime. It uses a new generic distributed Direct Acyclic larger systems. Graph engine for high performance computing (DAGuE). Our work also takes advantage of some of the features of More transistors and slower clocks means multicore DAGuE, such as DAG representation that is independent of designs and more parallelism required. The modus problem-size, overlapping of communication and computa- operandi of traditional processor design, increase the tion, task prioritization, architecture-aware scheduling and transistor density, speed up the clock rate, raise the management of micro-tasks on distributed architectures voltage has now been blocked by a stubborn set of that feature heterogeneous many-core nodes. The origi- nality of this engine is that it is capable of translating physical barriers: excess heat produced, too much power a sequential nested-loop code into a concise and synthetic consumed, too much voltage leaked. Multicore designs format which it can be interpret and then execute in a are a natural response to this situation.
    [Show full text]
  • LAPACK WORKING NOTE 195: SCALAPACK's MRRR ALGORITHM 1. Introduction. Since 2005, the National Science Foundation Has Been Fund
    LAPACK WORKING NOTE 195: SCALAPACK’S MRRR ALGORITHM CHRISTOF VOMEL¨ ∗ Abstract. The sequential algorithm of Multiple Relatively Robust Representations, MRRR, can compute numerically orthogonal eigenvectors of an unreduced symmetric tridiagonal matrix T ∈ Rn×n with O(n2) cost. This paper describes the design of ScaLAPACK’s parallel MRRR algorithm. One emphasis is on the critical role of the representation tree in achieving both numerical accuracy and parallel scalability. A second point concerns the favorable properties of this code: subset computation, the use of static memory, and scalability. Unlike ScaLAPACK’s Divide & Conquer and QR, MRRR can compute subsets of eigenpairs at reduced cost. And in contrast to inverse iteration which can fail, it is guaranteed to produce a numerically satisfactory answer while maintaining memory scalability. ParEig, the parallel MRRR algorithm for PLAPACK, uses dynamic memory allocation. This is avoided by our code at marginal additional cost. We also use a different representation tree criterion that allows for more accurate computation of the eigenvectors but can make parallelization more difficult. AMS subject classifications. 65F15, 65Y15. Key words. Symmetric eigenproblem, multiple relatively robust representations, ScaLAPACK, numerical software. 1. Introduction. Since 2005, the National Science Foundation has been funding an initiative [19] to improve the LAPACK [3] and ScaLAPACK [14] libraries for Numerical Linear Algebra computations. One of the ambitious goals of this initiative is to put more of LAPACK into ScaLAPACK, recognizing the gap between available sequential and parallel software support. In particular, parallelization of the MRRR algorithm [24, 50, 51, 26, 27, 28, 29], the topic of this paper, is identified as one key improvement to ScaLAPACK.
    [Show full text]
  • 18 Restructuring the Tridiagonal and Bidiagonal QR Algorithms for Performance
    18 Restructuring the Tridiagonal and Bidiagonal QR Algorithms for Performance FIELD G. VAN ZEE and ROBERT A. VAN DE GEIJN, The University of Texas at Austin GREGORIO QUINTANA-ORT´I, Universitat Jaume I We show how both the tridiagonal and bidiagonal QR algorithms can be restructured so that they become rich in operations that can achieve near-peak performance on a modern processor. The key is a novel, cache-friendly algorithm for applying multiple sets of Givens rotations to the eigenvector/singular vec- tor matrix. This algorithm is then implemented with optimizations that: (1) leverage vector instruction units to increase floating-point throughput, and (2) fuse multiple rotations to decrease the total number of memory operations. We demonstrate the merits of these new QR algorithms for computing the Hermitian eigenvalue decomposition (EVD) and singular value decomposition (SVD) of dense matrices when all eigen- vectors/singular vectors are computed. The approach yields vastly improved performance relative to tradi- tional QR algorithms for these problems and is competitive with two commonly used alternatives—Cuppen’s Divide-and-Conquer algorithm and the method of Multiple Relatively Robust Representations—while inherit- ing the more modest O(n) workspace requirements of the original QR algorithms. Since the computations performed by the restructured algorithms remain essentially identical to those performed by the original methods, robust numerical properties are preserved. Categories and Subject Descriptors: G.4 [Mathematical Software]: Efficiency General Terms: Algorithms, Performance Additional Key Words and Phrases: Eigenvalues, singular values, tridiagonal, bidiagonal, EVD, SVD, QR algorithm, Givens rotations, linear algebra, libraries, high performance ACM Reference Format: Van Zee, F.
    [Show full text]