원시데이터 수집 시스템
선정목록으로

A partitioned shift-without-invert algorithm to improve parallel eigensolution efficiency in real-space electronic transport

관련 수소연료전지 · (6) PEM(고분자전해질막)

기본 정보

저자
  1. Baruch Feldman — Department of Materials and Interfaces, Weizmann Institute of Science, Rehovoth 76100, Israel
  2. Yunkai Zhou — Department of Mathematics, Southern Methodist University, Dallas, TX, 75093, USA
DOI
10.1016/j.cpc.2016.05.015
저널
Computer Physics Communications
발행년도
2016
발행기관
Elsevier BV
피인용수
6
라이선스
publisher-specific-oa
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.cpc.2016.05.015
토픽
Graphene research and applications
OpenAlex ID
W2416223669

평가 내용

관련도
관련
사업분야
수소연료전지 · (6) PEM(고분자전해질막)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > PEM(고분자전해질막)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

초록이 없습니다.

본문 63,373자

본문 펼치기
## A partitioned shift-without-invert algorithm to improve parallel eigensolution efficiency in real-space electronic transport Baruch Feldman <sup>1</sup>, Yunkai Zhou <sup>2</sup> Abstract We present an eigenspectrum partitioning scheme without inversion for the recently described real-space electronic transport code, TRANSEC. The primary advantage of TRANSEC is its highly parallel algorithm, which enables studying conductance in large systems. The present scheme adds a new source of parallelization, significantly enhancing TRANSEC’s parallel scalability, especially for systems with many electrons. In principle, partitioning could enable super-linear parallel speedup, as we demonstrate in calculations within TRANSEC. In practical cases, we report better than five-fold improvement in CPU time and similar improvements in wall time, compared to previously-published large calculations. Importantly, the suggested scheme is relatively simple to implement. It can be useful for general large Hermitian or weakly nonHermitian eigenvalue problems, whenever relatively accurate inversion via direct or iterative linear solvers is impractical. 1. Introduction Recently a real-space approach has been developed for Green’s function-based ab-initio electronic conductance calculations, called TRANSEC [1]. TRANSEC inherits a number of intrinsic advantages associated with real-space electronic-structure calculations, including favorable parallelizability and no requirement of an explicit basis-set [1, 2, 3]. Within this approach the bottleneck in computing the electronic transmission function _T_ ( _E_ ) at energy _E_ is the partial diagonalization of a complex-symmetric matrix according to the equation ( _HKS_ _−_ _i_ Γ) _Uk_ = _ϵk Uk,_ _ϵk_ _∈_ C _._ (1) As described in detail previously [1], we perform this step as an abbreviated, cheaper intermediate to the inversion _G_ ( _E_ ) _≡{E_ 1 _−_ ( _HKS_ _−_ _i_ Γ) _}_ <sup>_−_</sup> <sup>1</sup> _,_ which is needed to compute transmission: _T_ ( _E_ ) = Tr - _G_ ( _E_ ) Γ _R G_ <sup>_†_</sup> ( _E_ ) Γ _L_ - _._ In Eq. (1), _HKS_ is the Hermitian Kohn-Sham (KS) Hamiltonian obtained from the PARSEC Density Functional Theory (DFT) code [2, 3] after self-consistency is reached; the _i_ Γ _≡_ _i_ (Γ _L_ + Γ _R_ ) is a sum of imaginary, diagonal absorbing potentials with Gaussian form at the two ends of the simulation cell, where _i_ <sup>2</sup> = _−_ 1; and the _ϵk_ and _Uk_ are a pair of eigenvalue and eigenvector, respectively, of _HKS_ _−_ _i_ Γ [1]. To calculate conductance in an implicit real-space basis, we use a simulation cell having a finite volume _V_, so the dimension of the matrix _HKS_ is given by _N_ _≈_ _V/h_ <sup>3</sup> . Here _h_ is the grid spacing of the real-space lattice and _N_ is typically 10 <sup>4</sup> to 10 <sup>6</sup> or greater. To correct for the finite volume _V_, the imaginary absorbing potentials, _i_ Γ, are tuned to absorb outgoing electrons and prevent reflections at the boundaries of the simulation cell 1Department of Materials and Interfaces, Weizmann Institute of Science, Rehovoth 76100, Israel. `Email:` `baruch.feldman@weizmann.ac.il` . Supported in part by the European Research Council and the Israel Science Foundation. 2Department of Mathematics, Southern Methodist University, Dallas, Texas, USA, 75093. `Email:` `yzhou@smu.edu` . Supported in part by NSF grants DMS-1228271 and DMS-1522587. _Preprint_ _submitted_ _to_ _Elsevier_ _November_ _24,_ _2021_ [1]. Since _HKS_ is real-symmetric, the presence of _i_ Γ results in a complex-symmetric eigenproblem. This partial diagonalization is the most computation-intensive part of TRANSEC, and can take many hundreds or thousands of core-hours of computation on standard supercomputers [1]. TRANSEC is parallelized mainly by partitioning the real-space grid over computing cores during matrixvector application <sup>3</sup> . This monolithic source of parallelization results in less-than-optimal parallel scaling when, for instance, the number _Ne_ of electrons under simulation increases in tandem with, or even faster than, the supercell volume _V_ [1]. In this paper, we develop a further dimension of parallelization by partitioning over the eigenspectrum of Eq. (1). This scheme can significantly improve the iterative solution of the eigenproblem (1), leading to markedly better scalability in TRANSEC. As we will demonstrate in Section 3, super-linear parallel speedup, or net savings in computing time, are possible. The present scheme is conceptually and operationally simpler than shift-invert [4, 5, 6, 7] and similar algorithms, yet still effective. It can accelerate the solution of large eigenvalue problems, both Hermitian and non-Hermitian, when matrix inversion via matrix decompositions such as sparse LU or via iterative linear solvers is impractical. We emphasize that (1) is weakly nonHermitian <sup>4</sup>, as the eigenvectors of (1) are bi-orthogonal with respect to a standard inner product [1, 8]; in contrast, for Hermitian eigenvalue problems, the eigenvectors are orthogonal. While iterative methods have been studied [9, 10] for solution of linear equations with complex-symmetric matrices, few have been proposed for the corresponding eigenvalue problems, such as (1). Robust production code for the solution of sparse large-scale complex-symmetric eigenvalue problems such as Eq. (1), especially when many eigenpairs are needed, is sorely missing. The algorithm we propose in this paper can be used to solve such complexsymmetric eigenvalue problems. This paper is organized as follows. The remainder of this section introduces the no-inverse approach and outlines some of its advantages. In Section 2 we describe in greater detail the shift-without-invert method, including comparisions to other partitioned approaches, and some heuristics towards an automated partition method. In Section 3 we present several large-scale calculations illustrating the potential for improved parallelization and reduced computational time of the proposed method, including two major applications originally reported in [1]. Our current calculations show better than five-fold net savings in computational time compared to our previous method. The method proposed here partitions the eigenvalue problem (1) into parallel sub-problems, then rigidly shifts the operator _HKS_ _−_ _i_ Γ (2) into each different partition of the eigenspectrum. In contrast to more commonly used shift-invert approaches, such as [4, 5, 6, 7], we avoid matrix inversions. Thus our algorithm involves no linear equation solving via _LU_ decomposition or iterative linear equation solvers. Existing spectrum partition algorithms (e.g. [6, 7]) partition the large eigenproblem into parallel subproblems, but must still face the complexity associated with shift-inverse. For our problem, the matrix (2) is very large, and furthermore, the matrix _HKS_ in TRANSEC is never explicitly computed or stored [1, 2], even in a standard sparse format; it is instead represented as a matrix-vector product formula. These facts make inversion _via_ _ILU_ factorization infeasible (even if it may be possible to store the sparse _HKS_ explicitly, the cost of factorization can still be prohibitive due to the matrix size). Sparse inversion using an approximate inverse (AINV) preconditioner [11, 12] may be another option, but both the AINV and the ILU preconditioners are not straightforward to apply; moreover, even with the increased coding complexity and the expected increase in memory cost, the overall CPU time is not necessarily reduced. TRANSEC works with the Hamiltonian _HKS_ from PARSEC, which is defined on a real-space grid [2]. The computational cost of the iterative diagonalization of Eq. (1) using a Krylov-type method such as ARPACK scales like _O_ ( _Nn_ <sup>2</sup> _r_ <sup>),</sup> <sup>where</sup> <sup>_nr_</sup> <sup>is</sup> <sup>the</sup> <sup>total</sup> <sup>number</sup> <sup>of</sup> <sup>eigenpairs</sup> <sup>found</sup> <sup>[13,</sup> <sup>14].</sup> <sup>Because</sup> <sup>of</sup> <sup>the</sup> <sup>sparsity</sup> <sup>of</sup> the Hamiltonian from a real-space method, multiplying the Hamiltonian by a trial vector contributes only linearly in the Hamiltonian dimension _N_ to the cost of (1). Yet this matrix-vector application is the critical 3Note that symmetry and _k_ -point sampling are not implemented because of the non-periodic geometry of conductance calculations, so parallelization over these dimensions is unavailable. 4 By “weakly,” we mean both that the anti-Hermitian part _−i_ Γ is restricted to the diagonal, and that it is typically small, as discussed around Eq. (5). 2 source of parallelization in real-space methods [2]. By contrast, the quadratic scaling in _nr_ is associated with orthogonalizing the growing subspace of eigenvectors, as well as with subspace rotations necessary to carry out the Rayleigh-Ritz refinement process [15]. Whereas the Hamiltonian dimension depends on both the system volume _V_ (number of atoms) and the grid spacing _h_ as _N_ _≈_ _V/h_ <sup>3</sup>, the number of eigenpairs _nr_ needed to converge the _T_ ( _E_ ) calculation typically scales only with the number _Ne_ of electrons in the system. Because the system volume, number of atoms, and number of electrons typically scale together, the cost of our original method [1] grows cubically with system size _V_, whereas the parallelizability improves only linearly with _V_ . Worse still, parallel scalability deteriorates when a large _nr_ is needed for a given _N_, for example in systems with a high average electron density per unit volume, _Ne/V_ . To overcome these problems, we present here a spectrum partitioning method that enables the solution of Eq. (1) with better parallel scalability. To avoid the problems associated with inverse of large matrices mentioned above, we approach this problem by shifting without inversion. The no-inverse approach allows us to parallelize our transport method over energy as well as over the real-space grid, significantly improving the overall parallel performance, as will be shown in Section 3. 2. The shift-without-invert partition algorithm Note that we need to compute the _nr_ eigenvalues with smallest-real-part <sup>5</sup> and their associated eigenvectors of Eq. (1). To partition this computation, one main feature of the present scheme is to shift the matrix (2) by some strategically placed real rigid shifts _ES,j_ and transform Eq. (1) into a sequence of _p_ sub-problems: ( _HKS_ _−_ _i_ Γ _−_ _ES,j_ ) _Uk_ = ( _ϵk −_ _ES,j_ ) _Uk,_ 1 _≤_ _j_ _≤_ _p,_ (3) which can be solved parallelly. For each shift _ES,j_, we solve for _nr,j_ number of eigenvalues closest to the shift, where each _nr,j_ is only a fraction of _nr_ . After combining a sequence of such partitions _j_ with different values of the shifts _ES,j_ and solving for _nr,j_ _<_ _nr_ eigenpairs on each partition, we obtain the desired total _nr_ eigenpairs. To compute all _nr_ eigenpairs, it is clearly necessary that _p_ _j_ _nr,j_ _≥_ _nr ._ (4) The number _nr,j_ of eigenvalues computed in each sub-problem can in theory be made much smaller than the total _nr_, hence we mitigate the _O_ ( _Nn_ <sup>2</sup> _r_ <sup>)</sup> <sup>complexity</sup> <sup>into</sup> <sup>a</sup> <sup>sequence</sup> <sup>of</sup> <sup>_p_</sup> <sup>parallel</sup> <sup>sub-problems,</sup> <sup>each</sup> <sup>with</sup> only _O_ ( _Nn_ <sup>2</sup> _r,j_ <sup>)</sup> <sup>complexity.</sup> By breaking (1) into a sequence of mostly independent sub-problems, the present scheme greatly enhances the parallelization of our real-space method, as we will demonstrate. Moreover, partitioning allows “continuation” runs to expand a domain of previously-solved eigenpairs from _nr_ to a total _n_ <sup>_′_</sup> _r_ <sup>_>_</sup> <sup>_nr_</sup> <sup>,</sup> <sup>by</sup> computing just the _n_ <sup>_′_</sup> _r_ <sup>_−_</sup> <sup>_nr_</sup> <sup>previously</sup> <sup>unsolved</sup> <sup>eigenpairs</sup> <sup>as</sup> <sup>a</sup> <sup>new</sup> <sup>partition.</sup> A single partition’s complexity is quadratic in _nr,j_, thus it is theoretically possible to solve for a total of _nr_ eigenpairs in a time that scales linearly in _nr_, i.e. _O_ ( _nr_ ), when we partition the spectrum into as many finer parts as necessary. In particular, this in theory can lead to far better than the “ideally” linear parallel speedup of non-partitioned methods. In practice, though, our approach faces challenges owing to the increased computational demand associated with computing interior eigenpairs. Our scheme must also cope with uncertainty in choosing the shifts _ES,j_, since the eigenvalues and their density distribution are unknown _a_ _priori_ . The applications we present in Section 3 illustrate in practice both the potential, and the possible setbacks, of the present partitioning scheme. These results show the possibility of super-linear parallel speedup, or equivalently, saving CPU time _via_ partitioning, even compared to un-parallelized calculations. In particular, 5 The reason is that to first order, conductance is a property of a small range of eigenpairs around the Fermi energy _EF_ _≡_ _ϵNF_, the _NF_ th-lowest eigenvalue in the spectrum of _HKS_ [1]. Typically in TRANSEC we choose _nr_ a few times _NF_, and _NF_ _∼_ _Ne/_ 2 _≪_ _N_, where _Ne_ is the number of electrons in the simulation, and _N_ _≈_ _V/h_ <sup>3</sup> is the dimension of _HKS_ . Hence in practice the required eigenpairs are identical to the _nr_ eigenpairs with smallest-real-part. (In this paper any “ordering” of the eigenvalues always refers to ordering by the real parts.) 3 Sections 3.2 and 3.3 present two major applications containing Au(111) nanowires from Ref. [1], each of which we compute here in far less CPU time than in Ref. [1], on the same hardware. The third major application from Ref. [1], a C60 molecule between Au(111) leads, is not presented here. In this case, one interior partition out of four had difficulty converging using the same options passed to PARPACK. The main reason is that Lanczos-type methods (including PARPACK without inversion) are better suited to converging exterior eigenvalues. For eigenvalues located far interior to the spectrum, Lanczos-type methods may suffer from slow convergence, which can worsen when the interior eigenvalues are clustered. With our partitioned method, we call PARPACK with the ‘SM’ (smallest magnitude) option, iterating over a much smaller dimension subspace compared to a non-partitioned method. Thus our approach is most effective when eigenvalues are not highly clustered <sup>6</sup> . For the unconverged partition in the C60 test application, the requested number of eigenpairs per Ry is over 2200. In comparison, the average requested eigenpairs per Ry for the Au nanowire examples is less than 1340, while for the C chain it is less than 250. The more eigenpairs requested per Ry, the more clustered some interior eigenvalues can become. This helps explain why we encountered convergence difficulty for one partition in C60 yet had excellent results for the other applications. For problems with highly clustered interior eigenvalues, a pure no-invert approach as developed here may not be optimal. In this case we should resort to applying shift-with-invert, that is, apply the more complicated ‘inverting’ techniques only when the no-invert approach encounters difficulty converging some partitions. This combination of no-invert and invert will be of future development. We emphasize that, for many problems in quantum transport where the interior eigenvalues are not highly clustered, our no-invert approach provides a greatly simplified alternative to shift-invert. We implement the shift-without-inverse scheme to study quantum transport with the TRANSEC [1] code. Here, the anti-Hermitian part _−i_ Γ of (2) is a relatively small perturbation to _HKS_, so the imaginary parts _ℑ{ϵk}_ of the eigenvalues are bounded, and much smaller than the magnitudes of the real parts, _|ℑ{ϵk}|_ _≪|ℜ{ϵk}|._ Specifically, the complex eigenvalues in our TRANSEC applications are given by <sup>_KS_</sup> _k_ _−_ _i⟨Uk_ <sup>_KS_</sup> _ϵk_ = _⟨Uk|HKS_ _−_ _i_ Γ _|Uk⟩≈_ _ϵ_ <sup>_KS_</sup> _k_ _k_ <sup>_KS_</sup> _|_ Γ _|Uk_ <sup>_KS_</sup> _k_ <sup>_KS_</sup> _⟩._ (5) Here the _Uk_ <sup>_KS_</sup> are unperturbed KS eigenvectors (i.e., those of _HKS_ alone), <sup>_KS_</sup> _k_ _≡⟨Uk_ <sup>_KS_</sup> _ϵ_ <sup>_KS_</sup> _k_ _k_ <sup>_KS_</sup> _|HKS|Uk_ <sup>_KS_</sup> _k_ <sup>_KS_</sup> _⟩∈ℜ_ are the corresponding unperturbed KS eigenvalues, and the approximate equality can be justified by firstorder perturbation theory. Therefore 0 _≤−ℑ{ϵk}_ _≤_ max _{_ Γ _},_ that is, the whole spectrum lies near the real axis, and TRANSEC’s eigenproblem Eq. (1) is only weakly non-Hermitian. Consequently, we only find it necessary to choose appropriate shifts _ES,j_ on the real axis. This choice of real shifts simplifies the partitioning of the spectrum. It is worth mentioning that our scheme should also be applicable to more strongly non-Hermitian eigenproblems. In such cases one needs to choose complex shifts to compute eigenvalues with larger imaginary parts, and a two-dimensional partitioning _{ES,j,k_ _,_ _nr,j,k}_, where the _j_ and _k_ indexes represent real and imaginary parts of the shifts, should be necessary to cover the whole eigenspectrum. _2.1._ _Rationale_ _of_ _a_ _“without-invert”_ _approach_ Our partitioned algorithm belongs to the divide-and-conquer methodology. As is well-known, a divideand-conquer method in theory is more suitable for parallel computing than non-partitioned counterparts. The rationale behind our partitioned method for eigenvalue problems is also to exploit the potential parallel scaling efficiency. More specifically, since a standard non-partitioned sparse iterative eigenalgorithm for 6 Of course, other factors like the assignment of grid points to cores, numerical roundoff, and convergence tolerance also influence convergence in practice. 4 computing _nr_ eigenpairs of a dimension _N_ matrix has complexity _O_ ( _Nn_ <sup>2</sup> _r_ <sup>2</sup> _r_ <sup>),</sup> <sup>if</sup> <sup>we</sup> <sup>partition</sup> <sup>the</sup> <sup>wanted</sup> spectrum into _p_ parts, then for each part the complexity reduces to _O_ ( _N_ - _<u>npr</u>_ �2), so in theory the total complexity reduces to spectrum into _p_ parts, then for each part the complexity reduces to _O_ ( _N_ - _<u>nr</u>_ _p_ - _<u>nr</u>_ _p_ = _O_ �2 <sup>�</sup> _p · O_ _N_ _<u>r</u>_ _N_ <sup>_<u>n</u>_</sup> <sup>2</sup> _p_ _._ (6) We note these theoretical results reference only the number _p_ of partitions, not the number of cores, so (6) could theoretically be attained even with _p_ serial runs on a single core. But there is very little cost to parallelizing the shift-without-invert scheme because the _p_ partitions can be computed in embarassingly parallel (i.e., entirely independently of each other), as indeed was assumed to derive Eq. (6). The only coordination or communication required among partitions is to combine the results after the eigensolution steps, and subsequently to fill in any missed eigenpairs at the interfaces among partitions, as described below. Therefore, we may also consider _p_ as the number of available processors or CPU cores, which on a modern supercomputer can readily reach over a few thousand (or we could choose _p_ larger than the number of cores by running additional parts in series in order to benefit from the _∼_ 1 _/p_ scaling). So the ideal complexity could reach even _O_ ( _Nnr_ ) _,_ (7) when _p_ = _O_ ( _nr_ ). The superior theoretical scaling efficiency associated with partitioned methods is the driving force behind the eigenvalue partition algorithms, represented by [6], [16], and [7]. Both Refs. [6] and [7] utilize the shift-invert operation within the framework of the Lanczos method; the earlier such decomposition idea traces back to [17]. The inverse operations require solving linear equations, which are usually realized by calling either an iterative linear equation algorithm such as CG, or a sparse direct solver [18], in particular the MUMPS package [19]. However, it is well-known that solving the shifted linear equations involves significant efforts, both in computational cost <sup>7</sup> and especially in the algorithm development. A sparse direct solver is the more stable and more straightforward choice when the dimension is not large; however, for very large dimension linear equations, a direct solver becomes impractical and an iterative solver often is needed. But any iterative linear equation solver is not a black-box method that can be used straightforwardly. Rather, there are several parameters related to a given solver that must be tuned [20, 21], and such task of choosing parameters is further complicated by the fact that the shifted equations are often ill-conditioned. The so-called “preconditioned” eigen-algorithms are usually more complicated to use than the preconditioned linear solvers they employ to solve the shifted linear equations. Furthermore, the Lanczos method employed in [17, 6, 7] may suffer from missing eigenvalues, especially when there are clustered eigenvalues and when subspace-restart is used to save memory; therefore, quite complicated post-processing operations are required to find any eigenvalues missed by a previous Lanczos run within a partition. To guarantee no eigenvalues are missed in a partition, accurate eigenvalue counts on an interval must be calculated in [6, 7]. This is done by resorting to the Sylvester inertia theorem, which would require a sequence of Cholesky decompositions. The _O_ ( _N_ <sup>3</sup> ) complexity associated with a Cholesky decomposition thus can significantly restrict the dimension of eigenvalue problems to which the partitioned methods in [6, 7] can be applied. To avoid these difficulties associated with inversion, the spectrum slicing method in [16] opts to apply Chebyshev-Jackson polynomial filters. However, very high order of degree (such as _≥_ 1000) polynomials are used to achieve the desired filtering, resulting in significant computational cost for the filtering. The method in [16] seeks to avoid expensive Cholesky decompositions for counting eigenvalues. This saves computational cost, but increases the complexity of the algorithmic design, since several post-processing procedures are needed to guarantee finding all eigenvalues on a partition slice. The method in [16] is applied to only a relatively small number of partitions; extending it to many partitions could encounter difficulties, owing to the complexity of applying high order degree polynomial filters, and the requirement of finding all eigenvalues when eigenvalue counts are unknown. 7 In fact, we have in the first place chosen eigensolution as an efficiency-enhancing intermediate step toward our actual goal of inverting _E −_ ( _HKS_ _−_ _i_ Γ), as discussed around Eq. (1) and further in Ref. [1]. 5 As discussed earlier, the main advantage of a partitioned eigenvalue algorithm should be its applicability to as many partitions as possible, therefore, we adopt a different approach here than in [16] to avoiding inversion. In addition, the partitioned eigen-methods cited above are all restricted to Hermitian eigenproblems, whereas our method is applicable to non-Hermitian eigenproblems, such as Eq. (1) in TRANSEC. Although the scheme we propose here could be used with any _O_ ( _Nn_ <sup>2</sup> _r_ <sup>)</sup> <sup>iterative</sup> <sup>eigensolver,</sup> <sup>our</sup> <sup>imple-</sup> mentation makes use of the well-received eigenvalue package ARPACK [13, 22], which arguably remains the best public domain solver for large non-Hermitian eigenvalue problems. ARPACK can solve a standard eigenvalue problem such as (1) without performing inverse, simply by applying implicit polynomial filters [23]. In TRANSEC we actually call PARPACK - the parallel version of ARPACK using MPI. As mentioned earlier, the _O_ ( _Nn_ <sup>2</sup> _r_ <sup>) scaling complexity of PARPACK leads to inefficiency when</sup> <sup>_nr_</sup> <sup>is large.</sup> Our solution is to decompose the spectrum into smaller chunks and solve parallelly on each chunk for only a small number of eigenvalues. When computing a relatively small number of eigenvalues, PARPACK enjoys excellent scalability due to fewer basis vectors needing re-orthogonalization (and thus fewer inner-products). This, coupled with the overall stability of ARPACK, makes PARPACK the best available choice for our partitioned subproblem (3). In (3) the number _nr,j_ of requested eigenvalues is only a very small fraction of the dimension of the Hamiltonian matrix. However, we encounter an immediate difficulty with the partition approach: although PARPACK provides options to specify which eigenvalues to compute, such as SR/LR (smallest/largest real part) and SM/LM (smallest/largest magnitude), the SR/LR/LM are all for computing exterior eigenvalues, and cannot be used to compute the eigenvalues in, for example, an interior partition; and the remaining SM option is only for computing eigenvalues closest to zero. We overcome this difficulty by combining shifts and the SM option in PARPACK. That is, we strategically place shifts as in Eq. (3) in an estimated region of the spectrum, then request PARPACK to compute the eigenvalues closest to each of these shifts by using the SM option on the shifted operator. With this choice, we can converge both the exterior and the interior eigenvalues, by placing shifts at suitable locations of the spectrum. A downside is that some interior eigenvalues may be very slow to converge without using inverse; if that happens, the overall scalability of our scheme would deteriorate. A possible remedy is to partially integrate inverse operations when such a situation is detected to happen. Partially utilizing inverse is viable because the number of eigenvalues to be computed around a shift is small. The mixed no-inverse plus shiftinverse approach is still expected to be less expensive than using shift-invert on the full wanted spectrum, and will be the subject of our future work. The current paper focuses on the shift-no-inverse approach. _2.2._ _Computational_ _structure_ _of_ _the_ _shift-without-invert_ _algorithm_ Existing partitioned eigenvalue algorithms, including [6, 16, 7] and our method, all face the challenge of how to partition the spectrum. Since the spectrum is unknown at the start of computation, it is not straightforward to know how to partition it into smaller parts, and harder still to partition in such a way that each chunk would have similar workload for ideal load balancing. This is one of the intrinsic difficulties of any partitioned approach; another difficulty is the handling of partition boundaries (or interfaces) between adjacent partitions, including removing redundant eigenvalues and recovering the wanted eigenvalues that may have been missed on all the partitions. These difficulties, in our opinion, may be the main reason why there exist rather few partitioned eigen-algorithms, even though such an approach can theoretically reach excellent linear scaling complexity. Progress toward an automated algorithm to cope with these difficulties would be a meaningful step forward for approaching the ideal theoretical scaling efficiency promised by a partitioned method. In the next sections we suggest simple techniques to address the two intrinsic difficulties mentioned above. Note that the approach as it is sketched here is neither optimized, nor robust enough to run entirely without human input. Thus our approach is not yet a fully automated algorithm. But the present heuristics are straightforward to implement and may serve as an initial step toward a fully automated partitioned eigen-algorithm. Note also that the results in Section 3 below are special in that we obtained them with foreknowledge of the eigenspectrum from our previous work [1], and therefore did not need to resort to these approximate methods to estimate the _nr,j_ and _ES,j_ . 6 _2.2.1._ _Choosing_ _shifts_ _and_ _partitions_ We choose in advance the total number _p_ of partitions, based on how many cores are available for parallelization, and based on the general consideration that performance improves as _p_ increases (as seen for actual calculations in Section 3) until the overhead of choosing the partitions begins to dominate. Each partition is associated with a shift _ES,j_ together with a number _nr,j_ of eigenpairs to solve; in the _j_ -th partition, we compute the _nr,j_ eigenpairs closest to the shift _ES,j_ . To estimate initial locations for the partitions, we call PARPACK to compute just two exterior eigenvalues - the one with the largest real part and the one with the smallest. This is not expensive since PARPACK is generally very efficient for converging a small number of exterior eigenvalues. Our goal in TRANSEC is to compute the lower end of the spectrum (see footnote 5), so once we estimate these two eigenvalues (denote their real parts as _r_ min and _r_ max), we can estimate the interval to be partitioned as a certain proportion of the full eigenspectrum located at the lower end, for example: - _r_ min _,_ _r_ min + <sup>_<u>nr</u>_</sup> _N_ _._ <sup>_<u>nr</u>_</sup> _N_ <sup>_·_</sup> <sup>(</sup> <sup>_r_</sup> <sup>max</sup> <sup>_−_</sup> <sup>_r_</sup> <sup>min)</sup> However, this estimate assumes uniform density of the eigenspectrum, so it could lead to too many or too few eigenpairs within the partitioned range. To improve, we can estimate the density of eigenpairs by solving for a few eigenpairs at several sample points throughout the spectral region of interest. We next discuss the challenge of load balancing. Because PARPACK is based on the restarted Arnoldi / Lanczos method, interior eigenvalues are more expensive to converge than exterior ones when we call it without inversion. Clearly, using equal _nr,j_ _≡_ _nr/p_ on each partition _j_ would result in poor load balancing. Instead, it is strongly advisable to reduce _nr,j_ as the partitions move into the interior of the spectrum. As a simple heuristic, we use the formulas at lines 4-8 in the pseudocode shown in the next section to do this. After choosing _nr,j_, we must estimate _ES,j_ accordingly, as for example in line 9. Here `round()` and `ceil()` are the standard rounding and ceiling functions, respectively. The formulas, derived by approximate fitting to actual timing data, provide cheap estimates of the optimal _nr,j_ for given _j_ and _p_ that result in far improved load balancing. Still, these formulas are only heuristics, so we expect further refinements such as sampling the local eigenvalue density would improve load-balancing significantly. We now address the two issues mentioned above relating to boundaries between partitions: first, some eigenvalues may be computed twice in adjacent partitions, resulting in redundancy. Second, some wanted eigenvalues may be outside the range of all partitions, leading to holes in the computed spectrum. In practice, these two issues compete; tolerating slight redundancy may be preferable so as to minimize the risk of holes. Holes are the more severe problem because filling them necessitates further PARPACK calls. To address the redundancy problem, we first identify eigenpairs having the same eigenvalue within a small numerical tolerance, and then perform a Gram-Schmidt process to bi-orthogonalize their computed eigenvectors. As a result of the Gram-Schmidt process, any eigenvector linearly dependent on the previous eigenvectors is removed, in this case we also remove its associated redundant eigenvalue. The search and subsequent Gram-Schmidt process can run through all eigenpairs, or only over adjacent pairs of partitions. <sup>8</sup> The problem of missing eigenvalues is harder to address. Since we avoid any Cholesky decompositions, we cannot apply the Sylvester inertia theorem to get eigenvalue counts on a partition. Aside from the high cost of Cholesky decompositions, our eigenvalue problems are non-Hermitian, so the Sylvester inertia theorem does not apply. In addition, TRANSEC and PARSEC avoid explicitly computing or storing _HKS_ or other _N ×_ _N_ matrices, so a matrix decomposition such as Cholesky is inapplicable. Some techniques have been recently proposed [24, 25] to estimate the number of eigenvalues in a given interval without computing them. But these provide only approximate counts, and are again intended for Hermitian eigenproblems, thus cannot apply to (3). Next, we instead propose simple heuristics to identify and fill holes. 8 In theory, a brute-force search for degenerate eigenvalues across all partitions could cost quadratically in _nr_, just as does the orthogonalization step in PARPACK’s Arnoldi algorithm. But one must carry out this search and the Gram-Schmidt step only as post-processing steps _after_ each solution of Eq. (3), rather than iteratively within Eq. (3). So in practice, removing redundancy consumes only a small fraction of CPU time. Moreover, one can restrict this search to adjacent partitions, since redundancy normally does not extend beyond the nearest partition. 7 _2.2.2._ _Pseudocode_ _of_ _the_ _partitioned_ _shift-without-invert_ _algorithm_ Here we present first heuristics towards more automated hole-filling approaches. The structure of our algorithm is presented as Algorithm 1, which we have designed with the quantum transport application of TRANSEC in mind. Adjustment may be called for to optimize the algorithm for other applications. Some useful inputs to the algorithm include the total dimension _N_ of the Hamiltonian and the total eigenspectrum range _rmin_ and _rmax_, as mentioned above. In quantum transport applications, one can also use the lowest Kohn-Sham eigenvalues _ϵ_ <sup>_KS_</sup> _k_ (those of _HKS_ only, without _i_ Γ) to estimate the eigenvalue spacing and the lowest eigenvalue of (2). These are necessary prerequisites to quantum transport, obtained when solving the KS equations of DFT, and are valid approximations to _ϵk_, as discussed around Eq. (5). Still, the algorithm would benefit from non-automatic human insight to gauge the validity of such an approximation, or further corrections such as higher-order perturbation theory to improve on it. Following Algorithm 1, one first can use the _nr,j_ from lines 4-8 to estimate optimal shifts _ES,j_, as in line 9. Ideally, these shifts would be chosen to minimize redundancy while still avoiding holes, both between partitions, and at the edges of the overall range of interest. Or one can improve on line 9 by estimating the eigenspectrum distribution, as described above. Any such knowledge of the spectral distribution could prove important to the quality of the initial shift choices. Next, one computes the solution to Eqs. (3) using the chosen _nr,j_ and _ES,j_ . The Gram-Schmidt process shown in Algorithm 2 should then be performed to remove redundancies. As mentioned above, in practice a few redundancies are desirable to minimize holes. In fact, we find a reliable heuristic to detect holes is the absence of even a single redundancy between adjacent partitions. If the Gram-Schmidt process detects holes, we next apply additional iterations to “fill in” the holes, by inserting new partitions between existing adjacent ones that lack redundancy, as in lines 17-22 of Algorithm 1. This approach is reminiscent of an adaptive grid algorithm. Hole-filling carries computational costs and overheads, but these must be weighed against the more expensive probing that would be needed to get an accurate count of the number of eigenvalues in advance. <u>Algorithm</u> <u>1</u> <u>Partitioned</u> <u>shift-without-invert</u> <u>eigen-algorithm,</u> <u>with</u> <u>automated</u> <u>hole-filling</u> <u>heuristic</u> 1: _p_ := Total number of partitions, _{Emin, Emax}_ := extremal eigenvalues 2: for _j_ = 1 _→_ _p_ do 3: Estimate number of target eigenpairs _nr,j_ for partition _j_ : 4: if _j_ _≤_ _p/_ 2 then 5: _nr,j_ = `round` - 1 _._ 5+2 <sup>_<u>j−</u>_</sup> _p_ <sup><u>1</u></sup> _·_ <sup>_<u>n</u>_</sup> _p_ <sup>_<u>r</u>_</sup> 6: else 7: _nr,j_ = `ceil` ( <sup><u>2</u></sup> <sup>_<u>n</u>_</sup> _p_ <sup>_<u>r</u>_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_nr,_</sup> <sup>(</sup> <sup>_p−j_</sup> <sup>+1)</sup> 8: end if 9: Estimate energy shift _ES,j_ for partition _j_ : _ES,j_ = _ES,j−_ 1 + - _<u>Emax−Emin</u>_ _N_ - <sup>�</sup> _<u>nr,j</u>_ <u>+</u> _<u>nr,j−</u>_ <u>1</u> 2 10: Solve eigenvalue problem (3) with the updated values _nr,j_, _ES,j_ 11: end for 12: 13: Set a conditional flag “holes” on each interface between partitions to true 14: repeat (while any “holes” flag is true) 15: Combine partitions and check for holes (Algorithm 2) 16: 17: for all interfaces _j_ on which the flag has value “holes” do 18: Create a new partition _j_ <sup>_′_</sup> between partitions _j −_ 1, _j_ ; _p_ = _p_ + 1; 2 <sup><u>1</u></sup> �max _i ℜ{λ_ <sup>(</sup> _i_ <sup>_j−_</sup> <sup>1)</sup> -, where _i_ indexes all eigenvalues _λ_ <sup>(</sup> _i_ <sup>_k_</sup> <sup>)</sup> 19: Choose _ES,j′_ = 2 <sup><u>1</u></sup> <sup>(</sup> _i_ <sup>_j−_</sup> <sup>1)</sup> _}_ + min _i ℜ{λ_ <sup>(</sup> _i_ <sup>_j_</sup> <sup>)</sup> <sup>(</sup> _i_ <sup>_j_</sup> <sup>)</sup> <sup>_}_</sup> Choose _ES,j′_ = 2 <sup><u>1</u></sup> max _i ℜ{λ_ <sup>(</sup> _i_ <sup>_j−_</sup> <sup>1)</sup> _}_ + min _i ℜ{λ_ <sup>(</sup> _i_ <sup>_j_</sup> <sup>)</sup> <sup>_}_</sup>, where _i_ indexes all eigenvalues _λ_ <sup>(</sup> _i_ <sup>_k_</sup> <sup>)</sup> on par tition _k_ ; , 20: Choose _nr,j′_ = 2 <sup><u>3</u></sup> - <u>min</u> _<u>i ℜ{λ</u>_ <sup>(</sup> _<u>i</u>_ <sup>_j_</sup> <sup>)</sup> _<u>λ</u>_ <sup>(</sup> _<u>i</u>_ <sup>_j_</sup> <sup>)</sup> _<u>}−</u>_ <u>max</u> _<u>i ℜ{λ</u>_ <sup>(</sup> _<u>i</u>_ <sup>_j−_</sup> <sup>1)</sup> _<u>}</u>_ ( _Emax−Emin_ ) _/N_ <sup>(</sup> _<u>i</u>_ <sup>_j_</sup> <sup>)</sup> _<u>}−</u>_ <u>max</u> _<u>i ℜ{λ</u>_ <sup>(</sup> _<u>i</u>_ <sup>_j−_</sup> <sup>1)</sup> 21: Solve (3) using _nr,j′_, _ES,j′_ . 22: end for 23: <u>until</u> <u>No</u> <u>“holes”</u> <u>remain.</u> 8 Algorithm 2 Combine partitions and remove redundancies / test for holes 1: for all Computed eigenpairs _{λk, vk}_, across all partitions do 2: Check whether eigenvalue _λm_ = _λk_ for any _m < k_ : 3: for all Computed eigenpairs _m < k_ do 4: if _λm_ = _λk_ then 5: Modified Gram-Schmidt orthogonalization: _vk_ = _vk −_ `Proj` _vm_ _vk_ 6: end if 7: end for 8: Compute norm _ak_ _≡|vk|_ after Gram-Schmidt process; 9: if _ak_ _<_ tolerance then 10: Remove redundant eigenpair _{λk, vk}_ ; 11: Set flag holes _k−_ 1 = false ; 12: else 13: Normalize: _vk_ = _vk/ak_ ; 14: end if 15: <u>end</u> <u>for</u> 3. Application of the partitioned shift-without-invert algorithm In this Section, we present benchmark timing results of the shift-without-invert scheme compared to the standard single-partition TRANSEC method of Ref. [1] for several large _T_ ( _E_ ) calculations. We define parallel speedup _η_ according to the usual convention, except with two generalizations. First, because the partitions _j_ run independently, we report speedup either based on total CPU time, or on the longest elapsed wall-time: _ηCP U_ _≡_ <sup>_<u>TCP U,</u>_</sup> <sup><u>0</u></sup> _TCP U_ _<u>Twall,</u>_ <u>0</u> _,_ _ηwall_ _≡_ max _j{Twall,j}_ _· Ncores_ _._ (8) Here _TCP U_ is the total CPU time for the parallel run, _TCP U,_ 0 is the total CPU time for the reference serial run, _Twall,j_ is the elapsed wall time of the _j_ th partition, _Twall,_ 0 _≈_ _TCP U,_ 0 the elapsed wall time of the reference serial run, and _Ncores_ the total number of cores in the parallel job (cumulative over all partitions). Note the difference between _ηCP U_ and _ηwall_ is due to imperfect load-balancing among the partitions, i.e. _Twall,k̸_ = _Twall,j_ . Second, because some calculations are too large to run practically on a single core, we sometimes replace the single- _core_ reference times _TCP U,_ 0 and _Twall,_ 0 in Eq. (8) with single- _partition_ reference times _TCP U,_ 1 and _N_ 1 _· Twall,_ 1, respectively, that are still parallelized over grid points to _N_ 1 cores. For ideal parallelization, the speedup factors defined above approach _ηCP U_ = _ηwall_ = 100%. In this Section, we will report cases where _η_ _>_ 100% because multiple partitions can actually _reduce_ CPU time compared to a single partition, as discussed around Eqs. (6) and (7). Our shift-without-invert scheme requires a relatively small additional run to combine the results of the separate partitions (Algorithm 2). We neglect this in most timings reported in this section, but including it would not change the qualitative picture we present. A more important caveat is the necessity to choose _ES,j_ and _nr,j_ appropriately, something made harder when one lacks foreknowledge of the distribution of eigenvalues. As mentioned in Section 2.2, the calculations in this Section portray the potential of a somewhat idealized shift-without-invert scheme because we do possess such foreknowledge from Ref. [1]. Therefore, hole-filling was avoided, and the timings we present here are simply cumulative times for the successful partitioned runs. But we note the calculations _do_ reflect realistic difficulties such as load-balancing and redundancy. In general, we sought to equal or exceed the total eigenvalue counts _nr_ of Ref. [1], choosing _nr,j_ in accordance with Eq. (4), and using lines 4-8 of Algorithm 1 as a starting point for load-balancing <sup>9</sup> . We divided the single-partition eigenspectra obtained in Ref. [1] into consecutive intervals _j_ containing _nr,j_ 9When doubling the number of partitions, this typically means that each partition _j_ is split into two smaller ones. 9 eigenvalues, and chose _ES,j_ as the midpoint of each interval. We then typically increased the actual eigenpair requests _nr,j_ by _∼_ 5% or 10%, and in some cases <sup>10</sup> further adjusted the partitions, in order to eliminate holes. We combined the partitions according to Algorithm 2, and proceeded to compute transmission _T_ ( _E_ ) as in Ref. [1]. Because _T_ ( _E_ ) is sometimes sensitive to the number of eigenpairs used [1], we typically might discard eigenpairs in the combined spectra that were in excess of the number found in the corresponding single-partition runs. In addition to the _T_ ( _E_ ) comparisons shown below, we also usually compared the final eigenvalue spectra to the single-partition results as another rigorous consistency check. _3.1._ _C_ _monatomic_ _chain_ We applied Algorithm 1 in TRANSEC to compute the transmission _T_ ( _E_ ) in an identical C monatomic chain structure presented in Ref. [1]. The geometry, shown in Fig. 1(a), consisted of 14 C atoms per electrode, with atomic spacing of 2.6 _a_ 0, and a gap of 4.7 _a_ 0 between the electrodes and central atom, where _a_ 0 is the Bohr radius. The calculation made use of norm-conserving Troullier-Martins pseudopotentials with _s_ / _p_ cutoff radii of 1.46/1.46 _a_ 0 for C. As in Ref. [1], we used Gaussian imaginary absorbing potentials Γ centered on the first and last atoms in the chains, of strength 265 mRy and standard deviation 10.4 _a_ 0. (a) (b) Figure 1: (a) Structure of the C monatomic chain system considered here and in Ref. [1]. In this work we use 10% of total eigenpairs rather than 5%. (b) TRANSEC calculated results for transmission, _T_ ( _E_ ), for the C monatomic chain system shown in (a). Results obtained using the partitioned shift-without-invert scheme agree with the single-partition results to better than two decimal places. Following Ref. [1], we used a converged grid spacing _h_ = 0.6 _a_ 0, resulting in _N_ = 22,100 grid points. In order to investigate a case with large _nr/N_, we requested the lowest _nr/N_ = 10% of eigenpairs instead of 5% as in Ref. [1] for a total of _nr_ = 2,210 eigenpairs. The eigenvalues range from _EF_ _−_ 1.036 Ry to _EF_ + 9.229 Ry, where _EF_ is the Fermi level. On a single core with all _nr_ eigenvalues in a single partition, the calculation took about _T_ 0 = 14.5 hours. Parallelized to 4 cores via the standard TRANSEC procedure (i.e., a single partition, parallelized over _N_ only), it took _Twall,_ 1 = 10 wall-clock hours, or about _TCP U,_ 1 = 40 core-hours (parallel speedup of just _η_ = 36%). With the shift-without-invert algorithm with 4 partitions on 1 core each (total of 4 cores), the calculation took a total of _TCP U_ = 9 core-hours, giving parallel speedup _ηCP U_ = 160% compared to the single-core run. The result was obtained in wall-clock time max _j{Twall,j}_ = 3 hours and including Algorithm 2, a full _T_ ( _E_ ) result was obtained within 3.5 hours of starting the calculation (parallel speedup of _ηwall_ = 290% compared to the non-partitioned parallel run with same 4 cores, or _ηwall_ _>_ 100% compared to the single core). The 10 The C chain and the 2- and 4-partition BDT calculations were successfully partitioned on the first attempt. 10 partition parameters were _nr,j_ = (760 _,_ 630 _,_ 459 _,_ 424) and _ES,j −_ _EF_ = (1 _._ 726 _,_ 5 _._ 678 _,_ 7 _._ 496 _,_ 8 _._ 678) Ry. The _T_ ( _E_ ) results agree with the results obtained with the non-partitioned PARPACK package in Ref. [1], as shown in Fig. 1(b). _3.2._ _Transmission_ _in_ _Au(111)_ _nanowire_ _electrodes_ To gauge the shift-without-invert method’s usefulness in practice, we next applied Algorithm 1 to one of our primary test systems of Ref. [1], consisting of Au(111) nanowire electrodes with an Au atomic point contact as the scattering region, and a gap of 9.3 _a_ 0 between the central Au atom and each lead. The system’s structure, shown in Fig. 2(a), is identical to that used in Ref. [1]. Same as in Ref. [1], we used Gaussian absorbing potentials centered at the ends of the two electrodes, with strength 100 mRy and standard deviation 8.5 _a_ 0; and we used a norm-conserving Troullier-Martins pseudopotential for Au with electronic configuration of 5 _d_ <sup>10</sup> 6 _s_ <sup>1</sup> 6 _p_ <sup>0</sup> and _s_ / _p_ / _d_ cutoff radii of 2.77/2.60/2.84 _a_ 0. The real-space grid had _N_ = 234,500 grid points, of which the lowest _nr_ = 2,930 eigenpairs, roughly 1% of the total, were computed. The eigenvalues ranged from _EF_ _−_ 0.549 Ry to _EF_ + 1.638 Ry. As reported in Ref. [1], this single-partition calculation took about _Twall,_ 1 = 41 wall-clock hours on two nodes of Intel E5-2630 machines, each node with two hex-core CPUs (a total _N_ 1 = 24 cores). Thus, the total CPU time was _TCP U,_ 1 = 980 core-hours. In the current work, we have performed the same calculation in four separate partitions of six cores (one hex-core CPU) per partition on the same type of processors, giving a total again of _Ncores_ = 24 cores. The total CPU time for the four runs reduced to only _TCP U_ = 320 core-hours, about three times faster than the single-partition run parallelized only via PARPACK over grid points. The longest of the four partitioned runs took max _j{Twall,j}_ = 17 hours, a factor _∼_ 2.5 less elapsed wall-clock time than the PARPACK-only run. The partition parameters were _nr,j_ = (1019 _,_ 891 _,_ 675 _,_ 524) and _ES,j_ _−_ _EF_ = ( _−_ 0 _._ 045 _,_ 0 _._ 795 _,_ 1 _._ 281 _,_ 1 _._ 535) Ry. As shown in Fig. 2(b), the _T_ ( _E_ ) results obtained by both methods agree to within 0.5% of the peak height, which is well within the typical margin of error of TRANSEC _T_ ( _E_ ) calculations. To determine the portion of this observed speedup attributable to the partitioning scheme, we also performed a new _single_ -partition reference calculation for the same system and same _nr_ with just _N_ 1 = 6 cores. In this case, the calculation took _Twall,_ 1 = 52 hours of elapsed wall-clock time, or a total of _TCP U,_ 1 = 310 core-hours. Compared to this 6-core reference run, the shift-without-invert scheme with 24 cores exhibited a parallel speedup of _ηCP U_ = 98% as measured by CPU time, and _ηwall_ = 79% measured by elapsed wall-clock time. By contrast, the original single-partition TRANSEC algorithm exhibited speedup of just 31% for 24 cores compared to the 6-core reference run. _3.3._ _Benzene_ _dithiol_ _(BDT)_ _molecule_ _with_ _Au(111)_ _nanowire_ _electrodes_ We also applied the partitioned shift-without-invert scheme to another of our principal test systems from Ref. [1], a molecular junction with the same Au(111) nanowire electrodes and absorbing potentials as in Section 3.2 above and a benzene dithiol (BDT) molecule as the scattering region. The system structure used is identical to that in Ref. [1], except that there an electrode-molecule gap of 3.2 _a_ 0 was used to match a similar calculation by Stokbro _et_ _al._ [26], and here we use a larger 6.6 _a_ 0 gap, as shown in Fig. 3(a), to demonstrate the gap-dependence of _T_ ( _E_ ). As in Ref. [1], we used norm-conserving Troullier-Martins pseudopotentials with _s_ / _p_ / _d_ cutoff radii of 1.69/1.69/1.69 _a_ 0 for S, _s_ / _p_ cutoff radii of 1.46/1.46 _a_ 0 for C, and _s_ cutoff radius of 1.28 _a_ 0 for H. The real-space grid had _N_ = 257,000 grid points, of which the lowest _nr_ = 3,210 eigenpairs, about 1% of the total, were computed. These eigenvalues ranged from _EF_ _−_ 0.977 Ry to _EF_ + 1.670 Ry. The single-partition calculation took about _Twall,_ 1 = 72 hours on _N_ 1 = 24 cores (two nodes) of Intel E5-2630, for a total of _TCP U,_ 1 = 1,730 CPU core-hours. As in Section 3.2, we performed the same _T_ ( _E_ ) calculation with the shift-without-invert scheme, using four partitions on six cores (one hex-core CPU) per partition, with the same type of nodes, for a total _NCP U_ = 24 cores. As shown in Fig. 3(b), the partitioned and non-partitioned _T_ ( _E_ ) agree to within the margin of error of TRANSEC calculations. The total CPU time for the four partitioned runs reduced to just _TCP U_ = 330 CPU core-hours, a factor _>_ 5 less than the single-partition run using PARPACK on 24 cores. The longest of the four partitioned runs took max _j{Twall,j}_ = 18 wall-clock hours, a factor _∼_ 4 savings in elapsed time compared to the non-partitioned PARPACK run on the same number of cores. In addition, the overhead of the partitioned runs, i.e., combining the results together by removing redundancy, took _TCP U_ = 50 core-hours. 11 (a) (b) Figure 2: (a) Structure of the Au(111) nanowire/atom/nanowire system considered here and in Ref. [1]. (b) TRANSEC calculated results for transmission, _T_ ( _E_ ), for the Au(111) nanowire/atom/nanowire system shown on top. Results obtained using the partitioned shift-without-invert scheme agree with our results obtained with non-partitioned PARPACK in Ref. [1] to better than two decimal places. To further investigate the method’s parallel performance in large-scale calculations, we performed a series of _T_ ( _E_ ) calculations with one, four, and six cores per partition. Details of these BDT calculations, including the partition parameters, are given in Table 1. We have summarized the speedup data, our primary result in this work, in Fig. 3(c), showing _TCP U_ vs. _Ncores_ and Fig. 3(d), showing max _j{Twall,j}_ vs. _Ncores_ . Each curve shown has a fixed number of cores per partition, _Ncores/p_ . Thus one can compare parallelization schemes by evaluating the timings for various curves at a fixed _Ncores_ position along the horizontal axis. The number _p_ of partitions is of course given by _Ncores_ divided by _Ncores/p_ . The left-most data point displayed in each curve is always a single-partition calculation (serial or parallelized over grid points). Thus, one can visualize the parallel efficiency of the shift-without-invert scheme by comparing the _TCP U_ trend of each curve to the _TCP U_ value of the left-most data point. The runs with six cores per partition (shown as green pluses) exhibit _TCP U_ decreasing with _Ncores_, or equivalently parallel speedup _ηCP U_ _>_ 100%. For all the curves, _TCP U_ is constant or at most weakly increasing, or equivalently _<u>p</u>_ _<u>Ncores/p</u>_ _<u>{nr,j}</u>_ _<u>{ES,j} −</u>_ _<u>EF</u>_ <u>(Ry)</u> _<u>{Twall,j}</u>_ <u>(hours)</u> _<u>TCP U</u>_ <u>(core-hours)</u> 1 1 3209 0.34 200 200 1 4 3209 0.34 86 344 1 6 3209 0.34 82 489 <u>1</u> <u>24</u> <u>3209</u> <u>0.34</u> <u>72</u> <u>1728</u> 2 1 (2252 _,_ 1475) (0 _._ 06 _,_ 1 _._ 40) (100 _,_ 193) 293 2 4 (2252 _,_ 1475) (0 _._ 06 _,_ 1 _._ 40) (41 _,_ 50) 362 <u>2</u> <u>6</u> <u>(2252</u> _<u>,</u>_ <u>1475)</u> <u>(0</u> _<u>.</u>_ <u>06</u> _<u>,</u>_ <u>1</u> _<u>.</u>_ <u>40)</u> <u>(30</u> _<u>,</u>_ <u>43)</u> <u>438</u> 4 1 (1188 _,_ 1035 _,_ 807 _,_ 655) ( _−_ 0 _._ 24 _,_ 0 _._ 82 _,_ 1 _._ 29 _,_ 1 _._ 56) (23 _,_ 77 _,_ 79 _,_ 77) 256 <u>4</u> <u>6</u> <u>(1188</u> _<u>,</u>_ <u>1035</u> _<u>,</u>_ <u>807</u> _<u>,</u>_ <u>655)</u> <u>(</u> _<u>−</u>_ <u>0</u> _<u>.</u>_ <u>24</u> _<u>,</u>_ <u>0</u> _<u>.</u>_ <u>82</u> _<u>,</u>_ <u>1</u> _<u>.</u>_ <u>29</u> _<u>,</u>_ <u>1</u> _<u>.</u>_ <u>56)</u> <u>(6</u> _<u>,</u>_ <u>18</u> _<u>,</u>_ <u>16</u> _<u>,</u>_ <u>15)</u> <u>330</u> 8 6 (561 _,_ 520 _,_ 485 _,_ 464 _,_ ( _−_ 0 _._ 58 _,_ 0 _._ 14 _,_ 0 _._ 65 _,_ 0 _._ 96 _,_ (2 _,_ 4 _,_ 5 _,_ 6 _,_ 8 _,_ 9 _,_ 10 _,_ 9) 321 <u>446,</u> <u>466,</u> <u>440,</u> <u>376)</u> <u>1.18,</u> <u>1.37,</u> <u>1.53,</u> <u>1.64)</u> Table 1: Details of partitioned and non-partitioned BDT calculations, including number of partitions _p_, number of cores per partition, partition parameters, and timing information. 12 (a) (c) (b) (d) Figure 3: (a) Structure of the the benzene dithiol (BDT) molecular junction between Au(111) nanowire electrodes, as in Ref. [1] except with a 6.6 _a_ 0 molecule-electrode gap. (b) Computed _T_ ( _E_ ) with 4 partitions compared to the standard single-partition TRANSEC. (c) Total CPU time _TCP U_ vs. number of cores _Ncores_ for the _T_ ( _E_ ) calculation in BDT, shown in semi-log scale. _TCP U_ shown decreasing with _Ncores_ implies super-linear parallel speedup, as discussed in the main text. (d) Net elapsed time max _j_ _{Twall,j_ _}_ (wall-time of longest-running partition) vs. _Ncores_ . Results are shown for runs with 24 (blue square [1]), 6 (green pluses), 4 (red triangles), and 1 (cyan circles) cores per partition. Note the leftmost point on each curve is a standard single-partition run, as in Ref. [1]; the remaining points are multiple-partition runs using the shift-without-invert scheme. To compare parallelization schemes, one can compare the elapsed time (part (c) of figure) for different runs at a fixed total number of cores in the calculation. As can be seen from (c), four partitions of six cores each (green pluses) parallelize far better than a single partition of 24 cores (blue square) [1]. _η_ is near 100% or even better. For example, comparing the four-partition _vs._ single-partition runs with _Ncores/p_ = 6 cores per partition, we see that parallel speedup was _ηCP U_ = 150% by CPU time and _ηwall_ = 120% by elapsed time. Moreover, the single-partition run with 24 cores (shown as a blue square) from Ref. [1] has _TCP U_ and _Twall_ far greater than the shift-without-invert results with the same _Ncores_ . Although the original TRANSEC method has been designed to handle very large calculations, in this case our original single-partition result with 24 cores was clearly over-parallelized for the size of the given calculation. The dashed line connects the left-most point of each curve, and so represents the speedup trend of the standard TRANSEC algorithm with parallelization only over grid points [1]. Moreover, contrasting the trend of the dashed curve to each solid curve vividly illustrates how the limitations of PARPACK-only parallelization can be overcome by shift-without-invert partitioning of the eigenspace. These speedup results are particularly noteworthy because the BDT junction between Au(111) nanowire electrodes is a challenging nano quantum transport system. 4. Conclusions We have developed a partitioned shift-without-invert scheme that significantly improves the performance of large iterative partial diagonalization algorithms. This scheme can theoretically reduce the computational cost from _O_ ( _Nn_ <sup>2</sup> _r_ <sup>)</sup> <sup>to</sup> <sup>_O_</sup> <sup>(</sup> <sup>_Nnr_</sup> <sup>),</sup> <sup>as</sup> <sup>noted</sup> <sup>in</sup> <sup>Eq.</sup> <sup>7.</sup> In practice, we have illustrated with _nr/N_ = 10% 13 (Section 3.1) that the shift-without-invert time _TCP U_ can indeed be less than the single-core time _T_ 0, and even with _nr/N_ _≈_ 1% (green pluses in Fig. 3(c)) less than the single-partition time _TCP U,_ 1. The proposed scheme adds another level of parallelization (over the spectrum and the spatial grid), which provides significant improvement over the already good parallelization (over spatial grid only) implemented in TRANSEC. As a result, even with the non-optimized partitions and parameters, we have readily obtained a factor _>_ 5 improvement in CPU time for a large TRANSEC calculation by switching from one to four partitions with the same number of cores, as shown in Fig. 3(c). The shift-without-invert scheme provides a far simpler overall structure of partitioned methods. This is particularly true when compared with partitioned approaches that utilize inversion, which require significant additional effort related to solving shifted linear equations. Moreover, our scheme is applicable to non-Hermitian problems, for such eigenvalue problems very few parallel algorithms have been proposed. Finally, our scheme also enables continuation runs, so that previously converged eigenpairs need not be discarded, but instead we simply place new shifts in unexplored regions of the spectrum to compute desired new eigenpairs. The shift-without-invert scheme is expected to be applicable to a wide range of iterative eigenvalue problems: since we base our partitioned solver on PARPACK, it inherits the remarkable robustness and generality of the PARPACK package. Thus for a wide range of eigenvalue problems where ARPACK/PARPACK is applicable, one can adapt our partitioned scheme to improve parallel scalability. 5. Acknowledgements We would like to thank Leeor Kronik and Oded Hod for helpful comments and discussions. This research was partially supported by the European Research Council, the Israel Science Foundation, and the NSF via grants DMS-1228271 and DMS-1522587. References [1] B. Feldman, T. Seideman, O. Hod, and L. Kronik. Real-space method for highly parallelizable electronic transport calculations. _Phys._ _Rev._ _B_, 90:035445, 2014. [2] J. R. Chelikowsky, N. Troullier, and Y. Saad. Finite-difference-pseudopotential method: Electronic structure calculations without a basis. _Phys._ _Rev._ _Lett._, 72:1240–1243, 1994. [3] L. Kronik, A. Makmal, M. L. Tiago, M. M. G. Alemany, M. Jain, X. Huang, Y. Saad, and J. R. Chelikowsky. _Phys._ _Status_ _Solidi_ _B_, 243:1063, 2006. [4] K. Meerbergen and A. Spence. Implicitly restarted Arnoldi with purification for the shift-invert trans formation. _Math._ _Comp._, 66(218):667–689, 1997. [5] L. Bergamaschi, G. Pini, and F. Sartoretto. Approximate inverse preconditioning in the parallel solution of sparse eigenproblems. _Numer._ _Linear_ _Algebra_ _Appl._, 7:99 - 116, 2000. [6] H. Zhang, B. Smith, M. Sternberg, and P. Zapol. SIPs: Shift-and-Invert Parallel Spectral Transforma tions. _ACM_ _Trans._ _Math._ _Software_, 33(2):article 9, 2007. [7] H.M. Aktulga, L. Lin, C. Haine, E.G. Ng, and C. Yang. Parallel eigenvalue calculation based on multiple shift-invert Lanczos and contour integral based spectral projection method. _Parallel Computing_, 40(7):195–212, 2014. [8] R. Santra and L. S. Cederbaum. Non-hermitian electronic theory and applications to clusters. _Phys._ _Rep._, 368(1):1–117, 2002. [9] A. Bunse-Gerstner and R. St¨over. On a conjugate gradient-type method for solving complex symmetric linear systems. _Lin._ _Alg._ _Appl._, 287:105–123, 1999. [10] R. W. Freund. Conjugate gradient-type methods for linear systems with complex symmetric coefficient matrices. _SIAM_ _J._ _Sci._ _Stat._ _Comput._, 13:425–448, 1992. 14 [11] Y. Saad. _Iterative_ _Methods_ _for_ _Sparse_ _Linear_ _Systems_ . SIAM Press, 2003. [12] M. Benzi. Preconditioning techniques for large linear systems: A survey. _J._ _Comput._ _Phys._, 182(2):418– 477, 2002. [13] R. B. Lehoucq, D. C. Sorensen, and C. Yang. _ARPACK User’s Guide:_ _Solution of Large Scale Eigenvalue_ _Problems_ _with_ _Implicitly_ _Restarted_ _Arnoldi_ _Methods_ . SIAM, 1998. [14] G. H. Golub and C. F. Van Loan. _Matrix_ _Computations_ . Johns Hopkins University Press, Baltimore, MD, 3rd edition, 1996. [15] Y. Zhou, Y. Saad, M. L. Tiago, and J. R. Chelikowsky. Parallel self-consistent-field calculations using Chebyshev-filtered subspace acceleration. 74(6):066704, 2006. [16] G. Schofield, J.R. Chelikowsky, and Y. Saad. A spectrum slicing method for the Kohn-Sham problem. _Comp._ _Phys._ _Comm._, 183:497–505, 2012. [17] S. W. Bostic and R. E. Fulton. Implementation of the Lanczos method for structural vibration analysis on a parallel computer. _Computers_ _&_ _Structures_, 25(3):395–403, 1987. [18] T. Davis. _Direct Methods for Sparse Linear Systems_ . Fundamentals of Algorithms. SIAM Press, Philadel phia, 2006. [19] P. R. Amestoy, I. S. Duff, J.-Y. L’Excellent, and J. Koster. A fully asynchronous multifrontal solver using distributed dynamic scheduling. _SIAM_ _J._ _Matrix_ _Anal._ _Appl._, 23(1):15–41, 2001. [20] R. Barrett, M. W. Berry, T. F. Chan, J. Demmel, J. Donato, J. Dongarra, V. Eijkhout, R. Pozo, C. Romine, and H. van der Vorst, editors. _Templates_ _for_ _the_ _solution_ _of_ _linear_ _systems_ . SIAM, Philadelphia, PA, 1994. [21] S. Balay, S. Abhyankar, M. F. Adams, J. Brown, P. Brune, K. Buschelman, L. Dalcin, V. Eijkhout, W. D. Gropp, D. Kaushik, M. G. Knepley, L. Curfman McInnes, K. Rupp, B. F. Smith, S. Zampini, and H. Zhang. PETSc users manual. Technical Report ANL-95/11 - Revision 3.6, Argonne National Laboratory, 2015. [22] The ARPACK-NG project. `[http://github.com/opencollab/arpack-ng](http://github.com/opencollab/arpack-ng)` . [23] D. C. Sorensen. Implicit application of polynomial filters in a _k_ -step Arnoldi method. _SIAM_ _J._ _Matrix_ _Anal._ _Appl._, 13:357–385, 1992. [24] L. Lin, Y. Saad, and C. Yang. Approximating spectral densities of large matrices. _SIAM_ _Review_, 58:34–65, 2016. [25] E. Di Napoli, E. Polizzi, and Y. Saad. Efficient estimation of eigenvalue counts in an interval. _ArXiv_ _e-prints,_ _arXiv:1308.4275_, 2013. [26] K. Stokbro, J. Taylor, M. Brandbyge, J.-L. Mozos, and P. Ordej´on. Theoretical study of the nonlinear conductance of Di-thiol benzene coupled to Au(111) surfaces via thiol and thiolate bonds. _Comp._ _Mat._ _Sci._, 27:151, 2003. 15

