
354 Parallel Computing: Technology Trends I. Foster et al. (Eds.) © 2020 The authors and IOS Press. This article is published online with Open Access by IOS Press and distributed under the terms of the Creative Commons Attribution Non-Commercial License 4.0 (CC BY-NC 4.0). doi:10.3233/APC200060 BERTHA and PyBERTHA: State of the Art for Full Four-Component Dirac-Kohn-Sham Calculations Loriano Storchi a,b Matteo De Santis b,c Leonardo Belpassi b a Dipartimento di Farmacia, Universita´ degli Studi ’G. D’Annunzio’, Via dei Vestini 31, 66100 Chieti, Italy b Istituto di Scienze e Tecnologie Molecolari, Consiglio Nazionale delle Ricerche c/o Dipartimento di Chimica, Biologia e Biotecnologie, Universita´ degli Studi di Perugia, Via Elce di Sotto 8, 06123 Perugia, Italy c Dipartimento di Chimica, Biologia e Biotecnologie, Universita´ degli Studi di Perugia, Via Elce di Sotto 8, 06123 Perugia, Italy Abstract. While since mid-seventies it has been clearly shown that relativistic effects play a crucial role for the complete understanding of the chemistry of molecules espe- cially when heavy elements are involved, still nowadays in most of the case the relativistic effects are introduced via approximate methods. The main motivation behind the introduction of such approximation, respect to the natural and most rig- orous component (4c) formalism derived from the Dirac equation, is the computa- tional burden. In the present paper we are proposing a review of the BERTHA code that, together with the recently introduced Python bindings, represents the state of the art for full 4c calculations both in term of performances as well as in terms of code usability. Keywords. four-component Dirac-Kohn-Sham 1. Introduction Relativistic effects, arising by the fast moving of the core electrons and propagating into the valence region, it has been largely shown to become very important for the proper understanding of the chemical properties of molecules [1,2]. Indeed, expecially when heavy or Super-Heavy atom are involved the inclusion of relativistic effects is fudamental also in the deep understanding of the chemical bond [3,4] More recently the developments of new Free Electron Lasers (FEL) provide a range of opportunities to achieve significant advances that extend the boundaries of our knowl- edge in the field of atomic and molecular science and promise to obtain direct informa- tion on the basis processes of energy relaxation/ transfer in molecules (how charge, spin, orbital and eventually nuclear degrees of freedom interact to redistribute the energy). The development of accurate theoretical and computational methods, based on first princi- ples, for the accurate characterization of electronic dynamics including spin-orbit cou- L. Storchi et al. / BERTHA and PyBERTHA 355 pling in molecular systems containing heavy atoms is now one of the most important challenges of theoretical chemistry and computational science [5]. Because of the computational cost of the rigorous way to include relativity (includ- ing spin-orbit effect) in the modelling of molecular systems, a disparate set of approxi- mate methods have been derived from the strictly relativistic 4-component (4c) formal- ism derived from the Dirac equation by Bertha Swirles [6]. Among these the so called 2- components approximation, deriving from the decoupling the ”large” and ”small” com- ponents of the Dirac spinors [7], is the most used. Maybe the Douglas-Kroll-Hess [8] and Zero Order Regular Approximation hamiltonians [9] are, amoung others, the most popular two-component schemes. Both of them have found a wide range of applications with implementations in several modern commercial codes. Clearly the introduction of the cited approximation scheme is motivated by the in- trisic computational difficulty realted to a proper full 4c approach. The BERTHA code, we will describe here, is basically built around a smart and efficient algorithm for the analytical evaluation of relativistic electronic repulsion integrals, developed by Quiney and Grant in Oxford more than a decade ago [10], representing the relativistic general- ization of the well-known McMurchie-Davidson algorithm [11]. As we will show in the following we have extended the applicability range of all-electron DKS calculations, ex- ploiting density fitting techniques and parallelization strategies, to large clusters of heavy metals [12]. Aside what previously stated more recently we introduced a maior improvement in the BERTHA code usability introducing a set of Python bindings [13]. In the present paper, after a review of the parallelization strategies adopted, we will describe in details the PyBERTHA charecteristics and implementation. Finally we will conclude with a test case of the code involving the interection of a flerovium atom [14] with some gold atoms cluster. The achievements, we will describe in the following, represent the state of the art for full 4c calculations and give us the ideal starting point for the necessary further de- velopment of methods of relativistic theory. 2. Computational details In the following subsections we will give all the details about the fundamental features of the BERTHA code. Specifically we will summarizing the basic strategy behind the parallelization of the code, and ,maybe more importantly, we will give all the details about the newly developed Python interface of BERTHA. 2.1. Parallelization strategy Historically the main motivation for the use of approximate methods to include relativity (e.g. including spin-orbit effect) in the modelling of molecular systems is the assumption that full 4c approach is computationally too demanding [15,16]. While this is in principle an obvious assumption, we have shown that one can drastically reduce the computational cost of a Dirac-Kohn-Sham (DKS) calculation, by implementing various parallelization and memory distribution [17,18,12] schemes and by introducing new algorithms, such as those based on the method ”density fitting” [19]. We already shown that is now possible 356 L. Storchi et al. / BERTHA and PyBERTHA to carry out DFT calculations at full relativistic 4c level in an efficient way, and thus exploit the full power behind the DKS equations, in a wide range of molecular systems [4, 20,3]. The main goal we prosecuted has been to almost nullify any serial portion of the code, being inspired by the basic idea behind Amdahl’s law [21]. On the other hand, con- sidering the amount of memory required to perform a DFT calculations at full relativistic 4c level, we designed an ad-hoc method to simulate shared memory for distributed mem- ory computers following a path already designed by other quantum chemistry softwares (e.g., ADF [22] uses GlobalArray [23], GAMESS-US [24] uses the Distributed Data In- terface [25] library). The ad-hoc method we designed as been specifically shaped on the data distribution induced by the problem, more specifically dictated by the grouping of G-spinor basis functions in sets characterized by common origin and angular momentum. In order to recall the main aspects of the implemented parallelization strategy, it is important to point out the fundamental steps of each BERTHA run. Once the molecular system geometry has been specified, together with the basis and fitting set to be used, provided an initial guess density (i.e. cast as a superposition of atomic densities), the den- sity fitting is carried out. Soon after the software builds the Coulomb plus exchange- correlation matrix, and at this stage, only during the first iteration, also the one-electron and overlap matrices are computed and stored in memory as they do not vary from cycle to cycle. Finally the DKS matrix is assembled and the eigenvalue problem is solved. While the full description of the implemented parallelization strategy has been re- ported in our previous works[17,18,12], for the sake of completeness here we are report- ing only a quick overview starting from the results presented in Figure 1. As the reported results indicate we are able to achieve good results both in term of speed-up as well in terms of memory distribution. Figure 1. On the left panel we are reporting the speed-up obtained for the Au20 −Fl complex with the current implementation of BERTHA. On the right panel we are instead reporting the memory allocated per process, for the same molecular system, when running the code using an increasing number of processes P. The results are obtained compiling the code with Intel Parallel Studio XE 2019 and Intel Math Kernel Library , and running on a two nodes cluster quipped with Intel(R) Xeon(R) CPU E5-2650 v2 at 2.60GHz and InfiniBand interconnection. Whenever a linear algebra operation is needed we took advantage of the widely available ScaLAPACK [26] library. We recall here that the P processes of a generic parallel execution are, in ScaLAPACK, mapped onto a PrxPc two-dimensional process grid of Pr process rows and Pc process columns. Almost consequently any dense matrix is then decomposed into blocks of suitable size, which are uniformly distributed along L. Storchi et al. / BERTHA and PyBERTHA 357 each dimension of the process grid according to a specific the so-called Block Cyclic Distribution (BCD) pattern. We implemented some utility functions (see [17,18,12] for details) that are used to efficiently map the main matrices as they are computed into the BCD distribution schema. It is indeed important to underline as the memory consumption per process, thanks to the cited approach, is always well under control as well reported in the right panel of Figure 1. We even observe cases of superlinear performance when the small size of the local arrays permits improved cache reuse to prevail over other factors. Also considering that the PZHEGVX function we are using to carry out the complex DKS matrix diagonalization is able to converge on a given subset of eigenvectors.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-