Wednesday, 24 June 2015 QCD on Teraflop Computers, ZiF The RHMC Algorithm A D Kennedy School of Physics, The University of Edinburgh.

Slides:



Advertisements
Similar presentations
Time averages and ensemble averages
Advertisements

Wednesday, 04 June 2014 QCD&NA Yale Using Poisson Brackets on Group Manifolds to Tune HMC A D Kennedy School of Physics, The University of Edinburgh.
Roundoff and truncation errors
Lecture 1: basics of lattice QCD Peter Petreczky Lattice regularization and gauge symmetry : Wilson gauge action, fermion doubling Different fermion formulations.
A method of finding the critical point in finite density QCD
Monte Carlo Methods and Statistical Physics
Dynamical Chiral Fermions The `Grail’ – dyn. chiral fermions Generation of dyn. chiral fermions configs –RBC on the RIKEN QCDOC – Jan 05 (some %) –UKQCD.
Saturday, 02 May 2015 Speeding up HMC with better integrators A D Kennedy and M A Clark School of Physics & SUPA, The University of Edinburgh Boston University.
Hamiltonian Formalism
Point-wise Discretization Errors in Boundary Element Method for Elasticity Problem Bart F. Zalewski Case Western Reserve University Robert L. Mullen Case.
Saturday, 02 May 2015Saturday, 02 May 2015Saturday, 02 May 2015Saturday, 02 May Taipei Summer Institute on Strings, Particles and Fields on Strings,
Properties of State Variables
Lattice QCD (INTRODUCTION) DUBNA WINTER SCHOOL 1-2 FEBRUARY 2005.
1 The Monte Carlo method. 2 (0,0) (1,1) (-1,-1) (-1,1) (1,-1) 1 Z= 1 If  X 2 +Y 2  1 0 o/w (X,Y) is a point chosen uniformly at random in a 2  2 square.
Test of the Stefan-Boltzmann behavior for T>0 at tree-level of perturbation theory on the lattice DESY Summer Student 2010 Carmen Ka Ki Li Imperial College.
1 CE 530 Molecular Simulation Lecture 8 Markov Processes David A. Kofke Department of Chemical Engineering SUNY Buffalo
Towards θvacuum simulation in lattice QCD Hidenori Fukaya YITP, Kyoto Univ. Collaboration with S.Hashimoto (KEK), T.Hirohashi (Kyoto Univ.), K.Ogawa(Sokendai),
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Chapter 4 Roots of Equations
Lecture 2: Numerical Differentiation. Derivative as a gradient
QCD – from the vacuum to high temperature an analytical approach an analytical approach.
A status report of the QCDSF N f =2+1 Project Yoshifumi Nakamura (NIC/DESY) for the QCDSF collaboration Lattice Regensburg Aug. 3, 2007.
Antonio RagoUniversità di Milano Techniques for automated lattice Feynman diagram calculations 1 Antonio RagoUniversità di Milano Techniques for automated.
Sunday, 12 July 2015 BNL Domain Wall Fermions and other 5D Algorithms A D Kennedy University of Edinburgh.
Sunday, 12 July 2015 NCTS 2006 School on Modern Numerical Methods in Mathematics and Physics Algorithms for Dynamical Fermions A D Kennedy School of Physics,
Lattice QCD 2007Near Light Cone QCD Near Light Cone QCD On The Lattice H.J. Pirner, D. Grünewald E.-M. Ilgenfritz, E. Prokhvatilov Partially funded by.
Normalised Least Mean-Square Adaptive Filtering
Introduction to Monte Carlo Methods D.J.C. Mackay.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Chang-Kui Duan, Institute of Modern Physics, CUPT 1 Harmonic oscillator and coherent states Reading materials: 1.Chapter 7 of Shankar’s PQM.
Dynamical Chirally Improved Quarks: First Results for Hadron MassesC.B. Lang : Dynamical Chirally Improved Quarks: First Results for Hadron Masses C. B.
Algorithms for a large sparse nonlinear eigenvalue problem Yusaku Yamamoto Dept. of Computational Science & Engineering Nagoya University.
F.F. Assaad. MPI-Stuttgart. Universität-Stuttgart Numerical approaches to the correlated electron problem: Quantum Monte Carlo.  The Monte.
Chasing Shadows A D Kennedy University of Edinburgh Tuesday, 06 October 2015 QCD & NA, Regensburg.
A direct relation between confinement and chiral symmetry breaking in temporally odd-number lattice QCD Lattice 2013 July 29, 2013, Mainz Takahiro Doi.
MODULE 8 APPROXIMATION METHODS I Once we move past the two particle systems, the Schrödinger equation cannot be solved exactly. The electronic inter-repulsion.
Tuesday, 20 October 2015Tuesday, 20 October 2015Tuesday, 20 October 2015Tuesday, 20 October 2015 Workshop on Computational Hadron Physics Hadron Physics.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Topology conserving actions and the overlap Dirac operator (hep-lat/ ) Hidenori Fukaya Yukawa Institute, Kyoto Univ. Collaboration with S.Hashimoto.
Suppressing Random Walks in Markov Chain Monte Carlo Using Ordered Overrelaxation Radford M. Neal 발표자 : 장 정 호.
Serge Andrianov Theory of Symplectic Formalism for Spin-Orbit Tracking Institute for Nuclear Physics Forschungszentrum Juelich Saint-Petersburg State University,
Time-dependent Schrodinger Equation Numerical solution of the time-independent equation is straightforward constant energy solutions do not require us.
PHYS 773: Quantum Mechanics February 6th, 2012
Parallel Solution of the Poisson Problem Using MPI
This is an example of an infinite series. 1 1 Start with a square one unit by one unit: This series converges (approaches a limiting value.) Many series.
Direct Methods for Linear Systems Lecture 3 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy.
1 Chapter 8: Model Inference and Averaging Presented by Hui Fang.
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
An Introduction to Lattice QCD and Monte Carlo Simulations Sinya Aoki Institute of Physics, University of Tsukuba 2005 Taipei Summer Institute on Particles.
5. The Harmonic Oscillator Consider a general problem in 1D Particles tend to be near their minimum Taylor expand V(x) near its minimum Recall V’(x 0 )
Richard Kass/F02P416 Lecture 6 1 Lecture 6 Chi Square Distribution (  2 ) and Least Squares Fitting Chi Square Distribution (  2 ) (See Taylor Ch 8,
Kevin Stevenson AST 4762/5765. What is MCMC?  Random sampling algorithm  Estimates model parameters and their uncertainty  Only samples regions of.
Ch 9.6: Liapunov’s Second Method In Section 9.3 we showed how the stability of a critical point of an almost linear system can usually be determined from.
R. Kass/Sp07P416/Lecture 71 More on Least Squares Fit (LSQF) In Lec 5, we discussed how we can fit our data points to a linear function (straight line)
Deconfinement and chiral transition in finite temperature lattice QCD Péter Petreczky Deconfinement and chiral symmetry restoration are expected to happen.
QCD on Teraflops computerT.Umeda (BNL)1 QCD thermodynamics on QCDOC and APEnext supercomputers QCD thermodynamics on QCDOC and APEnext supercomputers Takashi.
Dynamical Lattice QCD simulation Hideo Matsufuru for the JLQCD Collaboration High Energy Accerelator Research Organization (KEK) with.
Advanced Engineering Mathematics 6th Edition, Concise Edition
Markov chain monte carlo
Quantum One.
Hidden Markov Models Part 2: Algorithms
Solution of Equations by Iteration
Domain Wall Fermions and other 5D Algorithms
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
Adaptive Perturbation Theory: QM and Field Theory
Neutron EDM with external electric field
Shadow Hamiltonians and Force-Gradient Symplectic Integrators
Pavel Buividovich (Regensburg University)
Notes for Analysis Et/Wi
Presentation transcript:

Wednesday, 24 June 2015 QCD on Teraflop Computers, ZiF The RHMC Algorithm A D Kennedy School of Physics, The University of Edinburgh

2 Wednesday, 24 June 2015A D Kennedy Outline Introduction Markov processes Hybrid Monte Carlo Approximation theory Polynomials versus Rationals Symplectic Integrators Multiple timescale integrators Instabilities Higher-order integrators Multiple pseudofermions Hasenbusch’s trick RHMC Comparison with R algorithm Testimonials from satisfied customers Domain Wall fermions Wilson-like fermions Berlin Wall Conclusions

3 Wednesday, 24 June 2015A D Kennedy Introduction Strategy for a seminar Start with a brief elementary introduction Hopefully everyone understands this Get down to more up-to-date and more technical details as the talk progresses Only the experts are still following End with wild speculation and half-thought-out ideas Nobody, including the speaker, knows what he is talking about

4 Wednesday, 24 June 2015A D Kennedy Algorithmic Building Blocks Evaluate functional integrals by generating gauge field configurations with probability proportional to e -S det M = e -S’ and measuring interesting operators on them Generate the configurations using an ergodic Markov process This has a unique fixed point distribution It will converge to this fixed point by iteration Tailor Markov process by iterating a sequence of non- ergodic substeps with the desired fixed point

5 Wednesday, 24 June 2015A D Kennedy Hybrid Monte Carlo The idea of HMC is to generate fields q and “fictitious” momenta p with distribution proportional to e -H(q,p) with H = ½p 2 + S(q), and then to forget the momenta It is built out of 3 non-ergodic steps with this fixed point distribution Momentum heatbath MDMC (molecular dynamics with Metropolis test) Pseudofermion heatbath

6 Wednesday, 24 June 2015A D Kennedy What is RHMC The Rational HMC algorithm uses rational approximations to the action fermion kernel M in order to use HMC for theories with a fractional number of fermion multiplets Why should we do such a thing? Some people like “rooted” staggered quarks It allows us to handle an odd number of Wilson-like quarks The pseudofermion heatbath is difficult otherwise It allows us to use multiple pseudofermion fields to reduce the noise which causes integrator instabilities It is necessary for approximating Neuberger’s operator for on-shell chiral lattice fermions But I won’t discuss this today

7 Wednesday, 24 June 2015A D Kennedy Outline of the rest of the talk… We have now reached the “rapid acceleration” phase Why optimal rational approximations are so nice, and in particular compare them with polynomial approximations How we construct integrators for MDMC (molecular dynamics), and why they have instabilities Why you really want lots of pseudofermions

8 Wednesday, 24 June 2015A D Kennedy Чебышев’s theorem The error |r(x) – f(x)| reaches its maximum at exactly n+d+2 points on the unit interval Чебышев: There is always a unique rational function of any degree (n,d) which minimises

9 Wednesday, 24 June 2015A D Kennedy Чебышев rationals: Example A realistic example of a rational approximation is Using a partial fraction expansion of such rational functions allows us to use a multishift linear equation solver, thus reducing the cost significantly. The partial fraction expansion of the rational function above is This is accurate to within almost 0.1% over the range [0.003,1] This appears to be numerically stable.

10 Wednesday, 24 June 2015A D Kennedy Polynomials v Rationals: Theory Optimal L 2 approximation with weight is Optimal L ∞ approximation cannot be too much better (or it would lead to a better L 2 approximation) Золотарев’s formula has L ∞ error This has L 2 error of O(1/n)

11 Wednesday, 24 June 2015A D Kennedy Polynomials v Rationals: Data

12 Wednesday, 24 June 2015A D Kennedy If A and B belong to any (non-commutative) algebra then, where  constructed from commutators of A and B (i.e., is in the Free Lie Algebra generated by {A,B }) Symplectic Integrators: I More precisely, where and Baker-Campbell-Hausdorff (BCH) formula

13 Wednesday, 24 June 2015A D Kennedy Symplectic Integrators: II Explicitly, the first few terms are In order to construct reversible integrators we use symmetric symplectic integrators The following identity follows directly from the BCH formula

14 Wednesday, 24 June 2015A D Kennedy Symplectic Integrators: III We are interested in finding the classical trajectory in phase space of a system described by the Hamiltonian The basic idea of such a symplectic integrator is to write the time evolution operator as

15 Wednesday, 24 June 2015A D Kennedy Symplectic Integrators: IV Define and so that Since the kinetic energy T is a function only of p and the potential energy S is a function only of q, it follows that the action of and may be evaluated trivially

16 Wednesday, 24 June 2015A D Kennedy Symplectic Integrators: V From the BCH formula we find that the PQP symmetric symplectic integrator is given by In addition to conserving energy to O (  ² ) such symmetric symplectic integrators are manifestly area preserving and reversible

17 Wednesday, 24 June 2015A D Kennedy Symplectic Integrators: VI For each symplectic integrator there exists a nearby Hamiltonian H’ which is exactly conserved This is obtained by replacing commutators with Poisson brackets in the BCH formula For the PQP integrator we have Note that H’ cannot be written as the sum of a p-dependent kinetic term and a q-dependent potential term As H’ is conserved, δH is of O(δτ 2 ) for arbitrary length trajectories

18 Wednesday, 24 June 2015A D Kennedy Symplectic Integrators: VII Define and so that Multiple timescales Split the Hamiltonian into pieces Introduce a symmetric symplectic integrator of the form If then the instability in the integrator is tickled equally by each sub-stepinstability This helps if the most expensive force computation does not correspond to the largest force

19 Wednesday, 24 June 2015A D Kennedy Integrator Instability: Theory Consider a leapfrog integrator for free field theory The evolution is given by where This grows/oscillates with exponents

20 Wednesday, 24 June 2015A D Kennedy Integrator Instability: Data

21 Wednesday, 24 June 2015A D Kennedy Higher-Order Integrators: I Campostrini and Rossi introduced an integrator with arbitrarily high-order errors But the longest constituent step is longer than the overall step size, so integrator instabilities are worse Omelyan introduced an integrator to minimise the δτ error for a given number of sub-steps I. P. Omelyan, I. M. Mryglod and R. Folk, Comput. Phys. Commun. 151 (2003) 272 Tetsuya Takaishi and Philippe de Forcrand, “ Testing and tuning new symplectic integrators for Hybrid Monte Carlo algorithm in lattice QCD, ” hep-lat/ hep-lat/

22 Wednesday, 24 June 2015A D Kennedy Higher-Order Integrators: II These techniques help if the force is extensive (i.e., a bulk effect) Because the step size needs to be adjusted so that V δτ n is constant for a fixed HMC acceptance rate They do not help if the force is due to one (or a small number) of light modes Here the HMC acceptance goes to zero because the symplectic integrator becomes unstable for a single mode Hasenbusch's trick reduces the maximum force if it is due to noise coming from the pseudofermion fields But not if the intrinsic fermionic force contribution is large

23 Wednesday, 24 June 2015A D Kennedy Non-linearity of CG solver Suppose we want to solve A 2 x=b for Hermitian A by CG It is better to solve Ax=y, Ay=b successively Condition number  (A 2 ) =  (A) 2 Cost is thus 2  (A) <  (A 2 ) in general Suppose we want to solve Ax=b Why don’t we solve A 1/2 x=y, A 1/2 y=b successively? The square root of A is uniquely defined if A>0 This is the case for fermion kernels All this generalises trivially to n th roots No tuning needed to split condition number evenly How do we apply the square root of a matrix?

24 Wednesday, 24 June 2015A D Kennedy Rational matrix approximation Functions on matrices Defined for a Hermitian matrix by diagonalisation H = U D U -1 f (H) = f (U D U -1 ) = U f (D) U -1 Rational functions do not require diagonalisation  H m +  H n = U (  D m +  D n ) U -1 H -1 = U D -1 U -1

25 Wednesday, 24 June 2015A D Kennedy No Free Lunch Theorem We must apply the rational approximation with each CG iteration M 1/n  r(M) The condition number for each term in the partial fraction expansion is approximately  (M) So the cost of applying M 1/n is proportional to  (M) Even though the condition number  (M 1/n )=  (M) 1/n And even though  (r(M))=  (M) 1/n So we don’t win this way…

26 Wednesday, 24 June 2015A D Kennedy Pseudofermions We want to evaluate a functional integral including the fermionic determinant det M We write this as a bosonic functional integral over a pseudofermion field with kernel M -1

27 Wednesday, 24 June 2015A D Kennedy Multipseudofermions We are introducing extra noise into the system by using a single pseudofermion field to sample this functional integral This noise manifests itself as fluctuations in the force exerted by the pseudofermions on the gauge fields This increases the maximum fermion force This triggers the integrator instability This requires decreasing the integration step size A better estimate is det M = [det M 1/n ] n

28 Wednesday, 24 June 2015A D Kennedy Hasenbusch’s method Clever idea due to Hasenbusch Start with the Wilson fermion action M=1 -  H Introduce the quantity M’=1 -  ’H Use the identity M = M’(M’ -1 M) Write the fermion determinant as det M = det M’ det (M’ -1 M) Introduce separate pseudofermions for each determinant Adjust  ’ to minimise the cost Easily generalises More than two pseudofermions Wilson-clover action

29 Wednesday, 24 June 2015A D Kennedy Violation of NFL Theorem So let’s try using our n th root trick to implement multipseudofermions Condition number  (r(M))=  (M) 1/n So maximum force is reduced by a factor of n  (M) (1/n)-1 This is a good approximation if the condition number is dominated by a few isolated tiny eigenvalues This is so in the case of interest Cost reduced by a factor of n  (M) (1/n)-1 Optimal value n opt  ln  (M) So optimal cost reduction is (e ln  ) / 

30 Wednesday, 24 June 2015A D Kennedy Rational Hybrid Monte Carlo: I Generate pseudofermion from Gaussian heatbath RHMC algorithm for fermionic kernel Use accurate rational approximation Use less accurate approximation for MD,, so there are no double poles Use accurate approximation for Metropolis acceptance step

31 Wednesday, 24 June 2015A D Kennedy Rational Hybrid Monte Carlo: II Apply rational approximations using their partial fraction expansions Denominators are all just shifts of the original fermion kernel All poles of optimal rational approximations are real and positive for cases of interest (Miracle #1) Only simple poles appear (by construction!) Use multishift solver to invert all the partial fractions using a single Krylov space Cost is dominated by Krylov space construction, at least for O(20) shifts Result is numerically stable, even in 32-bit precision All partial fractions have positive coefficients (Miracle #2) MD force term is of the usual form for each partial fraction Applicable to any kernel

32 Wednesday, 24 June 2015A D Kennedy Comparison with R algorithm: I AlgorithmδtδtAB4B4 R (5) R (4) RHMC %1.57(2) Binder cumulant of chiral condensate, B 4, and RHMC acceptance rate A from a finite temperature study (2+1 flavour naïve staggered fermions, Wilson gauge action, V = 8 3 ×4, m ud = , m s = 0.25, τ= 1.0)

33 Wednesday, 24 June 2015A D Kennedy Comparison with R algorithm: II 20% change in renormalized quark mass “An exact algorithm is mandatory” (de Forcrand-Philipsen) 25% reduction in critical quark mass at Naïve Staggered Fermions, N f = 3, V = 8 3 x 4 Binder cumulant increases as step-size is reduced Step-size extrapolation is vital for R algorithm

34 Wednesday, 24 June 2015A D Kennedy Comparison with R algorithm: III RBC-Bielefeld P4 staggered fermions RHMC allows an O(10) increase in step-size Speedup greater as m ℓ → 0

35 Wednesday, 24 June 2015A D Kennedy Comparison with R algorithm: IV Wuppertal—Budapest Stout smeared staggered, V = 16 4, m π = 320 MeV Subtraction required for equation of state and order of the transition At finite step-size error ~ magnitude of subtraction RHMC is order of magnitude faster than the R algorithm Order of transition in continuum limit at physical quark masses for the first time

36 Wednesday, 24 June 2015A D Kennedy Comparison with R algorithm: V Algorithmm ud msms δtδt AP R (2) R (1) R RHMC % (1) RHMC % (1) The different masses at which domain wall results were gathered, together with the step-sizes δt, acceptance rates A, and plaquettes P (V = 16 3 ×32×8, DBW2 gauge action, β = 0.72) The step-size variation of the plaquette with m ud =0.02

37 Wednesday, 24 June 2015A D Kennedy Comparison with R algorithm: VI The integrated autocorrelation time of the 13 th time-slice of the pion propagator from the domain wall test, with m ud = 0.04

38 Wednesday, 24 June 2015A D Kennedy Multipseudofermions with multiple timescales Semiempirical observation: The largest force from a single pseudofermion does not come from the smallest shift For example, look at the numerators in the partial fraction expansion we exhibited earlierpartial fraction expansion we exhibited earlier Use a coarser timescale for expensive smaller shifts Invert small shifts less accurately Cannot use chronological inverter with multishift solver anyhow

39 Wednesday, 24 June 2015A D Kennedy Performance Comparison κ RHMCUrbach et al.Orth et al ̶ V = 24 3 x 32, β = 5.6, N f = 2, Wilson fermions Cost in units of A plaq x N MV x 10 4

40 Wednesday, 24 June 2015A D Kennedy DWF (RBRC—UKQCD) Mass (Hasenbusch) preconditioning using s quark Use multiple timescale integrator Gauge, triple strange, light CG count reduced by factor of 10 CPU time reduced by factor of 6 Light quarks cost about 10% of total Cost has weak mass dependence 2+1 Flavour determinant

41 Wednesday, 24 June 2015A D Kennedy 2+1 ASQTAD Staggered Fermions Mass is just a shift for staggered fermions Mass preconditioning using s quark

42 Wednesday, 24 June 2015A D Kennedy 2+1 ASQTAD Staggered Fermions Use multiple timescales Gauge, triple strange, light Dominant cost from triple strange Operator derivative cost » CG cost Further mass preconditioning detrimental Use n th root trick on triple strange Optimum solution uses mass preconditioning and n th root trick Test at current run parameters V = 24 3 × 64, β = 6.76, m ℓ = 0.005, m s = 0.05 Speed up factor 8 over R algorithm and exact

43 Wednesday, 24 June 2015A D Kennedy Berlin Wall Comparison of cost of fermion algorithms N f = 2+1 DWF RHMC (RBC-UKQCD) N f = 2 mass preconditioned Wilson (Urbach et al.) N f = 2 mass preconditioned Clover (QCDSF) N f = 2+1 mass preconditioned Clover + RHMC (Wuppertal-Jülich) N f = 2 mass preconditioned Twisted Mass (ETM) N f = 2+1 ASQTAD R (MILC) N f = 2+1 ASQTAD RHMC (Clark-Kennedy) All data scaled to V = 24 3 × 40, a = 0.08 Cost for generating 10 3 independent configurations Independent plaquette measurements

44 Wednesday, 24 June 2015A D Kennedy Berlin Wall

45 Wednesday, 24 June 2015A D Kennedy Conclusions (RHMC) Advantages of RHMC Exact No step-size errors; no step-size extrapolations Significantly cheaper than the R algorithm Allows easy implementation of Hasenbusch (multipseudofermion) acceleration Combination of both can be helpful Further improvements possible Such as multiple timescales for different terms in the partial fraction expansion Disadvantages of RHMC ???