섹션 본문 66문단 · 47,003자

(제목 없음)

1We present an eigenspectrum partitioning scheme without inversion for the recently described real-space electronic transport code, TRANSEC. The primary advantage of TRANSEC is its highly parallel algorithm, which enables studying conductance in large systems. The present scheme adds a new source of parallelization, significantly enhancing TRANSEC's parallel scalability, especially for systems with many electrons. In principle, partitioning could enable super-linear parallel speedup, as we demonstrate in calculations within TRANSEC. In practical cases, we report better than five-fold improvement in CPU time and similar improvements in wall time, compared to previously-published large calculations. Importantly, the suggested scheme is relatively simple to implement. It can be useful for general large Hermitian or weakly non-Hermitian eigenvalue problems, whenever relatively accurate inversion via direct or iterative linear solvers is impractical.

Introduction

2Recently a real-space approach has been developed for Green's function-based ab-initio electronic conductance calculations, called TRANSEC [1]. TRANSEC inherits a number of intrinsic advantages associated with real-space electronic-structure calculations, including favorable parallelizability and no requirement of an explicit basis-set [1,2,3].

3Within this approach the bottleneck in computing the electronic transmission function T (E) at energy E is the partial diagonalization of a complex-symmetric matrix according to the equation

4As described in detail previously [1], we perform this step as an abbreviated, cheaper intermediate to the

5which is needed to compute transmission:

6In Eq. (1), H KS is the Hermitian Kohn-Sham (KS) Hamiltonian obtained from the PARSEC Density Functional Theory (DFT) code [2,3] after self-consistency is reached; the iΓ ≡ i(Γ L + Γ R ) is a sum of imaginary, diagonal absorbing potentials with Gaussian form at the two ends of the simulation cell, where i 2 = −1; and the k and U k are a pair of eigenvalue and eigenvector, respectively, of H KS − iΓ [1]. To calculate conductance in an implicit real-space basis, we use a simulation cell having a finite volume V , so the dimension of the matrix H KS is given by N ≈ V /h 3 . Here h is the grid spacing of the real-space lattice and N is typically 10 4 to 10 6 or greater. To correct for the finite volume V , the imaginary absorbing potentials, iΓ, are tuned to absorb outgoing electrons and prevent reflections at the boundaries of the simulation cell [1]. Since H KS is real-symmetric, the presence of iΓ results in a complex-symmetric eigenproblem. This partial diagonalization is the most computation-intensive part of TRANSEC, and can take many hundreds or thousands of core-hours of computation on standard supercomputers [1]. TRANSEC is parallelized mainly by partitioning the real-space grid over computing cores during matrixvector application 3 . This monolithic source of parallelization results in less-than-optimal parallel scaling when, for instance, the number N e of electrons under simulation increases in tandem with, or even faster than, the supercell volume V [1].

7In this paper, we develop a further dimension of parallelization by partitioning over the eigenspectrum of Eq. (1). This scheme can significantly improve the iterative solution of the eigenproblem (1), leading to markedly better scalability in TRANSEC. As we will demonstrate in Section 3, super-linear parallel speedup, or net savings in computing time, are possible. The present scheme is conceptually and operationally simpler than shift-invert [4,5,6,7] and similar algorithms, yet still effective. It can accelerate the solution of large eigenvalue problems, both Hermitian and non-Hermitian, when matrix inversion via matrix decompositions such as sparse LU or via iterative linear solvers is impractical. We emphasize that (1) is weakly non-Hermitian 4 , as the eigenvectors of (1) are bi-orthogonal with respect to a standard inner product [1,8]; in contrast, for Hermitian eigenvalue problems, the eigenvectors are orthogonal. While iterative methods have been studied [9,10] for solution of linear equations with complex-symmetric matrices, few have been proposed for the corresponding eigenvalue problems, such as (1). Robust production code for the solution of sparse large-scale complex-symmetric eigenvalue problems such as Eq. (1), especially when many eigenpairs are needed, is sorely missing. The algorithm we propose in this paper can be used to solve such complexsymmetric eigenvalue problems.

8This paper is organized as follows. The remainder of this section introduces the no-inverse approach and outlines some of its advantages. In Section 2 we describe in greater detail the shift-without-invert method, including comparisions to other partitioned approaches, and some heuristics towards an automated partition method. In Section 3 we present several large-scale calculations illustrating the potential for improved parallelization and reduced computational time of the proposed method, including two major applications originally reported in [1]. Our current calculations show better than five-fold net savings in computational time compared to our previous method.

9The method proposed here partitions the eigenvalue problem (1) into parallel sub-problems, then rigidly shifts the operator

10into each different partition of the eigenspectrum. In contrast to more commonly used shift-invert approaches, such as [4,5,6,7], we avoid matrix inversions. Thus our algorithm involves no linear equation solving via LU decomposition or iterative linear equation solvers. Existing spectrum partition algorithms (e.g. [6,7]) partition the large eigenproblem into parallel subproblems, but must still face the complexity associated with shift-inverse. For our problem, the matrix (2) is very large, and furthermore, the matrix H KS in TRANSEC is never explicitly computed or stored [1,2], even in a standard sparse format; it is instead represented as a matrix-vector product formula. These facts make inversion via ILU factorization infeasible (even if it may be possible to store the sparse H KS explicitly, the cost of factorization can still be prohibitive due to the matrix size). Sparse inversion using an approximate inverse (AINV) preconditioner [11,12] may be another option, but both the AINV and the ILU preconditioners are not straightforward to apply; moreover, even with the increased coding complexity and the expected increase in memory cost, the overall CPU time is not necessarily reduced.

11TRANSEC works with the Hamiltonian H KS from PARSEC, which is defined on a real-space grid [2]. The computational cost of the iterative diagonalization of Eq. (1) using a Krylov-type method such as ARPACK scales like O(N n 2 r ), where n r is the total number of eigenpairs found [13,14]. Because of the sparsity of the Hamiltonian from a real-space method, multiplying the Hamiltonian by a trial vector contributes only linearly in the Hamiltonian dimension N to the cost of (1). Yet this matrix-vector application is the critical source of parallelization in real-space methods [2]. By contrast, the quadratic scaling in n r is associated with orthogonalizing the growing subspace of eigenvectors, as well as with subspace rotations necessary to carry out the Rayleigh-Ritz refinement process [15]. Whereas the Hamiltonian dimension depends on both the system volume V (number of atoms) and the grid spacing h as N ≈ V /h 3 , the number of eigenpairs n r needed to converge the T (E) calculation typically scales only with the number N e of electrons in the system. Because the system volume, number of atoms, and number of electrons typically scale together, the cost of our original method [1] grows cubically with system size V , whereas the parallelizability improves only linearly with V . Worse still, parallel scalability deteriorates when a large n r is needed for a given N , for example in systems with a high average electron density per unit volume, N e /V .

12To overcome these problems, we present here a spectrum partitioning method that enables the solution of Eq. (1) with better parallel scalability. To avoid the problems associated with inverse of large matrices mentioned above, we approach this problem by shifting without inversion. The no-inverse approach allows us to parallelize our transport method over energy as well as over the real-space grid, significantly improving the overall parallel performance, as will be shown in Section 3.

The shift-without-invert partition algorithm

13Note that we need to compute the n r eigenvalues with smallest-real-part 5 and their associated eigenvectors of Eq. (1). To partition this computation, one main feature of the present scheme is to shift the matrix (2) by some strategically placed real rigid shifts E S,j and transform Eq. (1) into a sequence of p sub-problems:

14which can be solved parallelly. For each shift E S,j , we solve for n r,j number of eigenvalues closest to the shift, where each n r,j is only a fraction of n r . After combining a sequence of such partitions j with different values of the shifts E S,j and solving for n r,j < n r eigenpairs on each partition, we obtain the desired total n r eigenpairs. To compute all n r eigenpairs, it is clearly necessary that p j n r,j ≥ n r .

15The number n r,j of eigenvalues computed in each sub-problem can in theory be made much smaller than the total n r , hence we mitigate the O(N n 2 r ) complexity into a sequence of p parallel sub-problems, each with only O(N n 2 r,j ) complexity. By breaking (1) into a sequence of mostly independent sub-problems, the present scheme greatly enhances the parallelization of our real-space method, as we will demonstrate. Moreover, partitioning allows "continuation" runs to expand a domain of previously-solved eigenpairs from n r to a total n r > n r , by computing just the n r − n r previously unsolved eigenpairs as a new partition.

16A single partition's complexity is quadratic in n r,j , thus it is theoretically possible to solve for a total of n r eigenpairs in a time that scales linearly in n r , i.e. O(n r ), when we partition the spectrum into as many finer parts as necessary. In particular, this in theory can lead to far better than the "ideally" linear parallel speedup of non-partitioned methods. In practice, though, our approach faces challenges owing to the increased computational demand associated with computing interior eigenpairs. Our scheme must also cope with uncertainty in choosing the shifts E S,j , since the eigenvalues and their density distribution are unknown a priori.

17The applications we present in Section 3 illustrate in practice both the potential, and the possible setbacks, of the present partitioning scheme. These results show the possibility of super-linear parallel speedup, or equivalently, saving CPU time via partitioning, even compared to un-parallelized calculations. In particular, 5 The reason is that to first order, conductance is a property of a small range of eigenpairs around the Fermi energy E F ≡ N F , the N F th-lowest eigenvalue in the spectrum of H KS [1]. Typically in TRANSEC we choose nr a few times N F , and N F ∼ Ne/2 N , where Ne is the number of electrons in the simulation, and N ≈ V /h 3 is the dimension of H KS . Hence in practice the required eigenpairs are identical to the nr eigenpairs with smallest-real-part. (In this paper any "ordering" of the eigenvalues always refers to ordering by the real parts.) Sections 3.2 and 3.3 present two major applications containing Au(111) nanowires from Ref. [1], each of which we compute here in far less CPU time than in Ref. [1], on the same hardware. The third major application from Ref. [1], a C 60 molecule between Au(111) leads, is not presented here. In this case, one interior partition out of four had difficulty converging using the same options passed to PARPACK.

18The main reason is that Lanczos-type methods (including PARPACK without inversion) are better suited to converging exterior eigenvalues. For eigenvalues located far interior to the spectrum, Lanczos-type methods may suffer from slow convergence, which can worsen when the interior eigenvalues are clustered. With our partitioned method, we call PARPACK with the 'SM' (smallest magnitude) option, iterating over a much smaller dimension subspace compared to a non-partitioned method. Thus our approach is most effective when eigenvalues are not highly clustered 6 . For the unconverged partition in the C 60 test application, the requested number of eigenpairs per Ry is over 2200. In comparison, the average requested eigenpairs per Ry for the Au nanowire examples is less than 1340, while for the C chain it is less than 250. The more eigenpairs requested per Ry, the more clustered some interior eigenvalues can become. This helps explain why we encountered convergence difficulty for one partition in C 60 yet had excellent results for the other applications. For problems with highly clustered interior eigenvalues, a pure no-invert approach as developed here may not be optimal. In this case we should resort to applying shift-with-invert, that is, apply the more complicated 'inverting' techniques only when the no-invert approach encounters difficulty converging some partitions. This combination of no-invert and invert will be of future development. We emphasize that, for many problems in quantum transport where the interior eigenvalues are not highly clustered, our no-invert approach provides a greatly simplified alternative to shift-invert.

19We implement the shift-without-inverse scheme to study quantum transport with the TRANSEC [1] code. Here, the anti-Hermitian part −iΓ of (2) is a relatively small perturbation to H KS , so the imaginary parts { k } of the eigenvalues are bounded, and much smaller than the magnitudes of the real parts,

20Specifically, the complex eigenvalues in our TRANSEC applications are given by

21Here the U KS k are unperturbed KS eigenvectors (i.e., those of H KS alone),

22are the corresponding unperturbed KS eigenvalues, and the approximate equality can be justified by firstorder perturbation theory. Therefore

23that is, the whole spectrum lies near the real axis, and TRANSEC's eigenproblem Eq. (1) is only weakly non-Hermitian. Consequently, we only find it necessary to choose appropriate shifts E S,j on the real axis. This choice of real shifts simplifies the partitioning of the spectrum. It is worth mentioning that our scheme should also be applicable to more strongly non-Hermitian eigenproblems. In such cases one needs to choose complex shifts to compute eigenvalues with larger imaginary parts, and a two-dimensional partitioning {E S,j,k , n r,j,k }, where the j and k indexes represent real and imaginary parts of the shifts, should be necessary to cover the whole eigenspectrum.

Rationale of a "without-invert" approach

24Our partitioned algorithm belongs to the divide-and-conquer methodology. As is well-known, a divideand-conquer method in theory is more suitable for parallel computing than non-partitioned counterparts. The rationale behind our partitioned method for eigenvalue problems is also to exploit the potential parallel scaling efficiency. More specifically, since a standard non-partitioned sparse iterative eigenalgorithm for computing n r eigenpairs of a dimension N matrix has complexity O(N n 2 r ), if we partition the wanted spectrum into p parts, then for each part the complexity reduces to O(N nr p 2 ), so in theory the total complexity reduces to

25We note these theoretical results reference only the number p of partitions, not the number of cores, so (6) could theoretically be attained even with p serial runs on a single core. But there is very little cost to parallelizing the shift-without-invert scheme because the p partitions can be computed in embarassingly parallel (i.e., entirely independently of each other), as indeed was assumed to derive Eq. (6). The only coordination or communication required among partitions is to combine the results after the eigensolution steps, and subsequently to fill in any missed eigenpairs at the interfaces among partitions, as described below. Therefore, we may also consider p as the number of available processors or CPU cores, which on a modern supercomputer can readily reach over a few thousand (or we could choose p larger than the number of cores by running additional parts in series in order to benefit from the ∼ 1/p scaling). So the ideal complexity could reach even

26when p = O(n r ). The superior theoretical scaling efficiency associated with partitioned methods is the driving force behind the eigenvalue partition algorithms, represented by [6], [16], and [7].

27Both Refs. [6] and [7] utilize the shift-invert operation within the framework of the Lanczos method; the earlier such decomposition idea traces back to [17]. The inverse operations require solving linear equations, which are usually realized by calling either an iterative linear equation algorithm such as CG, or a sparse direct solver [18], in particular the MUMPS package [19]. However, it is well-known that solving the shifted linear equations involves significant efforts, both in computational cost 7 and especially in the algorithm development. A sparse direct solver is the more stable and more straightforward choice when the dimension is not large; however, for very large dimension linear equations, a direct solver becomes impractical and an iterative solver often is needed. But any iterative linear equation solver is not a black-box method that can be used straightforwardly. Rather, there are several parameters related to a given solver that must be tuned [20,21], and such task of choosing parameters is further complicated by the fact that the shifted equations are often ill-conditioned. The so-called "preconditioned" eigen-algorithms are usually more complicated to use than the preconditioned linear solvers they employ to solve the shifted linear equations.

28Furthermore, the Lanczos method employed in [17,6,7] may suffer from missing eigenvalues, especially when there are clustered eigenvalues and when subspace-restart is used to save memory; therefore, quite complicated post-processing operations are required to find any eigenvalues missed by a previous Lanczos run within a partition. To guarantee no eigenvalues are missed in a partition, accurate eigenvalue counts on an interval must be calculated in [6,7]. This is done by resorting to the Sylvester inertia theorem, which would require a sequence of Cholesky decompositions. The O(N 3 ) complexity associated with a Cholesky decomposition thus can significantly restrict the dimension of eigenvalue problems to which the partitioned methods in [6,7] can be applied.

29To avoid these difficulties associated with inversion, the spectrum slicing method in [16] opts to apply Chebyshev-Jackson polynomial filters. However, very high order of degree (such as ≥ 1000) polynomials are used to achieve the desired filtering, resulting in significant computational cost for the filtering. The method in [16] seeks to avoid expensive Cholesky decompositions for counting eigenvalues. This saves computational cost, but increases the complexity of the algorithmic design, since several post-processing procedures are needed to guarantee finding all eigenvalues on a partition slice. The method in [16] is applied to only a relatively small number of partitions; extending it to many partitions could encounter difficulties, owing to the complexity of applying high order degree polynomial filters, and the requirement of finding all eigenvalues when eigenvalue counts are unknown.

30As discussed earlier, the main advantage of a partitioned eigenvalue algorithm should be its applicability to as many partitions as possible, therefore, we adopt a different approach here than in [16] to avoiding inversion. In addition, the partitioned eigen-methods cited above are all restricted to Hermitian eigenproblems, whereas our method is applicable to non-Hermitian eigenproblems, such as Eq. (1) in TRANSEC.

31Although the scheme we propose here could be used with any O(N n 2 r ) iterative eigensolver, our implementation makes use of the well-received eigenvalue package ARPACK [13,22], which arguably remains the best public domain solver for large non-Hermitian eigenvalue problems. ARPACK can solve a standard eigenvalue problem such as (1) without performing inverse, simply by applying implicit polynomial filters [23]. In TRANSEC we actually call PARPACK -the parallel version of ARPACK using MPI.

32As mentioned earlier, the O(N n 2 r ) scaling complexity of PARPACK leads to inefficiency when n r is large. Our solution is to decompose the spectrum into smaller chunks and solve parallelly on each chunk for only a small number of eigenvalues. When computing a relatively small number of eigenvalues, PARPACK enjoys excellent scalability due to fewer basis vectors needing re-orthogonalization (and thus fewer inner-products). This, coupled with the overall stability of ARPACK, makes PARPACK the best available choice for our partitioned subproblem (3). In (3) the number n r,j of requested eigenvalues is only a very small fraction of the dimension of the Hamiltonian matrix.

33However, we encounter an immediate difficulty with the partition approach: although PARPACK provides options to specify which eigenvalues to compute, such as SR/LR (smallest/largest real part) and SM/LM (smallest/largest magnitude), the SR/LR/LM are all for computing exterior eigenvalues, and cannot be used to compute the eigenvalues in, for example, an interior partition; and the remaining SM option is only for computing eigenvalues closest to zero.

34We overcome this difficulty by combining shifts and the SM option in PARPACK. That is, we strategically place shifts as in Eq. (3) in an estimated region of the spectrum, then request PARPACK to compute the eigenvalues closest to each of these shifts by using the SM option on the shifted operator. With this choice, we can converge both the exterior and the interior eigenvalues, by placing shifts at suitable locations of the spectrum. A downside is that some interior eigenvalues may be very slow to converge without using inverse; if that happens, the overall scalability of our scheme would deteriorate. A possible remedy is to partially integrate inverse operations when such a situation is detected to happen. Partially utilizing inverse is viable because the number of eigenvalues to be computed around a shift is small. The mixed no-inverse plus shiftinverse approach is still expected to be less expensive than using shift-invert on the full wanted spectrum, and will be the subject of our future work. The current paper focuses on the shift-no-inverse approach.

Computational structure of the shift-without-invert algorithm

35Existing partitioned eigenvalue algorithms, including [6,16,7] and our method, all face the challenge of how to partition the spectrum. Since the spectrum is unknown at the start of computation, it is not straightforward to know how to partition it into smaller parts, and harder still to partition in such a way that each chunk would have similar workload for ideal load balancing. This is one of the intrinsic difficulties of any partitioned approach; another difficulty is the handling of partition boundaries (or interfaces) between adjacent partitions, including removing redundant eigenvalues and recovering the wanted eigenvalues that may have been missed on all the partitions. These difficulties, in our opinion, may be the main reason why there exist rather few partitioned eigen-algorithms, even though such an approach can theoretically reach excellent linear scaling complexity. Progress toward an automated algorithm to cope with these difficulties would be a meaningful step forward for approaching the ideal theoretical scaling efficiency promised by a partitioned method.

36In the next sections we suggest simple techniques to address the two intrinsic difficulties mentioned above. Note that the approach as it is sketched here is neither optimized, nor robust enough to run entirely without human input. Thus our approach is not yet a fully automated algorithm. But the present heuristics are straightforward to implement and may serve as an initial step toward a fully automated partitioned eigen-algorithm. Note also that the results in Section 3 below are special in that we obtained them with foreknowledge of the eigenspectrum from our previous work [1], and therefore did not need to resort to these approximate methods to estimate the n r,j and E S,j .

Choosing shifts and partitions

37We choose in advance the total number p of partitions, based on how many cores are available for parallelization, and based on the general consideration that performance improves as p increases (as seen for actual calculations in Section 3) until the overhead of choosing the partitions begins to dominate. Each partition is associated with a shift E S,j together with a number n r,j of eigenpairs to solve; in the j-th partition, we compute the n r,j eigenpairs closest to the shift E S,j .

38To estimate initial locations for the partitions, we call PARPACK to compute just two exterior eigenvalues -the one with the largest real part and the one with the smallest. This is not expensive since PARPACK is generally very efficient for converging a small number of exterior eigenvalues. Our goal in TRANSEC is to compute the lower end of the spectrum (see footnote 5), so once we estimate these two eigenvalues (denote their real parts as r min and r max ), we can estimate the interval to be partitioned as a certain proportion of the full eigenspectrum located at the lower end, for example:

39However, this estimate assumes uniform density of the eigenspectrum, so it could lead to too many or too few eigenpairs within the partitioned range. To improve, we can estimate the density of eigenpairs by solving for a few eigenpairs at several sample points throughout the spectral region of interest. We next discuss the challenge of load balancing. Because PARPACK is based on the restarted Arnoldi / Lanczos method, interior eigenvalues are more expensive to converge than exterior ones when we call it without inversion. Clearly, using equal n r,j ≡ n r /p on each partition j would result in poor load balancing. Instead, it is strongly advisable to reduce n r,j as the partitions move into the interior of the spectrum. As a simple heuristic, we use the formulas at lines 4-8 in the pseudocode shown in the next section to do this. After choosing n r,j , we must estimate E S,j accordingly, as for example in line 9. Here round() and ceil() are the standard rounding and ceiling functions, respectively. The formulas, derived by approximate fitting to actual timing data, provide cheap estimates of the optimal n r,j for given j and p that result in far improved load balancing. Still, these formulas are only heuristics, so we expect further refinements such as sampling the local eigenvalue density would improve load-balancing significantly.

40We now address the two issues mentioned above relating to boundaries between partitions: first, some eigenvalues may be computed twice in adjacent partitions, resulting in redundancy. Second, some wanted eigenvalues may be outside the range of all partitions, leading to holes in the computed spectrum. In practice, these two issues compete; tolerating slight redundancy may be preferable so as to minimize the risk of holes. Holes are the more severe problem because filling them necessitates further PARPACK calls.

41To address the redundancy problem, we first identify eigenpairs having the same eigenvalue within a small numerical tolerance, and then perform a Gram-Schmidt process to bi-orthogonalize their computed eigenvectors. As a result of the Gram-Schmidt process, any eigenvector linearly dependent on the previous eigenvectors is removed, in this case we also remove its associated redundant eigenvalue. The search and subsequent Gram-Schmidt process can run through all eigenpairs, or only over adjacent pairs of partitions. 8 The problem of missing eigenvalues is harder to address. Since we avoid any Cholesky decompositions, we cannot apply the Sylvester inertia theorem to get eigenvalue counts on a partition. Aside from the high cost of Cholesky decompositions, our eigenvalue problems are non-Hermitian, so the Sylvester inertia theorem does not apply. In addition, TRANSEC and PARSEC avoid explicitly computing or storing H KS or other N × N matrices, so a matrix decomposition such as Cholesky is inapplicable. Some techniques have been recently proposed [24,25] to estimate the number of eigenvalues in a given interval without computing them. But these provide only approximate counts, and are again intended for Hermitian eigenproblems, thus cannot apply to (3). Next, we instead propose simple heuristics to identify and fill holes.

Pseudocode of the partitioned shift-without-invert algorithm

42Here we present first heuristics towards more automated hole-filling approaches. The structure of our algorithm is presented as Algorithm 1, which we have designed with the quantum transport application of TRANSEC in mind. Adjustment may be called for to optimize the algorithm for other applications.

43Some useful inputs to the algorithm include the total dimension N of the Hamiltonian and the total eigenspectrum range r min and r max , as mentioned above. In quantum transport applications, one can also use the lowest Kohn-Sham eigenvalues KS k (those of H KS only, without iΓ) to estimate the eigenvalue spacing and the lowest eigenvalue of (2). These are necessary prerequisites to quantum transport, obtained when solving the KS equations of DFT, and are valid approximations to k , as discussed around Eq. (5). Still, the algorithm would benefit from non-automatic human insight to gauge the validity of such an approximation, or further corrections such as higher-order perturbation theory to improve on it.

44Following Algorithm 1, one first can use the n r,j from lines 4-8 to estimate optimal shifts E S,j , as in line 9. Ideally, these shifts would be chosen to minimize redundancy while still avoiding holes, both between partitions, and at the edges of the overall range of interest. Or one can improve on line 9 by estimating the eigenspectrum distribution, as described above. Any such knowledge of the spectral distribution could prove important to the quality of the initial shift choices.

45Next, one computes the solution to Eqs. (3) using the chosen n r,j and E S,j . The Gram-Schmidt process shown in Algorithm 2 should then be performed to remove redundancies. As mentioned above, in practice a few redundancies are desirable to minimize holes. In fact, we find a reliable heuristic to detect holes is the absence of even a single redundancy between adjacent partitions. If the Gram-Schmidt process detects holes, we next apply additional iterations to "fill in" the holes, by inserting new partitions between existing adjacent ones that lack redundancy, as in lines 17-22 of Algorithm 1. This approach is reminiscent of an adaptive grid algorithm.

46Hole-filling carries computational costs and overheads, but these must be weighed against the more expensive probing that would be needed to get an accurate count of the number of eigenvalues in advance. Estimate number of target eigenpairs n r,j for partition j: 4: if j ≤ p/2 then Estimate energy shift E S,j for partition j: E S,j = E S,j−1 + Emax−Emin N nr,j +nr,j−1 2

10:

47Solve eigenvalue problem (3) with the updated values n r,j , E S,j 11: end for 12:

4813: Set a conditional flag "holes" on each interface between partitions to true 14: repeat(while any "holes" flag is true) 15: Combine partitions and check for holes (Algorithm 2) 16: 17: for all interfaces j on which the flag has value "holes" do 18: Create a new partition j between partitions j − 1, j; p = p + 1; 19: Solve (3) using n r,j , E S,j .

22:

49end for 23: until No "holes" remain. Check whether eigenvalue λ m = λ k for any m < k : 3: for all Computed eigenpairs m < k do 4: if λ m = λ k then Compute norm a k ≡ |v k | after Gram-Schmidt process; 9: if a k < tolerance then Normalize: v k = v k /a k ; 14: end if 15: end for

Application of the partitioned shift-without-invert algorithm

50In this Section, we present benchmark timing results of the shift-without-invert scheme compared to the standard single-partition TRANSEC method of Ref. [1] for several large T (E) calculations.

51We define parallel speedup η according to the usual convention, except with two generalizations. First, because the partitions j run independently, we report speedup either based on total CPU time, or on the longest elapsed wall-time:

52Here T CP U is the total CPU time for the parallel run, T CP U,0 is the total CPU time for the reference serial run, T wall,j is the elapsed wall time of the jth partition, T wall,0 ≈ T CP U,0 the elapsed wall time of the reference serial run, and N cores the total number of cores in the parallel job (cumulative over all partitions). Note the difference between η CP U and η wall is due to imperfect load-balancing among the partitions, i.e. T wall,k = T wall,j . Second, because some calculations are too large to run practically on a single core, we sometimes replace the single-core reference times T CP U,0 and T wall,0 in Eq. (8) with single-partition reference times T CP U,1 and N 1 · T wall,1 , respectively, that are still parallelized over grid points to N 1 cores. For ideal parallelization, the speedup factors defined above approach η CP U = η wall = 100%. In this Section, we will report cases where η > 100% because multiple partitions can actually reduce CPU time compared to a single partition, as discussed around Eqs. (6) and (7).

53Our shift-without-invert scheme requires a relatively small additional run to combine the results of the separate partitions (Algorithm 2). We neglect this in most timings reported in this section, but including it would not change the qualitative picture we present. A more important caveat is the necessity to choose E S,j and n r,j appropriately, something made harder when one lacks foreknowledge of the distribution of eigenvalues. As mentioned in Section 2.2, the calculations in this Section portray the potential of a somewhat idealized shift-without-invert scheme because we do possess such foreknowledge from Ref. [1]. Therefore, hole-filling was avoided, and the timings we present here are simply cumulative times for the successful partitioned runs. But we note the calculations do reflect realistic difficulties such as load-balancing and redundancy.

54In general, we sought to equal or exceed the total eigenvalue counts n r of Ref. [1], choosing n r,j in accordance with Eq. (4), and using lines 4-8 of Algorithm 1 as a starting point for load-balancing 9 . We divided the single-partition eigenspectra obtained in Ref. [1] into consecutive intervals j containing n r,j eigenvalues, and chose E S,j as the midpoint of each interval. We then typically increased the actual eigenpair requests n r,j by ∼5% or 10%, and in some cases 10 further adjusted the partitions, in order to eliminate holes. We combined the partitions according to Algorithm 2, and proceeded to compute transmission T (E) as in Ref. [1]. Because T (E) is sometimes sensitive to the number of eigenpairs used [1], we typically might discard eigenpairs in the combined spectra that were in excess of the number found in the corresponding single-partition runs. In addition to the T (E) comparisons shown below, we also usually compared the final eigenvalue spectra to the single-partition results as another rigorous consistency check.

C monatomic chain

55We applied Algorithm 1 in TRANSEC to compute the transmission T (E) in an identical C monatomic chain structure presented in Ref. [1]. The geometry, shown in Fig. 1(a), consisted of 14 C atoms per electrode, with atomic spacing of 2.6 a 0 , and a gap of 4.7 a 0 between the electrodes and central atom, where a 0 is the Bohr radius. The calculation made use of norm-conserving Troullier-Martins pseudopotentials with s/p cutoff radii of 1.46/1.46 a 0 for C. As in Ref. [1], we used Gaussian imaginary absorbing potentials Γ centered on the first and last atoms in the chains, of strength 265 mRy and standard deviation 10.4 a 0 .

56(a) (b) Figure 1: (a) Structure of the C monatomic chain system considered here and in Ref. [1]. In this work we use 10% of total eigenpairs rather than 5%. (b) TRANSEC calculated results for transmission, T (E), for the C monatomic chain system shown in (a). Results obtained using the partitioned shift-without-invert scheme agree with the single-partition results to better than two decimal places.

57Following Ref. [1], we used a converged grid spacing h = 0.6 a 0 , resulting in N = 22,100 grid points. In order to investigate a case with large n r /N , we requested the lowest n r /N = 10% of eigenpairs instead of 5% as in Ref. [1] for a total of n r = 2,210 eigenpairs. The eigenvalues range from E F − 1.036 Ry to E F + 9.229 Ry, where E F is the Fermi level. On a single core with all n r eigenvalues in a single partition, the calculation took about T 0 = 14.5 hours. Parallelized to 4 cores via the standard TRANSEC procedure (i.e., a single partition, parallelized over N only), it took T wall,1 = 10 wall-clock hours, or about T CP U,1 = 40 core-hours (parallel speedup of just η = 36%).

58With the shift-without-invert algorithm with 4 partitions on 1 core each (total of 4 cores), the calculation took a total of T CP U = 9 core-hours, giving parallel speedup η CP U = 160% compared to the single-core run. The result was obtained in wall-clock time max j {T wall,j } = 3 hours and including Algorithm 2, a full T (E) result was obtained within 3.5 hours of starting the calculation (parallel speedup of η wall = 290% compared to the non-partitioned parallel run with same 4 cores, or η wall >100% compared to the single core). The partition parameters were n r,j = (760, 630, 459, 424) and E S,j − E F = (1.726, 5.678, 7.496, 8.678) Ry. The T (E) results agree with the results obtained with the non-partitioned PARPACK package in Ref. [1], as shown in Fig. 1(b).

Transmission in Au(111) nanowire electrodes

59To gauge the shift-without-invert method's usefulness in practice, we next applied Algorithm 1 to one of our primary test systems of Ref. [1], consisting of Au(111) nanowire electrodes with an Au atomic point contact as the scattering region, and a gap of 9.3 a 0 between the central Au atom and each lead. The system's structure, shown in Fig. 2(a), is identical to that used in Ref. [1]. Same as in Ref. [1], we used Gaussian absorbing potentials centered at the ends of the two electrodes, with strength 100 mRy and standard deviation 8.5 a 0 ; and we used a norm-conserving Troullier-Martins pseudopotential for Au with electronic configuration of 5d 10 6s 1 6p 0 and s/p/d cutoff radii of 2.77/2.60/2.84 a 0 . The real-space grid had N = 234,500 grid points, of which the lowest n r = 2,930 eigenpairs, roughly 1% of the total, were computed. The eigenvalues ranged from E F − 0.549 Ry to E F + 1.638 Ry. As reported in Ref. [1], this single-partition calculation took about T wall,1 = 41 wall-clock hours on two nodes of Intel E5-2630 machines, each node with two hex-core CPUs (a total N 1 = 24 cores). Thus, the total CPU time was T CP U,1 = 980 core-hours.

60In the current work, we have performed the same calculation in four separate partitions of six cores (one hex-core CPU) per partition on the same type of processors, giving a total again of N cores = 24 cores. The total CPU time for the four runs reduced to only T CP U = 320 core-hours, about three times faster than the single-partition run parallelized only via PARPACK over grid points. The longest of the four partitioned runs took max j {T wall,j } = 17 hours, a factor ∼2.5 less elapsed wall-clock time than the PARPACK-only run. The partition parameters were n r,j = (1019, 891, 675, 524) and E S,j − E F = (−0.045, 0.795, 1.281, 1.535) Ry. As shown in Fig. 2(b), the T (E) results obtained by both methods agree to within 0.5% of the peak height, which is well within the typical margin of error of TRANSEC T (E) calculations.

61To determine the portion of this observed speedup attributable to the partitioning scheme, we also performed a new single-partition reference calculation for the same system and same n r with just N 1 = 6 cores. In this case, the calculation took T wall,1 = 52 hours of elapsed wall-clock time, or a total of T CP U,1 = 310 core-hours. Compared to this 6-core reference run, the shift-without-invert scheme with 24 cores exhibited a parallel speedup of η CP U = 98% as measured by CPU time, and η wall = 79% measured by elapsed wall-clock time. By contrast, the original single-partition TRANSEC algorithm exhibited speedup of just 31% for 24 cores compared to the 6-core reference run.

Benzene dithiol (BDT) molecule with Au(111) nanowire electrodes

62We also applied the partitioned shift-without-invert scheme to another of our principal test systems from Ref. [1], a molecular junction with the same Au(111) nanowire electrodes and absorbing potentials as in Section 3.2 above and a benzene dithiol (BDT) molecule as the scattering region. The system structure used is identical to that in Ref. [1], except that there an electrode-molecule gap of 3.2 a 0 was used to match a similar calculation by Stokbro et al. [26], and here we use a larger 6.6 a 0 gap, as shown in Fig. 3(a), to demonstrate the gap-dependence of T (E). As in Ref. [1], we used norm-conserving Troullier-Martins pseudopotentials with s/p/d cutoff radii of 1.69/1.69/1.69 a 0 for S, s/p cutoff radii of 1.46/1.46 a 0 for C, and s cutoff radius of 1.28 a 0 for H. The real-space grid had N = 257,000 grid points, of which the lowest n r = 3,210 eigenpairs, about 1% of the total, were computed. These eigenvalues ranged from E F − 0.977 Ry to E F + 1.670 Ry. The single-partition calculation took about T wall,1 = 72 hours on N 1 = 24 cores (two nodes) of Intel E5-2630, for a total of T CP U,1 = 1,730 CPU core-hours.

63As in Section 3.2, we performed the same T (E) calculation with the shift-without-invert scheme, using four partitions on six cores (one hex-core CPU) per partition, with the same type of nodes, for a total N CP U = 24 cores. As shown in Fig. 3(b), the partitioned and non-partitioned T (E) agree to within the margin of error of TRANSEC calculations. The total CPU time for the four partitioned runs reduced to just T CP U = 330 CPU core-hours, a factor >5 less than the single-partition run using PARPACK on 24 cores. The longest of the four partitioned runs took max j {T wall,j } = 18 wall-clock hours, a factor ∼4 savings in elapsed time compared to the non-partitioned PARPACK run on the same number of cores. In addition, the overhead of the partitioned runs, i.e., combining the results together by removing redundancy, took T CP U = 50 core-hours. (111) nanowire/atom/nanowire system considered here and in Ref. [1]. (b) TRANSEC calculated results for transmission, T (E), for the Au(111) nanowire/atom/nanowire system shown on top. Results obtained using the partitioned shift-without-invert scheme agree with our results obtained with non-partitioned PARPACK in Ref. [1] to better than two decimal places. [1]), 6 (green pluses), 4 (red triangles), and 1 (cyan circles) cores per partition. Note the leftmost point on each curve is a standard single-partition run, as in Ref. [1]; the remaining points are multiple-partition runs using the shift-without-invert scheme. To compare parallelization schemes, one can compare the elapsed time (part (c) of figure) for different runs at a fixed total number of cores in the calculation. As can be seen from (c), four partitions of six cores each (green pluses) parallelize far better than a single partition of 24 cores (blue square) [1]. η is near 100% or even better. For example, comparing the four-partition vs. single-partition runs with N cores /p = 6 cores per partition, we see that parallel speedup was η CP U = 150% by CPU time and η wall = 120% by elapsed time. Moreover, the single-partition run with 24 cores (shown as a blue square) from Ref. [1] has T CP U and T wall far greater than the shift-without-invert results with the same N cores . Although the original TRANSEC method has been designed to handle very large calculations, in this case our original single-partition result with 24 cores was clearly over-parallelized for the size of the given calculation.

64The dashed line connects the left-most point of each curve, and so represents the speedup trend of the standard TRANSEC algorithm with parallelization only over grid points [1]. Moreover, contrasting the trend of the dashed curve to each solid curve vividly illustrates how the limitations of PARPACK-only parallelization can be overcome by shift-without-invert partitioning of the eigenspace. These speedup results are particularly noteworthy because the BDT junction between Au(111) nanowire electrodes is a challenging nano quantum transport system.

Conclusions

65We have developed a partitioned shift-without-invert scheme that significantly improves the performance of large iterative partial diagonalization algorithms. This scheme can theoretically reduce the computational cost from O(N n 2 r ) to O(N n r ), as noted in Eq. 7. In practice, we have illustrated with n r /N = 10% (Section 3.1) that the shift-without-invert time T CP U can indeed be less than the single-core time T 0 , and even with n r /N ≈ 1% (green pluses in Fig. 3(c)) less than the single-partition time T CP U,1 . The proposed scheme adds another level of parallelization (over the spectrum and the spatial grid), which provides significant improvement over the already good parallelization (over spatial grid only) implemented in TRANSEC. As a result, even with the non-optimized partitions and parameters, we have readily obtained a factor >5 improvement in CPU time for a large TRANSEC calculation by switching from one to four partitions with the same number of cores, as shown in Fig. 3(c). The shift-without-invert scheme provides a far simpler overall structure of partitioned methods. This is particularly true when compared with partitioned approaches that utilize inversion, which require significant additional effort related to solving shifted linear equations. Moreover, our scheme is applicable to non-Hermitian problems, for such eigenvalue problems very few parallel algorithms have been proposed. Finally, our scheme also enables continuation runs, so that previously converged eigenpairs need not be discarded, but instead we simply place new shifts in unexplored regions of the spectrum to compute desired new eigenpairs. The shift-without-invert scheme is expected to be applicable to a wide range of iterative eigenvalue problems: since we base our partitioned solver on PARPACK, it inherits the remarkable robustness and generality of the PARPACK package. Thus for a wide range of eigenvalue problems where ARPACK/PARPACK is applicable, one can adapt our partitioned scheme to improve parallel scalability.

Acknowledgements

66We would like to thank Leeor Kronik and Oded Hod for helpful comments and discussions. This research was partially supported by the European Research Council, the Israel Science Foundation, and the NSF via grants DMS-1228271 and DMS-1522587.

참고문헌 25건

  1. Approximating Spectral Densities of Large Matrices SIAM Review · Society for Industrial and Applied Mathematics · 2016 10.1137/130934283
  2. Iterative Methods for Sparse Linear Systems Society for Industrial and Applied Mathematics eBooks · Society for Industrial and Applied Mathematics · 2003 10.1137/1.9780898718003
  3. ARPACK Users' Guide 1998 10.1137/1.9780898719628
  4. Direct Methods for Sparse Linear Systems 2006 10.1137/1.9780898718881
  5. On a conjugate gradient-type method for solving complex symmetric linear systems Linear Algebra and its Applications · Elsevier BV · 1999 10.1016/s0024-3795(98)10091-5
  6. SIPs ACM Transactions on Mathematical Software · Association for Computing Machinery · 2007 10.1145/1236463.1236464
  7. Preconditioning Techniques for Large Linear Systems: A Survey Journal of Computational Physics · Elsevier BV · 2002 10.1006/jcph.2002.7176
  8. Non-Hermitian electronic theory and applications to clusters Physics Reports · Elsevier BV · 2002 10.1016/s0370-1573(02)00143-6
  9. Finite-difference-pseudopotential method: Electronic structure calculations without a basis Physical Review Letters · American Physical Society · 1994 10.1103/physrevlett.72.1240
  10. A spectrum slicing method for the Kohn–Sham problem Computer Physics Communications · Elsevier BV · 2011 10.1016/j.cpc.2011.11.005
  11. Implementation of the lanczos method for structural vibration analysis on a parallel computer Computers & Structures · Elsevier BV · 1987 10.1016/0045-7949(87)90131-3
  12. Implicitly restarted Arnoldi with purification for the shift-invert transformation Mathematics of Computation · American Mathematical Society · 1997 10.1090/s0025-5718-97-00844-2
  13. Conjugate Gradient-Type Methods for Linear Systems with Complex Symmetric Coefficient Matrices SIAM Journal on Scientific and Statistical Computing · Society for Industrial and Applied Mathematics · 1992 10.1137/0913023
  14. Approximate inverse preconditioning in the parallel solution of sparse eigenproblems Numerical Linear Algebra with Applications · Wiley · 2000 10.1002/(sici)1099-1506(200004/05)7:3<99::aid-nla188>3.0.co;2-5
  15. Implicit Application of Polynomial Filters in a <i>k</i>-Step Arnoldi Method SIAM Journal on Matrix Analysis and Applications · Society for Industrial and Applied Mathematics · 1992 10.1137/0613025
  16. A Fully Asynchronous Multifrontal Solver Using Distributed Dynamic Scheduling SIAM Journal on Matrix Analysis and Applications · Society for Industrial and Applied Mathematics · 2001 10.1137/s0895479899358194
  17. Theoretical study of the nonlinear conductance of Di-thiol benzene coupled to Au(1 1 1) surfaces via thiol and thiolate bonds Computational Materials Science · Elsevier BV · 2003 10.1016/s0927-0256(02)00439-1
  18. Real-space method for highly parallelizable electronic transport calculations Physical Review B · American Physical Society · 2014 10.1103/physrevb.90.035445
  19. Parallel eigenvalue calculation based on multiple shift–invert Lanczos and contour integral based spectral projection method Parallel Computing · Elsevier BV · 2014 10.1016/j.parco.2014.03.002
  20. Parallel self-consistent-field calculations via Chebyshev-filtered subspace acceleration Physical Review E · American Physical Society · 2006 10.1103/physreve.74.066704
  21. PARSEC – the pseudopotential algorithm for real‐space electronic structure calculations: recent advances and novel applications to nano‐structures physica status solidi (b) · Wiley · 2006 10.1002/pssb.200541463
  22. Direct Methods for Sparse Linear Systems (Fundamentals of Algorithms 2) Society for Industrial and Applied Mathematics eBooks · Society for Industrial and Applied Mathematics · 2006
  23. Matrix Computations Johns Hopkins University Press eBooks · 2012 10.56021/9781421407944
  24. Efficient estimation of eigenvalue counts in an interval arXiv (Cornell University) · Cornell University · 2013
  25. PETSc Users Manual 2019