betaFeedback

WorksPhysics and Astronomy

H-AMR: A New GPU-accelerated GRMHD Code for Exascale Computing With 3D Adaptive Mesh Refinement and Local Adaptive Time-stepping

Abstract

General-relativistic magnetohydrodynamic (GRMHD) simulations have revolutionized our understanding of black hole accretion. Here, we present a graphics processing unit (GPU) accelerated GRMHD code \hammer{} with multi-faceted optimizations that, collectively, accelerate computation by 2-5 orders of magnitude for a wide range of applications. Firstly, it introduces a spherical grid with 3D adaptive mesh refinement that operates in each of the 3 dimensions independently. This allows us to circumvent the Courant condition near the polar singularity, which otherwise cripples high-resolution computational performance. Secondly, we demonstrate that local adaptive time-stepping (LAT) on a logarithmic spherical-polar grid accelerates computation by a factor of ≲10\lesssim10 compared to traditional hierarchical time-stepping approaches. Jointly, these unique features lead to an effective speed of ∼109\sim10^9 zone-cycles-per-second-per-node on 5,400 NVIDIA V100 GPUs (i.e., 900 nodes of the OLCF Summit supercomputer). We illustrate \hammer{}'s computational performance by presenting the first GRMHD simulation of a tilted thin accretion disk threaded by a toroidal magnetic field around a rapidly spinning black hole. With an effective resolution of 1313,440×4440\times4,608×8608\times8,092092 cells, and a total of ≲22\lesssim22 billion cells and ∼0.65×108\sim0.65\times10^8 timesteps, it is among the largest astrophysical simulations ever performed. We find that frame-dragging by the black hole tears up the disk into two independently precessing sub-disks. The innermost sub-disk rotation axis intermittently aligns with the black hole spin, demonstrating for the first time that such long-sought alignment is possible in the absence of large-scale poloidal magnetic fields.

Introduction

GRMHD simulations in conjunction with radiative transfer calculations provide arguably the most direct link between the physical laws describing the motion of gas and magnetic fields near black holes (BHs), and the observed phenomenology of accretion disks and jets in astrophysical black hole systems. Initially, the numerical work focused on the geometrically-thick radiatively inefficient accretion flows (RIAFs, e.g., Narayan & Yi [89] (1995)), with the accretion typically proceeding in the equatorial plane of a spinning black hole (e.g., [25, 51, 75, 73, 50, 6 b]). Geometrically-thin accretion discs (Shakura & Sunyaev [115]) are many orders of magnitude more luminous than RIAFs (e.g. Sikora et al. [117]; Jones et al. [56]) and thought to be responsible for most of the BH growth. Over time, it became possible for the simulations to resolve not only the small thickness of thin disks but also the smaller length scales generated by the magnetized turbulence ([114, 99] (Noble et al. 2010)), which is powered by the magnetorotational instability (MRI, [3]).

However, recently, evidence has emerged that much higher resolutions than currently achievable by state-of-the-art simulations (e.g., Nr×Nθ×Nφ=2563N_r \times N_\theta\times N_\varphi= 256^3 cells, where NiN_i is the number of cells in the ii-th direction) are needed to properly resolve disk turbulence in global simulations of magnetized black hole accretion. Namely, a key GRMHD code comparison project ([102]) found that even the resolution of 3843384^3 cells is insufficient to reach convergence in the critical parameters such as the value of the effective α\alpha-viscosity generated by the magnetized turbulence. To make matters worse, typically the timescales covered by GRMHD simulations falls short by order(s) of magnitude compared to observationally-interesting timescales, e.g., the timescale to Corresponding author: Matthew Liska

link text generate and advect large-scale poloidal magnetic fields from large radii [67], to propagate active galactic nuclei (AGN) jets to galaxy scales (e.g McKinney 2006; Chatterjee et al. 2019; Lalakos et al. 2022), and to evolve tidal disruption events for a fallback time [e.g. 116, 23, 1].

Observations and theoretical arguments furthermore suggest that accretion systems lack symmetries often taken for granted in GRMHD simulations. For instance, an accretion disk is typically misaligned with respect to the black hole spin axis [e.g. 52, 46, 128, 58, 15, 14], but this is often not taken into account for expedience. Such a tilt will, however, significantly change the disk dynamics and the black hole spin evolution [e.g. 5, 98, 55, 97, 70, 93].

In fact, the dragging of inertial frames by the spinning black holes causes tilted disks to precess, which can lead to interesting periodic time variability [e.g. 38, 39, 69, 93, 91]. To understand its potential connection to quasi-periodic oscillations (QPOs, [120, 53, 54, 57, 85]) observed in the lightcurves of X-ray binaries (XRBs; [e.g. 127, 126]), and whether similar variability can be present in AGN, requires even costlier simulations with even longer runtimes. If such simulations were possible, QPOs could possibly be exploited to independently verify black hole spin measurements and provide unique constraints on the disk geometry [e.g. 39, 93] (Liska et al. 2019b).

Indeed, the extremely high resolution and long runtime required to tackle these problems is prohibitive, limiting our ability to understand black hole accretion and its effect, or feedback, on the surrounding ambient medium. The simulation cost scales very steeply with the thickness of the disk, as (h/r)−5(h/r)^{-5} with an adaptive mesh [and as (h/r)−6(h/r)^{-6} without an adaptive mesh, § 3.4]. For example, to go from a typical thick, h/r∼0.3h/r \sim0.3, low-luminosity accretion disk [89] to a typical thin luminous quasar disk that is about an order of magnitude thinner, h/r∼0.03h/r \sim0.03 [115]. All together, a thin, tilted disk would increase the cost of a simulation by a factor of 105−10610^{5}-10^{6}, requiring orders of magnitude more computational power than presently feasible. It is therefore one of the most urgent challenges to improve the performance of GRMHD codes and adaptive mesh refinement (AMR) frameworks to bridge this performance gap.

One interesting way of accelerating MHD simulations is to use special hardware such as graphics processing units (GPU). Since GPUs dedicate a much larger fraction of their transistors to raw floating point power compared to central processing units (CPUs), they can be much faster. However, writing efficient code on GPUs is challenging because GPUs require a high level of parallelism and have relatively small caches and low memory bandwidth compared to CPUs. In recent years several groups have utilised GPU-acceleration in astrophysical MHD codes. For example K-ATHENA [47], a GPU-accelerated version of Athena++ [122], achieves a factor ∼10\sim10 speedup on an NVIDIA V100 GPU compared to a 20-core Intel Skylake CPU. The same authors have also demonstrated excellent scale-ability on OLCF Summit, the largest GPU cluster in production at the time of writing. Similar speedups (factor ∼10\sim10) were obtained by the GAMER-2 MHD code [113], and the HORIZON [131] and cuHARM [9] GRMHD codes. While a factor ∼10\sim10 speedup makes existing simulations faster, it is insufficient to attack black hole accretion in the challenging regimes discussed above.

To tackle this problem, we adopt a multi-faceted approach that uses (i) a highly optimized code capable of running both on central processing units (CPUs) and graphical processing units (GPUs), and (ii) a custom-built advanced AMR framework. Namely, we describe various optimizations that we implemented in our new GRMHD code H-AMR (pronounced “hammer”) that speed up GRMHD simulations by 2 to 5 orders of magnitude for the especially challenging problems discussed above. In § 2 we introduce our code and in § 3 we describe our algorithmic advances – 3D AMR and local and global adaptive timestepping (LAT) – that provide the bulk of H-AMR’s algorithmic speedup. In § 3 we describe hardware-specific optimizations on both CPUs and GPUs. In § 4 we show benchmarks for various generations of CPUs and GPUs, and in § 4 we present the largest ever 3D GRMHD simulation, including the scaling tests, run on OLCF Summit. We summarize our results and provide an outlook for the future development of H-AMR in § 8.

Numerical Scheme

H-AMR originally branched out from an open-source HARMPI code [123], which derives from publicly available HARM2D code [41, 94]. H-AMR solves the ideal GRMHD equations in the conservative form. These do not explicitly include any resistive or viscous terms. Instead, H-AMR relies on numerical dissipation from Riemann solvers to arrive at a physical solution when dissipation is necessary. This is a reasonable approximation since dissipation typically occurs on spatial scales much smaller than what can be resolved numerically in global GRMHD simulations.

Recently, H-AMR has also incorporated a radiation module [e.g. 68] which uses the M1 approximation (e.g. Levermore 1984; McKinney et al. 2013) and can take into account thermal decoupling between ions and electrons [e.g. 103]. We leave the description and validation of our radiation module to a future publication.

Riemann Solvers, Spatial Reconstruction and Time Integration

H-AMR uses a finite volume shock-capturing Godunov-based HLLE Riemann solver [49]. To calculate the HLLE fluxes we use an approximation for the fast-wave speed, vfv_f [e.g. 41]. This overestimates vfv_f by up to a factor 2 in rare circumstances, which results in additional numerical dissipation, but allows for an analytic solution. Although H-AMR has the option to solve for the full dispersion relation, we do not describe this feature here since it did not significantly increase the accuracy. In addition to the 2-wave HLLE solver, we have implemented the 3-wave HLLC [81, 82] and 5-wave HLLD [84] solvers by transforming the Riemann problem into a locally flat Minkowski frame [100, 2, 129]. However, since these less-diffusive solvers can produce numerical artifacts in highly magnetized regions, we will report on their implementation once these issues are fully resolved.

If intercell fluxes are treated as Riemann problems without any spatial reconstruction, this leads to 1st order spatial accuracy. However, in smooth flows it is possible to reconstruct the left and right states of the Riemann problem to achieve a higher order of convergence. In H-AMR we use piecewise parabolic, second order, accurate spatial reconstruction of ‘primitive’ cell variables (PPM, Colella & Woodward 1984) on cell faces with an optional shock flattener. Our implementation of PPM does not take into account non-uniform grid spacing [e.g. 80], but we are considering this for future work. In the GRMHD community-wide code comparison project [102] we found PPM to be significantly more accurate than other 2nd order reconstruction schemes (MINMOD and MC, [61]).

The conserved quantities (UU) are evolved in time by advancing their state from tnt^n to tn+1/2t^{n+1/2} in a predictor step, and then using the fluxes calculated at tn+1/2t^{n+1/2} to advance the state from tnt^n to tn+1t^{n+1} in a corrector (full) step. The timestep for our midpoint method is limited by the fast wave speed in the coordinate frame through the Courant et al. [22] condition. We set Δt=C0/(1/Δt1+1/Δt2+1/Δt3)\Delta t=C_0/(1/\Delta t^1+1/\Delta t^2+1/\Delta t^3). Here Δti=Δxi/vf\Delta t^i=\Delta x^i/v_f is the time it takes a fast wave to cross a cell of size Δxi\Delta x^i in the ii-th direction and C0C_0 is the Courant factor that we typically set to C0∼0.7C_0\sim0.7–0.90.9. Our time integration is similar to the VL2 scheme described in Stone & Gardiner [121], but we use spatial reconstruction of variables for both the predictor and corrector steps. This formally does not guarantee that the scheme is total variation diminishing (TVD), but in practice produces more accurate results. In the future, we plan to explore higher order time integration schemes that are strong stability preserving (SSP), including 3rd3^{rd} and 4th4^{th} order Runge-Kutta schemes. These might provide additional stability that will be necessary for less diffusive Riemann solvers [e.g. 84] and higher order spatial reconstruction schemes [e.g. 124].

Coordinate System and Metric

Since H-AMR solves equations of motion in a covariant form, any smoothly varying coordinate system (and metric) can be chosen. In this work the grid is uniform in modified spherical coordinates which are defined as x0≡t,x1≡log⁡r,x2≡θ,x3≡φx^0\equiv t,x^1\equiv\log r,x^2\equiv\theta,x^3\equiv\varphi. This grid extends from an inner spherical radius RinR_{\rm in}, which is located just inside the event horizon, out to an outer radius RoutR_{\rm out}. We choose RinR_{\rm in} such that there are at least ≳5\gtrsim5 cells between RinR_{\rm in} and the event horizon and usually set Rout=104rgR_{\rm out}=10^4r_g or larger. This ensures that both of the radial boundaries do not affect the physical evolution of the system.

The warping of space-time is described in H-AMR by a metric tensor gμνg_{\mu\nu}, with lapse α=1/−g00\alpha=1/\sqrt{-g^{00}}, shift βi=g0i\beta^i=g^{0i}, and determinant g=Det⁡(gμν)g=\operatorname{Det}(g_{\mu\nu}). We use (μ,ν)(\mu,\nu) as indices for 4-dimensional and (i,j)(i,j) as indices for 3-dimensional objects. Γ=−uμnμ=αut\Gamma=-u^\mu n_\mu=\alpha u^t is the Lorentz factor corresponding to 4-velocity uμu^\mu as measured by the Zero-Angular-Momentum-Observer (ZAMO) with 4-velocity nμ=(−α,0,0,0)n_\mu=(-\alpha,0,0,0). The spatial projection tensor γμν\gamma^\mu{}_\nu is defined as γμν=δμν+nμnν\gamma^\mu{}_\nu=\delta^\mu{}_\nu+n^\mu n_\nu and the 4-dimensional Levi-Civita symbol is ϵμνλδ\epsilon^{\mu\nu\lambda\delta}.

In this work we use a Kerr space-time (unless stated otherwise). We first calculate the Kerr metric tensor analytically in Kerr-Schild coordinates and then transform it numerically to give gμνg_{\mu\nu} in internal coordinates. The corresponding Christoffel symbols, Γμνζ\Gamma^\zeta_{\mu\nu}, are calculated numerically by taking finite differences of the metric in internal coordinates.

Primitive Variables

We express the conservation laws that H-AMR evolves (§ 2.4) in terms of fluid frame gas density ρ\rho, internal energy density ugu_g, gas pressure pgp_g, fluid-frame magnetic 4-vector bμb^\mu, and fluid 4-velocity uμu^\mu. These relate to the primitive variables ρ\rho, ugu_g, relative 4-velocity u~i\tilde{u}^i and coordinate frame magnetic field BiB^i as follows (e.g. Noble et al. [94]):

bi=Bi+btuiu0(1)b^i = \frac{B^i+b^t u^i}{u^0} \tag*{(1)}
bt=giμBiuμ(2)b^t = g_{i\mu}B^i u^\mu \tag*{(2)}
u~i=γμiuμ=ui+βiαΓ(3)\tilde{u}^i = \gamma^i_\mu u^\mu= u^i + \frac{\beta^i}{\alpha}\Gamma \tag*{(3)}

The relative 4-velocity u~i\tilde{u}^i is numerically convenient because it guarantees that uμuμ=−1u^\mu u_\mu=-1 for any value of u~i\tilde{u}^i. In H-AMR we store the primitive variables at cell centers. In this manuscript we adopt an ideal gas equation of state with pg=(γ−1)ugp_g=(\gamma-1)u_g and Lorentz-Heaviside units, G=M=c=1G=M=c=1. The stress energy tensor TνμT^\mu_\nu, Faraday tensor FμνF^{\mu\nu}, dual of the Faraday tensor F∗μνF^{*\mu\nu}, and entropy tracer κ\kappa are given by:

Tνμ=(ρ+ug+pg)uμuν+gνμ(pg+12b2)−bμbν(4)T^\mu_\nu=(\rho+u_g+p_g)u^\mu u_\nu+g^\mu_\nu\left(p_g+\frac{1}{2}b^2\right)-b^\mu b_\nu \tag*{(4)}
Fμν=−−gϵμνλδuλbδ(5)F^{\mu\nu}=-\sqrt{-g}\epsilon^{\mu\nu\lambda\delta}u_\lambda b_\delta \tag*{(5)}
F∗μν=bμuν−bνuμ(6)F^{*\mu\nu}=b^\mu u^\nu-b^\nu u^\mu \tag*{(6)}
κ=pgργ(7)\kappa=\frac{p_g}{\rho^\gamma} \tag*{(7)}

The coordinate frame magnetic field BiB^i and electric field EiE^i are related to the (dual of the) Faraday tensor as follows:

Bi=F∗it(8)B^i=F^{*it} \tag*{(8)}
Ei=Fit(9)E^i=F^{it} \tag*{(9)}

Conservation laws

H-AMR evolves the mass (eq. 10), energy (eq. 11), momentum (eq. 12), induction (eq. 13), and entropy (eq. 14) equations. The derivation of these equations from the relativistic Boltzmann equation can be found in standard textbooks including Misner et al. [86] and Rezzolla & Zanotti [105]. Here we express these equations in covariant form where ∇μ\nabla_\mu denotes a covariant derivative:

∇μ(ρuμ)=0(10)\nabla_\mu(\rho u^\mu)=0 \tag*{(10)}
∇μ(Ttμ)=0(11)\nabla_\mu(T^\mu_t)=0 \tag*{(11)}
∇μ(Tiμ)=0(12)\nabla_\mu(T^\mu_i)=0 \tag*{(12)}
∇μ(F∗μν)=0(13)\nabla_\mu(F^{*\mu\nu})=0 \tag*{(13)}
∇μ(κρuμ)=0(14)\nabla_\mu(\kappa\rho u^\mu)=0 \tag*{(14)}

For numerical reasons, we subtract the mass conservation equation from the energy equation, i.e. H-AMR actually evolves ∇μ(Ttμ+ρuμ)=0\nabla_\mu(T^\mu_t+\rho u^\mu)=0 instead of equation 11.

Discretisation

Figure 1 shows how we evolve the conservation laws (eq. 10-14) on a numerical grid with cell indices (i,j,k)(i,j,k) and uniform cell sizes of (Δx1,Δx2,Δx3)(\Delta x^1,\Delta x^2,\Delta x^3). We absorb a geometric factor, −g\sqrt{-g}, into the definitions for the volume integrated conserved state Uˉ=U−g\bar{U}=U\sqrt{-g}, volume integrated source terms Qˉ=Q−g\bar{Q}=Q\sqrt{-g}, and area integrated fluxes in the jj-th direction Fˉj=Fj−g\bar{F}^j=F^j\sqrt{-g}. This factor is calculated at the center of each cell for cell-centered quantities and at the center of each face for face-centered quantities in internal coordinates. This is an easy and fast method but slightly less accurate (albeit still 2nd2^\text{nd} order) than explicitly integrating the volume and area over each cell to account for non-uniform grid spacing (e.g. Porth et al. [101]).

Illustration of a cell in the $(x^1,x^2)$ plane in H-AMR

Figure 1. An illustration of a cell in the (x1,x2)(x^1,x^2) plane in H-AMR. The conserved quantities UU are stored at cell centers, the fluxes F1,2F^{1,2} and staggered magnetic field components B1,2B^{1,2} are stored at cell faces and the electric fields E3E^3 are stored at cell edges. The corresponding metric components gμνg_{\mu\nu} are stored for cell centers, cell faces, and cell corners. The conserved states are calculated directly from the primitive variables. The fluxes are calculated from the reconstructed primitive variables in a Riemann solver. The electric fields are calculated (in their most simple form) by taking an average of the neighbouring fluxes. Typically, H-AMR modifies the calculation of the electric fields with a velocity upwinding routine as described in Gardiner & Stone [42].

In H-AMR, the vector U=(ρut,Ttt,Tit,Bi,κρut)U=(\rho u^t,T^t_t,T^t_i,B^i,\kappa\rho u^t) is calculated directly at cell centers from the primitive variables, while Fˉj=(ρuj,Ttj+ρuj,Tij,bjui−biuj,κρuj)\bar{F}^j=(\rho u^j,T^j_t+\rho u^j,T^j_i,b^j u^i-b^i u^j,\kappa\rho u^j) is calculated at cell faces from the reconstructed primitive variables using a Riemann solver. The equations of motions take the conservative form, ∂Uˉ∂t+∂Fˉj∂xj=Qˉ\frac{\partial\bar{U}}{\partial t}+\frac{\partial\bar{F}^j}{\partial x^j}=\bar{Q}. With these definitions we can write down the equations of motion in conservative form for the full time step:

Uˉi,j,kn+1−Uˉi,j,knΔt−(Fˉ1)i+1/2,j,kn+1/2−(Fˉ1)i−1/2,j,kn+1/2Δx1−(Fˉ2)i,j+1/2,kn+1/2−(Fˉ2)i,j−1/2,kn+1/2Δx2−(Fˉ3)i,j,k+1/2n+1/2−(Fˉ3)i,j,k−1/2n+1/2Δx3+Qˉi,j,kn+1/2=0(15)\frac{\bar{U}^{n+1}_{i,j,k}-\bar{U}^{n}_{i,j,k}}{\Delta t} -\frac{\left(\bar{F}^{1}\right)^{n+1/2}_{i+1/2,j,k}-\left(\bar{F}^{1}\right)^{n+1/2}_{i-1/2,j,k}}{\Delta x^1} -\frac{\left(\bar{F}^{2}\right)^{n+1/2}_{i,j+1/2,k}-\left(\bar{F}^{2}\right)^{n+1/2}_{i,j-1/2,k}}{\Delta x^2} -\frac{\left(\bar{F}^{3}\right)^{n+1/2}_{i,j,k+1/2}-\left(\bar{F}^{3}\right)^{n+1/2}_{i,j,k-1/2}}{\Delta x^3} +\bar{Q}^{n+1/2}_{i,j,k}=0 \tag*{(15)}

In the simplest case, the source term Qˉ\bar{Q} accounts for the warping of the space-time and grid (e.g. Qˉi=ΓiνtTtν−g\bar{Q}_i=\Gamma^t_{i\nu}T^\nu_t\sqrt{-g} for the momentum equation), but it may also include physical processes such as nuclear heating, gas-radiation interactions, and Coulomb coupling (e.g. Liska et al. [68]).

According to Stoke’s theorem, to guarantee the divergence-free evolution of the magnetic field the induction equation is evolved on a staggered mesh (e.g. Evans & Hawley [28]). Here, the face-centered magnetic field is advanced in time by taking finite differences in space of the edge-centered electric fields, as we show in Figure 1:

(Bˉ1)i−12,j,kn+1−(Bˉ1)i−12,j,knΔt=(Eˉ2)i−12,j,k+12n+12−(Eˉ2)i−12,j,k−12n+12Δx3−(Eˉ3)i−12,j+12,kn+12−(Eˉ3)i−12,j−12,kn+12Δx2(16)\frac{(\bar{B}^{1})^{n+1}_{i-\frac{1}{2},j,k}-(\bar{B}^{1})^{n}_{i-\frac{1}{2},j,k}}{\Delta t} = \frac{(\bar{E}^{2})^{n+\frac{1}{2}}_{i-\frac{1}{2},j,k+\frac{1}{2}}-(\bar{E}^{2})^{n+\frac{1}{2}}_{i-\frac{1}{2},j,k-\frac{1}{2}}}{\Delta x^{3}} - \frac{(\bar{E}^{3})^{n+\frac{1}{2}}_{i-\frac{1}{2},j+\frac{1}{2},k}-(\bar{E}^{3})^{n+\frac{1}{2}}_{i-\frac{1}{2},j-\frac{1}{2},k}}{\Delta x^{2}} \tag*{(16)}
(Bˉ2)i,j−12,kn+1−(Bˉ2)i,j−12,knΔt=(Eˉ3)i+12,j−12,kn+12−(Eˉ3)i−12,j−12,kn+12Δx1−(Eˉ1)i,j−12,k+12n+12−(Eˉ1)i,j−12,k−12n+12Δx3(17)\frac{(\bar{B}^{2})^{n+1}_{i,j-\frac{1}{2},k}-(\bar{B}^{2})^{n}_{i,j-\frac{1}{2},k}}{\Delta t} = \frac{(\bar{E}^{3})^{n+\frac{1}{2}}_{i+\frac{1}{2},j-\frac{1}{2},k}-(\bar{E}^{3})^{n+\frac{1}{2}}_{i-\frac{1}{2},j-\frac{1}{2},k}}{\Delta x^{1}} - \frac{(\bar{E}^{1})^{n+\frac{1}{2}}_{i,j-\frac{1}{2},k+\frac{1}{2}}-(\bar{E}^{1})^{n+\frac{1}{2}}_{i,j-\frac{1}{2},k-\frac{1}{2}}}{\Delta x^{3}} \tag*{(17)}
(Bˉ3)i,j,k−12n+1−(Bˉ3)i,j,k−12nΔt=(Eˉ1)i,j+12,k−12n+12−(Eˉ1)i,j−12,k−12n+12Δx2−(Eˉ2)i+12,j,k−12n+12−(Eˉ2)i−12,j,k−12n+12Δx1(18)\frac{(\bar{B}^{3})^{n+1}_{i,j,k-\frac{1}{2}}-(\bar{B}^{3})^{n}_{i,j,k-\frac{1}{2}}}{\Delta t} = \frac{(\bar{E}^{1})^{n+\frac{1}{2}}_{i,j+\frac{1}{2},k-\frac{1}{2}}-(\bar{E}^{1})^{n+\frac{1}{2}}_{i,j-\frac{1}{2},k-\frac{1}{2}}}{\Delta x^{2}} - \frac{(\bar{E}^{2})^{n+\frac{1}{2}}_{i+\frac{1}{2},j,k-\frac{1}{2}}-(\bar{E}^{2})^{n+\frac{1}{2}}_{i-\frac{1}{2},j,k-\frac{1}{2}}}{\Delta x^{1}} \tag*{(18)}

We approximate the edge centered electric field by taking the average of the face-centered HLL fluxes (Fˉj(Bi)=Fˉ∗ji−g)(\bar{F}^{j}(B^{i})=\bar{F}^{*ji}\sqrt{-g}) over 4 neighbouring cells:

(Eˉ1)i,j−12,k−12=0.25[Fˉ3(B2)i,j,k−12+Fˉ3(B2)i,j−1,k−12−Fˉ2(B3)i,j−12,k−1−Fˉ2(B3)i,j−12,k](19)(\bar{E}^{1})_{i,j-\frac{1}{2},k-\frac{1}{2}}=0.25\left[\bar{F}^{3}(B^{2})_{i,j,k-\frac{1}{2}}+\bar{F}^{3}(B^{2})_{i,j-1,k-\frac{1}{2}}-\bar{F}^{2}(B^{3})_{i,j-\frac{1}{2},k-1}-\bar{F}^{2}(B^{3})_{i,j-\frac{1}{2},k}\right] \tag*{(19)}
(Eˉ2)i−12,j,k−12=0.25[Fˉ1(B3)i−12,j,k−1+Fˉ1(B3)i−12,j,k−Fˉ3(B1)i,j,k−12−Fˉ3(B1)i−1,j,k−12](20)(\bar{E}^{2})_{i-\frac{1}{2},j,k-\frac{1}{2}}=0.25\left[\bar{F}^{1}(B^{3})_{i-\frac{1}{2},j,k-1}+\bar{F}^{1}(B^{3})_{i-\frac{1}{2},j,k}-\bar{F}^{3}(B^{1})_{i,j,k-\frac{1}{2}}-\bar{F}^{3}(B^{1})_{i-1,j,k-\frac{1}{2}}\right] \tag*{(20)}
(Eˉ3)i−12,j−12,k=0.25[Fˉ2(B1)i−1,j−12,k+Fˉ2(B1)i,j−12,k−Fˉ1(B2)i−12,j,k−Fˉ1(B2)i−12,j−1,k](21)(\bar{E}^{3})_{i-\frac{1}{2},j-\frac{1}{2},k}=0.25\left[\bar{F}^{2}(B^{1})_{i-1,j-\frac{1}{2},k}+\bar{F}^{2}(B^{1})_{i,j-\frac{1}{2},k}-\bar{F}^{1}(B^{2})_{i-\frac{1}{2},j,k}-\bar{F}^{1}(B^{2})_{i-\frac{1}{2},j-1,k}\right] \tag*{(21)}

In addition, H-AMR upwinds these electric fields to add extra dissipation, which prevents unphysical oscillations in multi-dimensional flows (e.g. Gardiner & Stone [42]; White et al. [129]).

To convert the face-centered magnetic field components to cell-centered magnetic field components we take volume-weighted averages in internal coordinates:

(Bˉ1)i,j,k=(Bˉ1)i−12,j,k+(Bˉ1)i+12,j,k2(22)(\bar{B}^{1})_{i,j,k}=\frac{(\bar{B}^{1})_{i-\frac{1}{2},j,k}+(\bar{B}^{1})_{i+\frac{1}{2},j,k}}{2} \tag*{(22)}
(Bˉ2)i,j,k=(Bˉ2)i,j−12,k+(Bˉ2)i,j+12,k2(23)(\bar{B}^{2})_{i,j,k}=\frac{(\bar{B}^{2})_{i,j-\frac{1}{2},k}+(\bar{B}^{2})_{i,j+\frac{1}{2},k}}{2} \tag*{(23)}
(Bˉ3)i,j,k=(Bˉ3)i,j,k−12+(Bˉ3)i,j,k+122(24)(\bar{B}^{3})_{i,j,k}=\frac{(\bar{B}^{3})_{i,j,k-\frac{1}{2}}+(\bar{B}^{3})_{i,j,k+\frac{1}{2}}}{2} \tag*{(24)}

Variable Inversion

In H-AMR, the conversion of conserved variables UU to primitive variables pp is performed using a 2-dimensional Newton-Raphson root-finding method (Noble et al. [94]) or Aitken acceleration scheme (Hamlin & Newman [48]; Newman & Hamlin [92]). To provide a backup inversion method for primitive variable recovery if the energy-based inversion method(s) fail, H-AMR also evolves the entropy equation (eq. (14)), which is then used in place of the energy equation (eq. (11)) to recover the primitive variables (Noble et al. 2009). To our experience, most of the inversion failures occur in highly magnetized regions such as jets where the lack of shock heating and magnetic reconnection does not have significant effects on the dynamics since ugu_g is subdominant (e.g. [18]. In fact, evolving the entropy gives us the conservative (lower limit) estimate of the internal energy. Note that since the total entropy per particle is given by S=1γ−1ln⁡κS = \frac{1}{\gamma-1}\ln\kappa, evolving U=κρutU = \kappa\rho u^\mathrm{t} instead of U=SρutU = S\rho u^\mathrm{t} does not conserve entropy to machine precision. However, it avoids numerical issues (e.g. [111]) associated with evolving logarithms, which, to our experience, makes the scheme more robust.

Density and Internal Energy Floors

Magnetic field lines in the polar regions (those that thread the black hole’s event horizon) become devoid of matter: the gas is either expelled outwards or consumed by the black hole. Because GRMHD equations are vacuum-phobic, H-AMR artificially injects mass and internal energy in the drift frame of the jet if the density or internal energy drop below a certain threshold ([104]). This avoids both a runaway in velocity, which can occur when mass is inserted in the fluid frame, and a drag on the field lines, which can occur when mass is inserted in a zero angular momentum observer (ZAMO) frame ([76]). For this particular work we enforce b2/ρ<50b^2/\rho< 50, b2/ug<750b^2/u_g < 750, ρ>10−7/r2\rho> 10^{-7}/r^2, and ug>10−9/r10/3u_g > 10^{-9}/r^{10/3} for the gas density ρ\rho and internal energy ugu_g.

Numerical Optimizations

H-AMR is written in C and triple parallelized: (i) CUDA or OpenCL does most of the computations on GPUs or AVX accelerated CPUs, (ii) OpenMP routines handle communication and gridding, and (iii) non-blocking MPI handles the transfer of boundary cells between nodes. NVLINK is used for transfers between GPUs on a single node and GPU-DIRECT for MPI transfers between GPUs on different nodes. We found this improves the performance by up to 20% on large GPU clusters.

H-AMR employs limited communication-computation overlap by (un)packing the data into send/receive buffers and applying boundary conditions in parallel with (non-blocking) MPI send/receive calls for other SMR/AMR blocks. This is made possible by using a separate CUDA stream for each block. H-AMR also features fully non-blocking MPI-parallelized I/O, allowing substantial overlap between computation and data transfer. Data is stored in binary format. Since individual dump files can reach 102−10310^2 - 10^3 GB in size, we use OpenMP parallelized C kernels coupled to a Python script to post-process the data. These analysis tools also allow the user to load in data at reduced resolutions for post-processing.

Memory to store all variables (primitive, conserved, fluxes etc.) is dynamically allocated on both the CPU and GPU at the start of each run. During each (de-)refinement and load balancing step, C pointers are used to keep track of the physical location in memory of each SMR/AMR block. This avoids needing to allocate and deallocate large chunks of memory.

GPU Acceleration in CUDA

H-AMR is the first GPU-accelerated GRMHD code that has ran on 1000s of GPUs. While CPUs spend the largest portion of their silicon on control logic and caches, GPUs spend most of their silicon on floating point power. This presents unique challenges in optimizing complex MHD codes (e.g. [47]). Hence, H-AMR follows the philosophy of keeping the code as simple as possible, avoiding abstract concepts such as classes, extra function layers and 3-dimensional arrays, which makes it easy for the CUDA compiler to generate highly efficient code. In comparison to the GPU-accelerated (GR)MHD codes KHARMA (Prather et al., in prep) and K-ATHENA ([47]), which use KOKKOS ([16]), we chose to implement the GRMHD equations directly into NVIDIA’s CUDA. KOKKOS is a performance portability toolkit that can compile existing C code on various architectures. While KOKKOS increases the performance portability of a code across various architectures, it is unlikely to be able to match the performance of a highly optimized CUDA code that makes extensive use of NVIDIA specific optimizations.

It was challenging to develop the GPU version of H-AMR due to the large code size (over 40,000 lines of C code and 10,000 lines of CUDA kernel code). This made it difficult to fit all necessary instructions and variables into the GPU’s register space. Failing to fit the code into the available register space would slow down the performance by an order of magnitude, because the GPU would need to use the much slower GPU RAM to read and store temporary data. Kernels in many conventional codes are rather small and do not fill up the GPU register space easily. GRMHD codes, however, need to store metric components of curved space-time of a black hole and require non-linear root finding to convert conserved to primitive quantities (e.g. [94]). For this reason, fitting the GRMHD equations required many profiler-informed optimizations based on an iterative trial-and-error approach. It was, for example, beneficial to split the code into extra kernels to recalculate certain quantities instead of storing them in temporary variables using register space. This profiler-based optimization strategy has substantially increased the performance of H-AMR since 2016. The first 2016 version of H-AMR was memory bandwidth limited because of significant register spillover to global memory. Eventually we reduced the required memory bandwidth and increased H-AMR’s performance 5-fold by rewriting various functions to fit into the available register space. We do not make extensive use of shared memory (e.g. Bégué et al. [9]) as we found that this slows down computation compared to a more efficient use of register space. Shared memory is only used in H-AMR to calculate the minimum timestep in each mesh-block through parallel reduction.

There exists a trade-off, different for each GPU generation, between making GPU kernels too big and complex to fit into the available register space and having too many small kernels with the added overhead. On the previous generation of GPUs (NVIDIA Kepler architecture) it was, for example, beneficial to split the code into extra kernels to recalculate certain quantities instead of storing them in temporary variables using register space. On the present generation of GPUs (NVIDIA Pascal/Volta/Ampere architectures) it is beneficial to make some kernels a bit bigger, due to the larger register space. We achieve best performance when we split a timestep into ∼7\sim7 separate kernels.

All functions necessary to evolve the state of a cell from tnt^n to tn+1t^{n+1} are GPU accelerated. These include reconstruction routines, calculation of HLL fluxes, conserved-to-primitive variable inversion, setting of density/internal energy floors, and exchange of boundary/ghost cells. The CPU handles all the necessary logic to manage the transfer of boundary cells, fluxes and electric fields between the neighbouring blocks and performs the (de-)refinement and load balancing steps including the divergence-free prolongation and restriction of magnetic fields (Balsara [4]). We have summarized the parallelization strategy of H-AMR in a code diagram (Figure 2).

A code diagram of H-AMR

Figure 2. A code diagram of H-AMR. On the left (blue) are all tasks that are performed using OpenMP parallelized C functions. On the right (orange) are all tasks that are performed using GPU-accelerated CUDA kernels. Practically all of the computation is GPU-accelerated and the non-accelerated parts in H-AMR typically do not form a performance bottleneck.

AVX Acceleration in OpenCL

In addition to the ‘normal’ OpenMP+MPI C based CPU code and GPU accelerated CUDA code, H-AMR maintains a legacy OpenCL branch that can make use of AVX vectorization on CPUs. This effectively leverages the 512 bit wide AVX vector registers in the latest generation of Intel Skylake CPUs. Without any CPU-specific optimizations to our GPU kernels (e.g. with the CUDA kernels only ported to OpenCL) H-AMR achieves ∼12%\sim12\% saturation of the CPU’s (16 Core AVX-512 2.8 GHz Skylake) theoretical FP64 throughput and gain a factor ∼3\sim3 speed-up compared to standard OpenMP code.

Adaptive Mesh Refinement

Adaptive mesh refinement (AMR, see Berger & Colella [11]; Balsara [4]) allows H-AMR to focus the resolution on regions of interest. While not bringing significant advantages for simulating thick accretion disks, which span most of the computational domain, AMR can speedup computations requiring high-resolution of small-scale features that fill a small fraction of the computational volume. For instance, for problems such as thin accretion disks, tidal disruption events, and large-scale collimated jets, AMR can reduce the number of required cells by orders of magnitude.

AMR can also speed up the calculations in another way: by reducing the spatial resolution in the blocks closest to the black hole and thereby increasing the timestep. Such a reduction in resolution is feasible, because GRMHD modeling has consistently shown that logarithmically-spaced spherical grids typically sufficiently resolve the turbulence closest to the black hole (e.g., within two event horizon radii), while resolving the outer regions in the accretion disk and relativistic jets remains a challenge (e.g. McKinney 2006; Liska et al. [66]; Porth et al. [102]).

We designed the AMR framework in H-AMR from the ground up for performance and scalability. We make use of an oct-tree based approach, where any parent block can be split in either 2, 4, 6 or 8 child blocks (see § 3.4). Compared to a patch-based AMR approach, we do not need to evolve the underlying parent blocks for each refined layer and, instead, can directly transfer boundary cells from neighbouring coarse to fine layers of the grid (and vice-versa). This drastically reduces the required inter-node MPI bandwidth, which presents the main performance bottleneck for our simulations. Since the relative inter-node MPI bandwidth is expected to decrease for the next generation of GPU clusters, oct-tree based AMR is an attractive approach for the next generation(s) of supercomputers.

Since every problem is different, H-AMR allows the user to implement an arbitrary refinement criterion. For example, Liska et al. [66] (2019b) used a cutoff on the maximum density in each block as the refinement criterion. Blocks satisfying the chosen refinement criterion will be refined to the highest AMR level allowed for a problem. Neighboring blocks (adjacent along the faces and edges) for each refined block, which do not satisfy the refinement criterion, are refined to 1 AMR level below that of the refined block. These nesting conditions prevent resolution jumps by factors greater than 2 along block faces and edges.

We use prolongation and restriction operators similar to those described in Berger & Oliger [12]; Berger & Colella [11] for cell-centered variables and Balsara [4] for face-centered variables. These operators upscale/downscale the resolution of the grid during (de-)refinement steps, and reconstruct primitive variables in ghost cells at coarse-fine boundaries. During prolongation we use MINMOD limited gradients calculated on the coarse mesh to upscale the resolution of the variables to a finer mesh. By using a more diffusive MINMOD limiter we prevent numerical issues at refinement boundaries associated with applying a 1D reconstruction scheme to a 3D stencil (see also Stone et al. [122]). During restriction, we take the volume or area weighted averages on the fine mesh to reduce the resolution of the variables on the coarse mesh. Prolongation and restriction can be performed on either the primitive variables or conserved quantities. The former is faster and more robust (e.g. does not lead to states with v>cv > c), while the latter is energy and angular momentum conserving up to machine precision. In general, if the refinement criterion is set such that no (de-)refinement happens in the area of interest we recommend to perform prolongation and restriction directly on the primitive variables.

In addition, as described in Berger & Colella [11], we replace at the end of a timestep the fluxes on the coarser mesh with the area-averaged fine mesh fluxes and edge-averaged electric fields. This is necessary since the sum of the fluxes on the fine mesh might not match to machine precision the flux on the coarse mesh. This refluxing guarantees conservation of mass, energy, and angular momentum, in addition to the divergence free evolution of magnetic fields. While refluxing of cell-centered quantities only involves 6 faces, refluxing of the edge-centered electric fields involves, in addition to the 6 faces, 12 cell edges. In general, we pick the cell edge at the highest refinement and timestepping level as being ‘dominant’. The electric fields on neighbouring edges are subsequently synchronized with the ‘dominant’ edge. To make sure that this constrained-transport algorithm is implemented correctly, we periodically verify consistency up to machine precision between the staggered magnetic field components at cell boundaries of neighbouring meshblocks.

Handling of the Polar Region

Spherical grids are perhaps the most natural and efficient grids to study accretion disks. They naturally follow the geometry of the disk rotating around the black hole. The spherical shape of the event horizon in the Kerr-Schild foliation naturally matches that of the grid’s inner boundary, r=Rinr = R_{\mathrm{in}}. In addition, spherical grids support a logarithmic spacing in the radial coordinate, naturally providing high resolutions close to the black hole where the timescales are short, and lowering the resolution progressively as one moves out and the timescales become longer. This is advantageous compared to, for example, Cartesian grids, as one does not need to use many AMR layers to get the typically required 2 to 5 orders of magnitude scale separation between inner and outer boundary of the grid. This in turn allows for the use of relatively large AMR block sizes, minimizing the number of boundary cell transfers and leading to excellent parallel scaling (§ 4).

A drawback of spherical grids is the polar coordinate singularity, which requires special treatment. We have implemented transmissive boundary conditions across the singularity to minimize dissipation and verified that the grid is robust for the study of tilted accretion disks and jets (see Appendix of Liska et al. [63] for details). Even with these improvements, spherical grids still suffer from cell ‘squeezing’ near the pole in the azimuthal direction. This causes the Courant et al. [22] condition (which limits the timestep to the wave-crossing time of single cell) to limit the global timestep more than for a Cartesian with an equivalent resolution. Since close to the polar singularity the cell aspect ratio rΔθ/(rsin⁡θΔϕ)≃Δϕ−1=Nφ/(2π)r\Delta\theta/(r\sin\theta\Delta\phi) \simeq\Delta\phi^{-1} = N_{\varphi}/(2\pi) increases proportional to the azimuthal resolution, the timestep for a spherical grid will, empirically, be a factor ∼Nφ/(2π)\sim N_{\varphi}/(2\pi) times smaller than that for a Cartesian grid with the same effective resolution.1 As a result, in 3D the cost of simulations on a spherical grid increases as O(N5)\mathcal{O}(N^5) instead of the typical O(N4)\mathcal{O}(N^4) for Cartesian grids, making high resolution (GR)MHD simulations on spherical grids particularly expensive.

There are three popular approaches to avoiding the squeezing of the cells in the φ\varphi-direction. One is the use of Cartesian grids (e.g Porth et al. [102]). The advantage of this method is that it is symmetry-agnostic. Disadvantages include the added computational cost because the grid does not conform to the shape of the black hole or the orbital motion of the gas. Such grids can also require many AMR levels (e.g., 8 AMR levels, Davelaar et al. [24]), which can reduce parallel scaling efficiency, a point of concern especially for GPU-based systems with a low ratio of MPI interconnect bandwidth to computation power. The second approach (e.g Stone et al. [122]) is to use static mesh refinement (SMR) to define the grid near the pole in all 3 dimensions, (r,θ,ϕ)(r, \theta, \phi). The lower polar resolution reduces the computational cost and is excellent for applications focused on the physics of the equatorial accretion flow. However, the larger cell size in the rr- and θ\theta-directions also makes it more difficult to resolve polar structures such as jets or tilted disks. Currently, most GRMHD codes use a third strategy which involves enlarging the innermost few cells in the θ\theta-direction (Tchekhovskoy et al. [125]). While this approach works well at low resolutions, it becomes ineffective at higher resolutions since the relative size of the innermost cells increases proportional to the ϕ\phi-resolution. For example, at the grid resolution of 1283128^3 cells the innermost cell needs to be enlarged by a factor ∼10\sim10, while at the resolution of 102431024^3 cells it would need to be enlarged by a factor ∼100\sim100. This makes grid cylindrification unsuitable for high resolutions.

External SMR

In H-AMR, we attempted to combine the best aspects of both of the above approaches. We use static mesh refinement (SMR) to avoid the squeezing of cells in the ϕ\phi-direction (Liska et al. [63]). For this, H-AMR derefines the base layer of the grid in the ϕ\phi-direction within 30∘30^\circ of the pole. This maintains the full resolution in the rr- and θ\theta-directions, leading to a uniform cell aspect ratio (within a factor of 2) across radial shells (Figure 3). As an example, our fiducial simulation (which uses base grid with, effectively, 1728×576×10241728 \times576 \times1024 cells; § 4) has a ϕ\phi-resolution of 256 cells for 0∘<θ<15∘0^\circ< \theta< 15^\circ, 512 cells for 15∘<θ<30∘15^\circ< \theta< 30^\circ and the full 1024 cells for 30∘<θ<90∘30^\circ< \theta< 90^\circ. We refer to this approach as “external SMR”, to distinguish it from “internal SMR” discussed below (see § 3.4.2).

Spherical base grid in H-AMR showing varying numbers of blocks in $\phi$ near the pole

Figure 3. As previously presented in Liska et al. [63], the spherical ‘base’ grid in H-AMR has a varying number of blocks in ϕ\phi. This prevents cell squeezing near the pole, speeding up high-resolution GRMHD simulations by up to 2 orders of magnitude without any loss in accuracy. AMR can increase the resolution of all blocks in this grid, including those adjacent to the polar axis.

A similar approach to reduce the resolution near the pole is utilized in the radiation hydrodynamics FORNAX code (Skinner et al. [119]). However, to our knowledge, H-AMR is unique among (GR)MHD codes in its ability to combine 1-dimensional SMR with 3-dimensional AMR. When refined with AMR, all parent blocks in our SMR-enhanced base grid are split into 8 child blocks, except the blocks touching the polar axis. These blocks are split into 6 child blocks, where the 2 child blocks along the pole maintain their parent’s φ\varphi-resolution and the 4 child blocks further away from the pole are refined in all 3 dimensions. This way the cells near the pole are kept approximately cubic by the (effective) addition of a derefinement layer in the φ\varphi-direction for each additional AMR layer.

Internal SMR

Typically, H-AMR uses external SMR to reduce the φ\varphi-resolution down to Nφ∼64−256N_{\varphi} \sim64 - 256 cells near the pole. Bringing down the φ\varphi-resolution to Nφ∼16N_{\varphi} \sim16 cells would require 2−42 - 4 extra refinement layers featuring exceedingly small block sizes. This would oversaturate the available memory and MPI interconnect bandwidth, leading to a serious performance bottleneck on GPU clusters. To remedy this limitation, H-AMR also implements φ\varphi-derefinement internally on the block level, which we refer to as internal SMR. Depending on the distance of a cell from the pole, internal SMR spatially averages the fluxes and conserved quantities of the cell over 2n2^n cells in the φ\varphi-direction within 2nmax⁡−n2^{n_{\max}-n} cells from the pole such that the cell aspect ratio remains close to unity. Here, nn is the internal SMR level and nmax⁡n_{\max} is the number of internal SMR levels. This can reduce the φ\varphi-resolution by an additional factor 4−164 - 16, which is sufficient to completely eliminate cell ‘squeezing’ near the pole while exploiting the computational advantages of larger-sized blocks. To maintain higher order spatial accuracy, the spatial reconstruction method is modified accordingly to compensate for the (effectively) increased cell spacing, making internal SMR equivalent to external SMR.

Local Adaptive Timestepping

H-AMR features a local adaptive timestep (LAT). The typical approach for this in AMR codes is to use smaller timesteps for higher-level AMR layers (aka hierarchical timestepping). In addition, H-AMR exploits the fact that on a logarithmic grid, cell size increases with radius, even without any spatial refinement layers. Based on the local Courant et al. [22] condition, LAT allows H-AMR to determine the time step size (in steps of a factor of 2) for each block (this includes the block’s ghost cells) independently from the block’s spatial refinement level. To guarantee 2nd2^{nd} order convergence in time, we typically evolve the coarser grid first such that we can estimate (by linear interpolation in time) the ghost cell variables on the fine grid. Subsequently, in a flux correction step (see also § 3.3), the flux difference between the fine and coarse grid is applied to the coarse grid.

LAT leads to a factor of 3–10 reduction in the number of timesteps, depending on the structure of the adaptive grid. This manifests itself as a factor 2–3 speedup due to extra overhead associated with parallel scaling (see § 3.6). In general, grids with many refinement layers further away from the black hole achieve the most benefit from LAT, while grids with no AMR only manage to reduce the number of timesteps by a factor ∼\simfew. In contrast, using hierarchical timestepping, which couples the timestep to the spatial refinement level, would lead to a smaller speedup of 10–30% since for most problems most blocks reside at the highest spatial refinement level. In addition to speeding up computations, LAT also increases the numerical accuracy by reducing the number of conserved-to-primitive variable inversions in the outer grid and thereby reducing the noise generated by the inversions (see the appendix in [18]). This is especially pronounced in large-scale jets, where the calculations due to the large difference between the magnetic energy density and rest mass energy density are prone to inversion errors.

Load Balancing

We use a z-order space filling curve for load balancing in order to keep neighbouring blocks in the grid physically close to each other on a cluster (e.g., on the same or neighbouring nodes). Depending on the problem specifics (such as the number of spatial and temporal refinement levels) and the architecture of the cluster (fat-tree or 3D-torus), we found that changing the fastest moving index in the space filling curve or switching to a row-major order at the 0th-level may significantly improve performance. AMR (de)refinement is performed every 10310^{3}–10410^{4} timesteps. This is similar to one orbital period at the black hole event horizon, hence sufficient to capture the dynamical evolution of the accretion disk and jet.

We note that LAT brings about two technical difficulties. First, it significantly complicates load balancing. If one were to keep the number of timesteps per GPU equal and naively follow the space-filling curve, a huge imbalance in memory consumption could occur, causing some GPUs to run out of memory. Second, it makes the synchronization of fluxes between different time levels more difficult: at every timestep the conserved fluxes and electric fields need to be synchronized between the fine and coarse time levels on block faces and edges to guarantee energy/momentum conservation and the divergence-free evolution of magnetic fields ([4]). For this, by the end of each full timestep the flux difference between the fine and coarse layers is added as a correction to the coarse block’s boundary cells and thus an additional conserved to primitive variable inversion needs to be performed for these boundary cells. This tightly couples the fine and coarse layers, potentially leading to an unbalanced load that slows down computation. We now discuss how we alleviate both of the issues.

To prevent an imbalance in memory consumption between GPUs, H-AMR uses a load balancing strategy that attempts to keep both the number of timesteps and the number of blocks at each timelevel per GPU constant, while adhering as closely as possible to the utilized space filling curve. This can be achieved by loading in on every GPU a similar number of computationally intensive (with many timesteps) and non-intensive (with few timesteps) blocks by load balancing the grid separately for each timelevel, and, using the next timelevel to ‘fill’ up the imbalance created during load balancing of the previous timelevel. To prevent GPUs from running out of memory during e.g. (de)refinement steps (each 16 GB GPU can only fit a grid of approximately ∼2563\sim256^{3} cells), H-AMR may in rare cases also perform intermediate load balancing steps or may reduce the number of timelevels (if it determines that this indeed reduces the inter-node memory imbalance).

Performance Measurements

In this section, we describe the physical and numerical setup of the GRMHD simulation we used as a benchmark. This simulation is illustrated using a volume rendering and a transverse slice through density in Figure 4. It ran in 2019 on then the world’s most powerful supercomputer, OLCF Summit, which is powered primarily by 27648 NVIDIA V100 GPUs, each with 16 GB of HBM2 RAM. We also discuss how we measure the performance and determine the scaling efficiency of H-AMR.

3D density rendering and vertical density slice of a GRMHD thin accretion disk

Figure 4. GRMHD simulation of a thin accretion disk of aspect ratio h/r=0.02h/r = 0.02 initially threaded by a purely toroidal magnetic field and tilted by 65∘65^\circ relative to the (horizontal) equatorial plane of the black hole. The frame-dragging by the spinning black hole rips the accretion disk apart into inner and outer subdisks as can be seen in the rendering of density iso-contours in the left panel. The black hole spin points along the positive zz-direction. The right panel shows a vertical slice through the density. The top left zoom-in inset shows that the inner regions of the accretion flow reorient themselves parallel to the BH midplane as it undergoes Bardeen-Petterson Bardeen & Petterson [5] alignment, the first demonstration of this effect in GRMHD in the absence of large-scale poloidal magnetic field (see also Liska et al. [66] (2019b)), solving a 40-year-old problem (Bardeen & Petterson [5]). The bottom right inset illustrates that the small-scale turbulent structure of the accretion flow is very well resolved. An animation of this figure is available online. A higher resolution version is also available as a YouTube movie. The animation runs from t∼10,000rg/ct \sim10{,}000r_g/c to t∼138,000rg/ct \sim138{,}000r_g/c and has a real-time duration of 104 seconds.

Physical Setup

We consider a thin accretion disk with scale height h/r=0.02h/r = 0.02 around a spinning black hole of spin a=0.94a = 0.94 tilted by 65∘65^\circ. Our previous work initialized the accretion disk with a poloidal magnetic flux loop ([66] (Liska et al. 2019b)). In contrast, here the disk is threaded by a toroidal magnetic field with an approximately uniform plasma β∼10\beta\sim10 ([88]). To our knowledge, this is the first GRMHD simulation of a thin disk in the absence of initial poloidal magnetic flux, making it extra challenging since a toroidal magnetic field needs a much higher resolution to be properly resolved ([67]). Such a magnetic field topology is thought to be responsible for most of the luminous black hole systems in our universe, since most of such systems lack a jet, while a poloidal magnetic field guarantees the production of a jet. We discuss the physical implications of the simulation in § 8.2.

Numerical Grid

The numerical grid stretches from the inner boundary just inside the event horizon, at ∼rg\sim r_g, to the outer boundary at ∼105rg\sim10^5r_g. It has a total effective resolution of 13440×4608×809613440 \times4608 \times8096 in the disk beyond ∼10rg\sim10r_g. The resolution gradually drops to the base-grid resolution of 1728×576×10241728 \times576 \times1024 at r∼4rgr \sim4r_g (this increases the time step by about an order of magnitude; § 3.3). The cell sizes at r=(1.5,8,20,50)rgr = (1.5, 8, 20, 50)r_g are ∣Δr∣∼∣Δθ∣∼∣Δϕ∣∼(0.0082,0.011,0.011,0.034)|\Delta r| \sim|\Delta\theta| \sim|\Delta\phi| \sim(0.0082, 0.011, 0.011, 0.034). The grid has 0.9−1.4×1050.9 - 1.4 \times10^5 blocks of size 48×48×6448 \times48 \times64 cells and a total of ∼12−22\sim12 - 22 billion cells. The number of blocks and cells varies throughout the evolution as AMR creates and destroys blocks to focus the resolution on the disk body as it moves through the grid. For this problem, we use 4 levels of AMR (§ 3.3), 2 external (§ 3.4.1) and 4 internal (§ 3.4.2) layers of SMR, and 5 levels of LAT (§ 3.5).

Total resolution-wise, this advanced grid improves by more than an order of magnitude on our previous simulations of 0.25−1.50.25 - 1.5 billion cells carried out on the NCSA Blue Waters supercomputer (e.g. Liska et al. 2019b). Consequently, this improves the resolution of the disk to 25–30 cells, up from 7–14 cells per scaleheight. Typically around 4–5 scale heights of the disk reside in the highest refinement level, ensuring uniform resolution of the magnetized turbulence not only near the midplane of the disk, but also further away from the midplane.

Performance Measurements

The speed of GRMHD codes is usually expressed in zone-cycles/s. Each zone-cycle represents an operation that advances a single cell in the grid for one full timestep. The computational cost in terms of memory bandwidth and number of double precision floating pointing operations is de-facto constant for each zone-cycle and was measured on a single GPU with NVPRW. Thus it is trivial to calculate those metrics for our fiducial run on OLCF Summit based on the achieved zone-cycles/s. Similarly, the total memory consumption can be calculated by measuring the size of a single block and multiplying this number by the total number of blocks in the grid. In addition, we calculate the MPI bandwidth by counting the number cell transfers between AMR/SMR blocks on different nodes.

The grid described in § 4.2 is used for the largest of our weak scaling tests, which uses 5,400 V100 GPUs and requires over 25 TB of GPU RAM. We use fewer blocks of the same size (48×48×6448 \times48 \times64) for the smaller scaling tests. In other words, we keep the number of blocks/GPU constant by preventing H-AMR from refining beyond a certain number of blocks (this can potentially reduce the number of AMR levels). Note that since the grid for the smaller weak scaling tests becomes smaller and may have fewer AMR layers the problem is not exactly the same and thus these benchmarks merely serve as an indication of what performance might look like for a hypothetical simulation using a smaller grid with similar characteristics. The plotted efficiency is accurate though for our fiducial simulation and represents the average performance of our code, which includes the entire application performance including I/O.

We express in § 4 our numerical efficiency as the achieved zone-cycles/s/GPU relative to the maximum value devised from single GPU benchmarks with a 1503150^3 block size (§ 5.1). Similarly we express the weak scaling efficiency as the achieved zone-cycles/s/node compared to this value achieved for a single node (6 V100 GPUs) using the respective grid (∼20\sim20 blocks of size 48×48×6448 \times48 \times64 per GPU).

Limitations on Scaling

As long as the grid has a resolution of ≥1253\ge125^3 per GPU we find that the numerical efficiency remains excellent for a wide range of problems. Lowering the resolution to 50350^3/GPU without LAT or to ∼1003\sim100^3/GPU with LAT gives us only ∼40%\sim40\% of the GPU’s maximum performance in zone-cycles/s. The per-GPU resolution limitation arises because a GPU needs to keep ∼105\sim10^5 CUDA threads occupied, which is not possible for smaller grids, especially when LAT reduces the total number of timesteps by a factor of ∼10\sim10. To allow for efficient load balancing this grid needs to be divided such that there at least ≥15\ge15 blocks per GPU. Using ≤7\le7 blocks per GPU leads to a factor 2--3 performance decrease. Another constraint comes from the block size, which needs to exceed ≥503\ge50^3 cells, such that inter-node MPI transfers do not

become prohibiting. For block sizes of ∼503\sim50^3 cells we find that on average ∼25%\sim25\% of the MPI interconnect bandwidth is saturated for our fiducial run (Table 1). However, since some nodes can be more MPI-intensive than others, this number can be much higher for certain nodes and makes the MPI bandwidth the main performance bottleneck for our fiducial run. Reducing the block size to ∼263\sim26^3 while keeping the total number of cells constant decreases the performance by a factor 2--3. Furthermore, the available HBM2 RAM on each 16GB GPU can only fit a 2563256^3 grid.

Abs. perf.Rel. perf.
FP64 rate2.2 PFLOP/s5.3%
GPU DRAM bandwidth588 TB/s12.1%
GPU DRAM consumption25 TB28%
MPI bandwidth5.5 TB/s24%

Table 1. Time-averaged absolute and relative performance of H-AMR: floating point power (FP64), GPU DRAM bandwidth, GPU DRAM consumption and MPI bandwidth for our fiducial run on 5,400 V100 GPUs of the OLCF Summit supercomputer. This demonstrates that H-AMR does not have a ‘single’ bottleneck resource, making efficient use of OLCF Summit.

These constraints make it imperative that every grid has to be fine-tuned to the respective system. In our case the simulation has run ∼10%\sim10\% of the time on 3600 V100 GPUs, which is the minimum amount of GPUs we need due to RAM constraints, and ∼90%\sim90\% of the time on 5,400 V100 GPUs, above which there are not enough blocks to effectively load balance the grid. We find that within this range the number of zone-cycles-per-second per GPU remains constant to within 10%.

Performance Results

In this section we demonstrate excellent single GPU performance, time-to-solution, scalability and peak performance for the thin accretion disk problem presented in § 4.

Single CPU/GPU Benchmarks

Figure 5 compares the computational performance in zone-cycles/s of H-AMR on various GPU and CPU architectures for a simple test configuration without using AMR, SMR or LAT and block size of 1503150^3. On a single NVIDIA V100 GPU H-AMR attains ∼1,0×108\sim1,0 \times10^8 zone cycles/s, which corresponds to a factor ∼5\sim5 speedup compared to a 28 core Intel W3175X Skylake CPU (clocked at 2.8 GHz with 16 cores active), which attains 10×10510 \times10^5 zone cycles/s/core using AVX-512 vectorization. Note that a zone cycle includes the predictor and corrector steps in our 2nd2^{\mathrm{nd}} accurate timestepping routine. We profiled our code using NVPROF on a single GPU and manage to saturate 25% of FP64 throughput and 57% of memory bandwidth without any register spillover on a single NVIDIA V100 GPU for a 1503150^3 block. We consider this a remarkable result, especially since H-AMR contains more than 10,000 lines of CUDA kernel code.

Computational performance of H-AMR in zone cycles/s on a $150^3$ uniform grid for various generations of Intel CPUs and NVIDIA GPUs

Figure 5. The computational performance of H-AMR in zone cycles/s on a 1503150^3 uniform grid for various generations of Intel CPUs (Haswell and Skylake) and NVIDIA GPUs (Pascal, Volta and Ampere). HT indicates we make use of HyperThreading on Intel CPUs. A zone cycle includes both the predictor and corrector step in our 2nd2^{\mathrm{nd}} order accurate timestepping routine.

Peak Performance

From the total number of zone-cycles/s achieved in our fiducial run we can easily calculate the peak performance on 5,400 V100 GPUs as described in § 4.3. The results are summarized in Table 1, which shows that H-AMR uses a significant fraction of both the FP64 power, GPU memory bandwidth, GPU memory size and MPI bandwidth. This leads us to conclude that H-AMR is very well optimized across the board and makes efficient use of the resources available on OLCF Summit. Furthermore, it shows that while the MPI and GPU memory bandwidths are the current bottlenecks, implementation of new floating point heavy physics such as radiation into H-AMR may cause the floating point capacity to become the bottleneck resource in the future.

Performance Summary

In this article we have presented H-AMR’s performance under a scenario of extreme complexity featuring an unusually high cell count, AMR, SMR, and 1000s of GPUs. In Table 2 we summarize H-AMR’s performance spanning a range of complexity. These range from a typical ∼1923\sim192^3 GRMHD simulation (EHT-192) of a geometrically thick accretion disk that we ran on a single GPU during the GRMHD code comparison (Porth et al. [102]) to the very thin disk (TD-4608) considered in this work. We also summarize H-AMR’s performance in a mid-resolution GRMHD simulation of a thin accretion disk (TD-1728) with AMR on 128 GPUs ([68]), and, in a 230432304^3 GRMHD simulation of a geometrically thick accretion disk (EHT-2304) without AMR on 6000 GPUs ([106]).

TD-4608TD-1728EHT-192EHT-2304
Base resolution1680×576×10241680 \times576 \times10241020×432×2881020 \times432 \times288304×192×192304 \times192 \times1925376×2304×23045376 \times2304 \times2304
Effective resolution13440×4608×819213440 \times4608 \times81924080×1728×11524080 \times1728 \times1152304×192×192304 \times192 \times1925376×2304×23045376 \times2304 \times2304
Block size48×46×6448 \times46 \times64102×36×36102 \times36 \times3676×32×4876 \times32 \times4864×44×6464 \times44 \times64
Grid outer radius105rg10^{5}r_g2000rg2000r_g150rg150r_g2000rg2000r_g
Physical duration1.5×105rg/c1.5 \times10^{5}r_g/c105rg/c10^{5}r_g/c104rg/c10^{4}r_g/c104rg/c10^{4}r_g/c
Hardware computational cost3.8×1063.8 \times10^{6} GPU hours3.3×1043.3 \times10^{4} GPU hours18 GPU hours1.1×1061.1 \times10^{6} GPU hours
System scale5400 V100 GPUs128 V100 GPUs1 V100 GPU6000 V100 GPUs
Number of cells12−22×10912-22 \times10^{9}0.44×1090.44 \times10^{9}9.2×1069.2 \times10^{6}22×10922 \times10^{9}
Number of real zone-cycles1.7×10171.7 \times10^{17}5.2×10155.2 \times10^{15}0.64×10130.64 \times10^{13}0.88×10170.88 \times10^{17}
Number of effective zone-cycles1.5×10181.5 \times10^{18}1.8×10161.8 \times10^{16}1.6×10131.6 \times10^{13}4.4×10174.4 \times10^{17}
Effective zone-cycles/s≳1.1×108\gtrsim1.1 \times10^{8}/GPU≳1.5×108\gtrsim1.5 \times10^{8}/GPU≳2.5×108\gtrsim2.5 \times10^{8}/GPU≳1.1×108\gtrsim1.1 \times10^{8}/GPU
LAT ×\times GPU Speedup31437131
SMR Speedup (#Timesteps)3.31.421.176.7
AMR Speedup (#Cells)351811
AMR Speedup (#Timesteps)5320.711
Total Speedup1.9×1051.9 \times10^{5}2.3×1042.3 \times10^{4}83208

Table 2. Table 2. Performance metrics of H-AMR in 4 astrophysical scenarios. TD-4608 is the fiducial run of a tilted thin accretion disk described in this article, which makes use of 3 levels of AMR. TD-1728 is an aligned thin accretion disk that makes use of 3 levels of AMR (Liska et al. [68]). EHT-192 is a geometrically thick accretion disk that does not use AMR (Porth et al. [102]). It represents a typical medium-resolution GRMHD simulation part of the Event Horizon Telescope Collaboration (EHTC) GRMHD simulation library. EHT-2304 is a similar simulation of a geometrically thick accretion, but performed at an extremely high resolution without AMR (Ripperda et al. [106]). The effective number of zone-cycles and zone-cycles/s assumes that all cells are evolved at the highest LAT level. Thus the ratio between the number of effective and real zone-cycles equals the factor by which LAT reduces the number of timesteps. The LAT ×\times GPU speedup gives the factor by which LAT and GPUs speed up H-AMR. We compare against a 20 core Skylake CPU, on which the non-AVX-vectorized version of H-AMR has a performance of ∼3.5×106\sim3.5 \times10^{6} zone-cycles/s. SMR/AMR speedup (#Timesteps) gives the cost reduction factor in the number of timesteps compared to a spherical grid without SMR that uses cylindrification (Tchekhovskoy et al. [125]) around the polar axis such that it is not limited by the Courant condition in the ϕ\phi-direction up to a resolution of Nϕ=128N_{\phi}=128. For Nϕ>128N_{\phi}>128 we assume that Δt3=128NϕΔt2\Delta t^{3}=\frac{128}{N_{\phi}}\Delta t^{2} and calculate the timestep as Δt∝1/(1/Δt1+1/Δt2+1/Δt3)\Delta t \propto1/(1/\Delta t^{1}+1/\Delta t^{2}+1/\Delta t^{3}) (§ 2). AMR speedup (#Cells) similarly gives the reduction factor in the number of cells, which is defined as the ratio between the true number of cells in the grid and the number of cells in a unigrid at the effective resolution. Multiplying all of these factors gives the total speedup.

In Table 2 we calculate the speedup compared to H-AMR’s performance on a 20 core Intel Skylake CPU without any advanced features (AMR, SMR, LAT, GPUs). We assume that the timestep is not limited by the Courant condition in the φ\varphi-direction until a resolution of Nφ=128N_{\varphi}=128 due to the cylindrification of the grid ([125]). A more detailed explanation of how these speed-up factors are calculated is given in the caption of Table 2. Under these assumptions, the attained speedup ranges from a factor ∼80\sim80 for EHT-192 to a factor ∼1.9×105\sim1.9 \times10^5 for TD-4608, since TD-4608 benefits a lot from SMR and AMR. However, as the performance of EHT-2304 demonstrates, even in absence of any AMR, the speedup can exceed a factor ≳200\gtrsim200 at higher resolution where squeezing of cells near the pole makes the simulation significantly more expensive without SMR (§ 3.4).

Scalability

The simulation presented in § 4 scales up to 900 OLCF Summit nodes and 5,400 V100 GPUs. Each GPU on average contains 20 blocks, each of 48 ×\times 48 ×\times 64 ∼503\sim50^3 cells. The green dashed line in Figure 6 shows that with the use of SMR, AMR, and LAT, we obtain what might seem like a disappointing numerical efficiency (with the baseline set by the number of zone-cycles/s on a single GPU for a 1503150^3 block) of ∼18%\sim18\% and a weak scaling efficiency (using a single 6-GPU node as baseline with a grid containing 120 blocks of size 48 ×\times 48 ×\times 64) of ∼35%\sim35\% at 900 Summit nodes. One reason for the seemingly low parallel scaling efficiency is the difficulty of load-balancing that arrives with LAT: without LAT, the weak scaling efficiency increases to a respectable ∼60%\sim60\%. However, by decreasing the number of time steps, LAT speeds up the simulations by factors of ∼4\sim4 (on a single V100 GPU) to ∼9\sim9 (on 5400 V100 GPUs): this effectively brings the parallel numerical efficiency to ∼200%\sim200\% at 900 Summit nodes = 5,400 V100 GPUs, as shown by the solid blue line in Figure 6. This corresponds to (effectively) ∼1.175×108\sim1.175 \times10^8 zone cycles/s/GPU. Thus, the net result of LAT is a substantial increase in effective performance and parallel scaling efficiency.

Figure 6. H-AMR shows excellent weak scaling for both simple and complex grids. For simple grids, it shows ∼80%\sim80\% numerical efficiency on 900 OLCF Summit nodes = 5,400 GPUs for a single block of 1503150^3 cells per GPU, without using AMR, SMR, or LAT (dashed-dotted orange line). For more complex grids, which use AMR and SMR, with 20 blocks of size 48×48×64∼50348 \times48 \times64 \sim50^3 cells per GPU, the efficiency at 900 nodes drops to ∼60%\sim60\% (not shown for brevity). While using local adaptive time stepping (LAT) decreases the raw parallel efficiency to ∼35%\sim35\% (dashed green line), it also effectively speeds up the simulations by a factor of 4 (on 1 GPU) to 9 (on 5,400 GPUs, solid blue line), leading to an effective numerical efficiency of nearly ∼200%\sim200\% on 5,400 GPUs.

The other reason for lower numerical efficiency in our fiducial problem compared to simpler test problems is the smaller block size. For illustration, consider an idealized weak scaling test, with a much larger block size of 1503150^3 cells per GPU; we disable SMR, AMR, and LAT for this test. The orange dash-dotted line in Figure 6 shows that this leads to an excellent parallel weak scaling efficiency of ∼80%\sim80\% at 900 Summit nodes, primarily because inefficiencies in load balancing related to LAT go away (§ 3.5), and the MPI interconnect bandwidth is not anymore the main bottleneck due to the larger block size and, therefore, smaller fraction of boundary cells. Note that we would not be able to use such large blocks of 1503150^{3} cells for our fiducial problem as there would be an insufficient number of blocks per GPU to effectively load balance the grid and the blocks would be too big to properly focus on the very thin h/r=0.02h/r=0.02 disk.

Code Validation

For the purpose of code development and validation, H-AMR maintains an independently developed and maintained OpenMP and MPI parallelized C version running on CPUs. More specifically, we usually develop new features in the C version and, after extensive testing, port them to the CUDA/OpenCL version. Subsequently, we verify that the output of both versions agrees up to machine precision for various scenarios. We refer the reader to Porth et al. [102] for code validation of H-AMR against its peer codes, performed in the context of a community-wide GRMHD code comparison project and to the appendix of Liska et al. [63] for validation of H-AMR for tilted accretion flows evolved on a spherical grid. We supplement these tests in this article with a suite of linear and non-linear wave tests, and two off-center spherical explosions.

Linear Wave Tests

To verify 2nd2^{nd} convergence of the boundary conditions between coarse and fine layers in H-AMR we have performed a variety of 3D dimensional linear wave tests (with an O(10−5)O(10^{-5}) amplitude), which include the fast, slow, Alfven, and entropy waves (e.g. Gammie et al. [41]). We rotate the wavevector by 45 degrees with respect to the x, y and z axes on a Cartesian grid and force these waves to propagate through a grid refinement boundary, which also features a jump in timestepping (upper panels of Figure 7). We evolve each respective wave for 2 periods and then compute the L1L^{1} error, which is defined as the absolute value of the finite difference between the initial and final states for the primitive variables.

Density isocontour renderings and L1 error convergence plot

Figure 7. (Upper panels) A density isocontour rendering at 2 different times for a fast wave. Block boundaries are illustrated using white lines. For our wave tests we start with a grid that has 3×3×33 \times3 \times3 blocks and refine the innermost block. (Lower panel) A plot of the L1 error as function of the linear resolution NxN_x. H-AMR achieves 2nd2^{\mathrm{nd}} order convergence for all waves irrespective of refinement boundaries.

In the lower panel of Figure 7 we demonstrate that H-AMR, as expected, converges at 2nd2^{\mathrm{nd}} order for all waves.

Non-Linear Wave Tests

To verify the ability of H-AMR to capture shock waves under challenging conditions we perform a series of relativistic shock tube tests as described in Komissarov [59]. We evolve the shock tubes on a 1D Cartesian grid in Minkowskian space with no refinement and consider both a MINMOD and PPM slope limiter (without contact steepener or shock flattener). We use a Courant factor Cf=0.8C_f = 0.8 except for the fast shock for which we use Cf=0.2C_f = 0.2. We compare in Figure 8 an extremely high resolution shock tube (Δx=1.1×10−3\Delta x = 1.1 \times10^{-3}) to a lower resolution shock tube (Δx=2.2×10−2\Delta x = 2.2 \times10^{-2}). The shock fronts in the low resolution shock tube are, as expected, less resolved. While the very diffusive MINMOD limiter does not produce spurious oscillations near shock fronts, some relatively small spurious oscillations are detectable with the less diffusive PPM limiter. This is a well known disadvantage of PPM limiters that can be addressed with an optional shock flattener implemented in H-AMR which reduces the order of reconstruction near shock fronts (Colella & Woodward 1984). These tests verify the robustness and stability of the shock capturing scheme in H-AMR when handling shocks in relativistic plasma.

Relativistic shock tube solutions

Figure 8. Relativistic shock tubes taken from Komissarov [59] with density (ρ\rho) in left panels and velocity (uxu^x) in right panels. Reconstruction with MINMOD limiter in black and with PPM limiter in red. The low resolution shock tubes with Δx=2.2×10−2\Delta x = 2.2 \times10^{-2} (solid lines) are less sharp than the high resolution shock tubes with Δx=1.1×10−3\Delta x = 1.1 \times10^{-3} (dashed lines), however they converge to the same solution. This verifies the ability of H-AMR to handle shock waves in relativistic plasma.

Off-center Spherical Explosion

To quantify numerical errors associated with gas passing through the polar singularity and internal/external SMR layers, we perform an off-center explosion that propagates through the poles. During this test we use 1 layer of external SMR, 2 layers of internal SMR, and 4 levels of local adaptive timestepping. The test is performed on a logarithmically spaced spherical grid instead of a Cartesian grid to also validate the correct implementation of the geometric source terms. The total resolution is 300×240×240300 \times240 \times240. The initial pressure and density are set to a constant p=3×10−5p = 3 \times10^{-5} and ρ=10−4\rho= 10^{-4} within a sphere of radius rs=2rgr_s = 2r_g that is centered at (x0,y0,z0)=(3,0,10)rg(x_0,y_0,z_0) = (3,0,10)r_g. We use an exponential cutoff to make the transition between the sphere and ambient medium smoother. In addition to the hydrodynamic explosion, we perform a similar test where the explosion is threaded by a magnetic field described by vector potential Aϕ∝(rs−(x−x0)2+(y−y0)2+(z−z0)2)A_\phi\propto(r_s-\sqrt{(x-x_0)^2+(y-y_0)^2+(z-z_0)^2}) for r<rsr<r_s and Aϕ=0A_\phi=0 for r>rsr>r_s. The magnetic field is subsequently normalized such that βmax⁡=pgmax⁡/pbmax⁡=10\beta^{\max}=p_g^{\max}/p_b^{\max}=10. Here pgmax⁡p_g^{\max} and pbmax⁡p_b^{\max} are the maximum gas and magnetic pressure in the grid.

The results of these off-center explosions are illustrated in the left (hydrodynamic explosion) and right (magnetized explosion) panels of Figure 9. Both explosions manage to maintain their circular shape when passing through the polar axis. The minor distortions around the polar singularity are similar to those observed in other GRMHD codes that use transmissive boundary conditions (e.g [79, 78]). This demonstrates that H-AMR is capable of accurately evolving plasma around the pole and can even maintain some form of convergence when the gas passes directly through the polar singularity.

Two panels showing the ratios of internal and magnetic energy to rest mass density

Figure 9. (Left panel) The ratio between internal energy (ugu_g) and rest mass density (ρ\rho) during a spherical off-center explosion that passes through 2 internal and 1 external SMR layer in addition to the polar axis. The different meshblocks are seperated by white lines. Black lines illustrate the distance from the center of the explosion in steps of 1rgr_g. The front of the shockwave becomes less resolved at larger radii due to the logarithmic spacing of the grid. (Right panel) The ratio between the magnetic energy (b2b^2) and rest mass density (ρ\rho) during a magnetized off-center explosion that passes through 2 internal and 1 external SMR layer in addition to the polar axis. When the explosion passes through the polar singularity only minor artifacts in the internal energy and magnetic field strength are detected, which is consistent with other (GR)MHD codes that utilize similar (transmissive) boundary conditions (e.g. [79, 78]).

To avoid repeated passage of, for example, a kink-unstable jet through the polar singularity H-AMR has the ability to ‘rotate’ the setup with respect to the spherical grid such that the jet propagates along the equatorial plane instead (e.g. [43 b,c]). The physical equivalence between rotated and non-rotated setups was demonstrated in the appendix of Liska et al. [63].

Discussion

Advancements in Computational Methods

The extensive optimizations presented in this paper bring state of the art GRMHD simulations to the exascale level, e.g. to clusters with more than 101810^{18} FLOP/s of FP64 performance, using a highly efficient grid capable of tackling problems with many orders of magnitude in scale separation. We carried out scaling tests up to 5400 NVIDIA V100 GPUs on OLCF Summit, culminating in our fiducial simulation: the largest GRMHD simulation to date that utilizes 4 AMR levels, with the block size of 48 × 64 × 64 cells, and achieves an astonishingly high effective resolution in the disk of 13440 × 4608 × 8096 cells. The simulation cost is around 4 million NVIDIA V100 GPU-hours, which corresponds to roughly 800 million Sky Lake CPU core hours (§ 5.1).

H-AMR features a set of optimizations that collectively boost the performance of GRMHD simulations by at least 2 orders of magnitude for simple problems that do not benefit from an adaptive mesh. This increases to 5 orders of magnitude for problems requiring adaptive meshes and very high resolutions in the polar region (see § 4.2). This speedup is attained by the following means. An NVIDIA V100 GPU typically provides a factor ∼40\sim40 speedup compared to a non AVX-vectorized version of H-AMR running on 16-Intel Skylake cores (AVX vectorization improves the performance by a factor ∼3\sim3). Large gains also come from the advanced treatment of the polar region during SMR/AMR which provides a typical factor 5–20 reduction in the number of timesteps, depending on the resolution. Local adaptive timestepping reduces the number of timesteps by another factor of ∼\sim 3–10 depending on the resolution of the grid. Finally, AMR can reduce the number of cells in the grid by a factor of ∼\sim 10–100 for many complex problems such as thin accretion disks and large-scale jets.

This paves the way for a next generation of GRMHD simulations with unprecedented resolutions and record-breaking simulated timescales, substantially advancing the understanding of accreting black holes. For example, H-AMR made it possible to simulate even the most challenging accretion disk configurations naturally expected in nature (i.e., thin and tilted) over timescales that are relevant to astronomical observations [66 b] (Liska et al. 2019a). Liska et al. [66] demonstrated, for the first time in GRMHD, that tilted thin magnetized disks align with the black hole midplane as theoretically predicted [5], solving a 40 year old problem in astrophysical disk dynamics. Further, not only this article, but also Liska et al. (2019b) and Musoke et al. [88], simulated disk tearing in highly tilted thin disks (Figure 4), potentially explaining some types of QPOs in XRBs (e.g., Kalamkar et al. [57]), as well as holding important consequences for galactic evolution (e.g., King et al. [58]). Using H-AMR, Chatterjee et al. [18] simulated the longest extent (in both temporal and spatial dimensions) relativistic jets from an accreting black hole in 2D GRMHD, making it possible to follow the jet over a range of ≳5\gtrsim5 orders of magnitude in distance and enable the study of the jet’s deceleration process as it carves out its path through the environment. Following this line of study, H-AMR would finally make it possible to simulate black hole-launched jets and connect distances from the event horizon up to extra-galactic distances, closing the gap between GRMHD and cosmological simulations of galaxy evolution.

H-AMR also played an important role in interpreting (e.g. Porth et al. [102]; Chatterjee et al. [19]; Ripperda et al. [106]; Event Horizon Telescope Collaboration et al. [32]) the black hole images from Event Horizon Telescope (EHT) observations of the supermassive black holes M87∗^{*} (e.g. Event Horizon Telescope Collaboration et al. [29, 31]) and Sagittarius A∗^{*} (e.g. Event Horizon Telescope Collaboration et al. [32]). In particular, H-AMR enabled the first study of how general relativity warps jets (and their accretion disks) that are misaligned with the BH spin axis, ultimately affecting the near-event horizon image of a black hole [66, 19]. The ability to carry out the simulations at extremely high resolutions enables H-AMR to attain in global simulations [106] the resolutions typically associated with local simulations. Such global modeling has already enabled a significant improvement in our understanding of how black holes consume and eject gas. It has been thought that the formation of relativistic jets by accreting black hole requires the presence of large-scale vertical magnetic flux to begin with, and that absent such field – e.g., if only purely toroidal magnetic field is present – the simulations do not produce jets [6, 76]. However, our simulations have revealed that such configurations are actually capable of generating large-scale vertical magnetic flux and forming relativistic jets [67].

Summing up, H-AMR is in a prime position to address important questions about the dynamic nature of accretion disks and jets such as the hitherto unexplained trigger behind the observed change in disk geometry from thick to thin (e.g., Belloni [10]; Liska et al. [68]), the evolution of jet morphologies (known as the FR-I/II dichotomy Fanaroff & Riley [35]), the origins of particle acceleration in both disks and jets [118, 106]. The high speed of H-AMR makes it attractive to account for departures from ideal MHD physics such as radiation (e.g. Sądowski et al. [112]; Ryan et al. [109]; Foucart [37]) and synchrotron cooling of electrons (e.g., Fragile & Meier [40]; Dibi et al. [26]; Drappeau et al. [27]; Yoon et al. [130]), resistivity (e.g. (Ripperda et al. 2019b,a; Mignone et al. 2019)) and two-temperature thermodynamics (e.g. [103, 17, 110, 68]), which may lead to important insights into many of the above mentioned problems. Currently, H-AMR’s speed is only (MPI-bandwidth) limited by waiting times for inter-node communication, which leaves time for extra computations. Therefore, more complex physics can be implemented (almost) free of charge. Such numerical experiments are expected to scale well on exascale systems, even if those systems feature slower inter-node communication than in the simulations presented here and conducted at OLCF Summit.

Scientific Results

For the scaling tests presented in this article we have used a real-world problem involving a highly tilted (by 65°) very thin (h/r=0.02h/r = 0.02) accretion disk threaded by a strong toroidal magnetic field (β∼10\beta\sim10) around a rapidly spinning black hole (a∼0.94a \sim0.94). These simulations are more extensively described in Musoke et al. [88]. Interestingly, unlike thick disks threaded with toroidal magnetic field that tend to develop large-scale poloidal magnetic flux through a dynamo process and associated relativistic jets [67], our thin disk did not produce any jets, as seen in Figure 4. In fact, due to the complete absence of jets, the outcome resembles the high/soft state in XRBs, and as such this is the first GRMHD simulation to reach this exceptionally challenging jet-less regime, in the complete absence of initial poloidal magnetic flux. While in previous work we needed to seed the accretion disk with a rather strong poloidal magnetic field as is only expected in the intermediate states (Liska et al. [66] (2019a)), the powerful NVIDIA V100 GPUs of OLCF Summit allowed us to resolve the weak toroidal magnetic field with ≳20\gtrsim20 cells per MRI wavelength and the disk scale height with 25−3025-30 cells. As illustrated in Figure 4 and Figure 10 and in the accompanying movie, we find that tilted thin accretion disks, initially threaded with a purely toroidal magnetic field (i.e., containing no poloidal magnetic flux to begin with), can tear apart into multiple precessing sub-disks. We also find that, even in the absence of a Blandford & Znajek [13] jet, the inner regions of a magnetized accretion disk can sporadically align with the black hole midplane, as predicted more than 4 decades ago by Bardeen & Petterson [5] and seen in such disks for the first time (see Figure 4). The movie of the simulation shows multiple (≳4\gtrsim4) cycles of such tearing events that result in the formation of a precessing inner sub-disk of about the same size. The emission from such precessing sub-disks is expected to be quasi-periodic. Thus, the tearing of tilted disks is an attractive mechanism for producing coherent quasi-periodic oscillations (QPOs), now testable via

A 3D isocontour rendering of density at different times in the simulation

Figure 10. A 3D isocontour rendering of density at different times in our simulation, showing a single tearing cycle of the disk: at the initial time shown, t=42,500rg/ct = 42{,}500r_g/c (top left panel), the disk is intact. However, at t=47,500rg/ct = 47{,}500r_g/c, the inner disk of size ∼20rg\sim20r_g tears off from the outer disk and starts to precess independently of the outer disk. Eventually, the inner precessing disk gets consumed by the black hole, and the entire disk appears intact again at the last time shown, t=82,500rg/ct = 82{,}500r_g/c (bottom right panel). During each tearing cycle the torque from the spinning black hole overcomes the viscous torques holding the disk together and the disk tears apart. This results in a rapidly precessing inner subdisk physically detached from the outer disk. This subdisk can sustain several precession periods before it shrinks and disappears into the black hole and the tearing cycle repeats. Disk tearing and precession is an attractive model to explain Type-C quasi periodic oscillations in the lightcurves of XRBs (e.g. van der Klis [126]).

GRMHD simulations for the first time [e.g. 88]. Improved understanding of the evolution of QPO frequency and amplitude during XRB outbursts may lead to unique constraints on black hole spin magnitude and/or disk geometry [e.g. 53, 87] and provide new insights into the physics driving XRB spectral state transitions (e.g. Ferreira et al. 2006; Begelman & Armitage 2014; Marcel et al. 2018a,b; Liska et al. 2018c,b).

Acknowledgments

An award of computer time was provided by the Innovative and Novel Computational Impact on Theory and Experiment (INCITE) and the ASCR Leadership Computing Challange (ALCC) programs under award PHY129. This research used resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract DE-AC05-00OR22725 using NERSC award ALCC-ERCAP0022634. We acknowledge PRACE for awarding us access to JUWELS Booster at GCS@JSC, Germany. ML was supported by the John Harvard Distinguished Science and ITC Fellowships, and the 21-ATP21-0077 NASA ATP award. MK was supported by the Netherlands Organisation for Scientific Research (NWO) Spinoza Prize, CH by the Amsterdam Science Talent Scholarship, AI by a Royal Society University Research Fellowship, AT by the National Science Foundation grants AST-2206471, AST-2009884, AST-2107839, AST-1815304, OAC-2031997 and AST-1911080, and SM, KC and DY by the NWO VICI grant (no. 639.043.513).

References

  1. [1]Andalman, Z. L., Liska, M. T. P., Tchekhovskoy, A., Coughlin, E. R., & Stone, N. 2022, MNRAS, 510, 1627, doi: 10.1093/mnras/stab3444
  2. [2]Antón, L., Zanotti, O., Miralles, J. A., et al. 2006, ApJ, 637, 296, doi: 10.1086/498238DOI
  3. [3]Balbus, S. A., & Hawley, J. F. 1991, ApJ, 376, 214, doi: 10.1086/170270DOI
  4. [4]Balsara, D. S. 2001, Journal of Computational Physics, 174, 614, doi: 10.1006/jcph.2001.6917DOI
  5. [5]Bardeen, J. M., & Petterson, J. A. 1975, ApJL, 195, L65, doi: 10.1086/181711
  6. [6]Beckwith, K., Hawley, J. F., & Krolik, J. H. 2008a, MNRAS, 390, 21, doi: 10.1111/j.1365-2966.2008.13710.xDOI
  7. [9]Bégué, D., Pe’er, A., Zhang, G., Zhang, B., & Pevzner, B. 2022, arXiv e-prints, arXiv:2205.02484. https://arxiv.org/abs/2205.02484
  8. [10]Belloni, T. M. 2010, States and Transitions in Black Hole Binaries, ed. T. Belloni, Vol. 794, 53, doi: 10.1007/978-3-540-76937-8_3DOI
  9. [11]Berger, M. J., & Colella, P. 1989, Journal of Computational Physics, 82, 64, doi: 10.1016/0021-9991(89)90035-1DOI
  10. [12]Berger, M. J., & Oliger, J. 1984, Journal of Computational Physics, 53, 484, doi: 10.1016/0021-9991(84)90073-1DOI
  11. [13]Blandford, R. D., & Znajek, R. L. 1977, MNRAS, 179, 433
  12. [14]Caproni, A., Abraham, Z., Livio, M., & Mosquera Cuesta, H. J. 2007, MNRAS, 379, 135, doi: 10.1111/j.1365-2966.2007.11918.xDOI
  13. [15]Caproni, A., Abraham, Z., & Mosquera Cuesta, H. J. 2006, ApJ, 638, 120, doi: 10.1086/498684DOI
  14. [16]Carter Edwards, H., Trott, C. R., & Sunderland, D. 2014, J. Parallel Distrib. Comput., 74, 3202–3216, doi: 10.1016/j.jpdc.2014.07.003
  15. [17]Chael, A. A., Narayan, R., & Sadowski, A. 2017, MNRAS, 470, 2367, doi: 10.1093/mnras/stx1345DOI
  16. [18]Chatterjee, K., Liska, M., Tchekhovskoy, A., & Markoff, S. B. 2019, MNRAS, 490, 2200, doi: 10.1093/mnras/stz626
  17. [19]Chatterjee, K., Younsi, Z., Liska, M., et al. 2020, MNRAS, 499, 362, doi: 10.1093/mnras/staa2718DOI
  18. [22]Courant, R., Friedrichs, K., & Lewy, H. 1928, Mathematische Annalen, 100, 32, doi: 10.1007/BF01448839DOI
  19. [23]Curd, B., & Narayan, R. 2019, MNRAS, 483, 565, doi: 10.1093/mnras/sty3134DOI
  20. [24]Davelaar, J., Olivares, H., Porth, O., et al. 2019, arXiv e-prints, arXiv:1906.10065. https://arxiv.org/abs/1906.10065
  21. [25]De Villiers, J.-P., Hawley, J. F., & Krolik, J. H. 2003, ApJ, 599, 1238, doi: 10.1086/379509DOI
  22. [26]Dibi, S., Drapeau, S., Fragile, P. C., Markoff, S., & Dexter, J. 2012, MNRAS, 426, 1928, doi: 10.1111/j.1365-2966.2012.21857.xDOI
  23. [27]Drappeau, S., Dibi, S., Dexter, J., Markoff, S., & Fragile, P. C. 2013, MNRAS, 431, 2872, doi: 10.1093/mnras/stt388DOI
  24. [28]Evans, C. R., & Hawley, J. F. 1988, ApJ, 332, 659, doi: 10.1086/166684DOI
  25. [29]Event Horizon Telescope Collaboration, Akiyama, K., Alberdi, A., et al. 2019a, ApJL, 875, L1, doi: 10.3847/2041-8213/ab0ec7
  26. [31]Event Horizon Telescope Collaboration, Akiyama, K., Algaba, J. C., et al. 2021, ApJL, 910, L13, doi: 10.3847/2041-8213/abe4deDOI
  27. [32]Event Horizon Telescope Collaboration, Akiyama, K., Alberdi, A., et al. 2022a, ApJL, 930, L16, doi: 10.3847/2041-8213/ac6672DOI
  28. [35]Fanaroff, B. L., & Riley, J. M. 1974, MNRAS, 167, 31P
  29. [37]Foucart, F. 2018, MNRAS, 475, 4186, doi: 10.1093/mnras/sty108DOI
  30. [38]Fragile, P. C., & Anninos, P. 2005, ApJ, 623, 347, doi: 10.1086/428433DOI
  31. [39]Fragile, P. C., Blaes, O. M., Anninos, P., & Salm​​onson, J. D. 2007, ApJ, 668, 417, doi: 10.1086/521092DOI
  32. [40]Fragile, P. C., & Meier, D. L. 2009, ApJ, 693, 771, doi: 10.1088/0004-637X/693/1/771DOI
  33. [41]Gammie, C. F., McKinney, J. C., & Tóth, G. 2003, ApJ, 589, 444, doi: 10.1086/374594DOI
  34. [42]Gardiner, T. A., & Stone, J. M. 2005, Journal of Computational Physics, 205, 509, doi: 10.1016/j.jcp.2004.11.016DOI
  35. [43]Gottlieb, O., Lalakos, A., Bromberg, O., Liska, M., & Tchekhovsk​​oy, A. 2022a, MNRAS, 510, 4962, doi: 10.1093/mnras/stab3784DOI
  36. [46]Greene, J., Bailyn, C. D., & Orosz, J. A. 2001, ApJ, 554, 1290, doi: 10.1086/321411DOI
  37. [47]Grete, P., Glines, F. W., & O’Shea, B. W. 2019, arXiv e-prints, arXiv:1905.04341. https://arxiv.org/abs/1905.04341
  38. [48]Hamlin, N. D., & Newman, W. I. 2013, PhRvE, 87, 043101, doi: 10.1103/PhysRevE.87.043101DOI
  39. [49]Harten, A., Lax, P., & van Leer, B. 1983, SIAM Review, 25, 35, doi: 10.1137/1025002DOI
  40. [50]Hawley, J. F., & Krolik, J. H. 2006, ApJ, 641, 103, doi: 10.1086/500385DOI
  41. [51]Hirose, S., Krolik, J. H., De Villiers, J.-P., & Hawley, J. F. 2004, ApJ, 606, 1083, doi: 10.1086/383184DOI
  42. [52]Hjellming, R. M., & Rupen, M. P. 1995, Nature, 375, 464, doi: 10.1038/375464a0DOI
  43. [53]Ingram, A., Done, C., & Fragile, P. C. 2009, MNRAS, 397, L101, doi: 10.1111/j.1745-3933.2009.00693.xDOI
  44. [54]Ingram, A., van der Klis, M., Middleton, M., et al. 2016, MNRAS, 461, 1967, doi: 10.1093/mnras/stw1245DOI
  45. [55]Ivanov, P. B., & Illarionov, A. F. 1997, MNRAS, 285, 394, doi: 10.1093/mnras/285.2.394DOI
  46. [56]Jones, M. L., Hickox, R. C., Black, C. S., et al. 2016, ApJ, 826, 12, doi: 10.3847/0004-637X/826/1/12DOI
  47. [57]Kalamkar, M., Casella, P., Uttley, P., et al. 2016, MNRAS, 460, 3284, doi: 10.1093/mnras/stw1211DOI
  48. [58]King, A. R., Lubow, S. H., Ogilvie, G. I., & Pringle, J. E. 2005, MNRAS, 363, 49, doi: 10.1111/j.1365-2966.2005.09378.xDOI
  49. [59]Komissarov, S. S. 1999, MNRAS, 308, 1069, doi: 10.1046/j.1365-8711.1999.02783.xDOI
  50. [61]LeVeque, R. J. 2002, Finite Volume Methods for Hyperbolic Problems, Cambridge Texts in Applied Mathematics (Cambridge University Press), doi: 10.1017/CBO9780511791253DOI
  51. [63]Liska, M., Hesp, C., Tchekhovskoy, A., et al. 2018a, MNRAS, 474, L81, doi: 10.1093/mnrasl/slx174DOI
  52. [66]Liska, M., Tchekhovskoy, A., Ingram, A., & van der Klis, M. 2018b, ArXiv e-prints. https://arxiv.org/abs/1810.00883
  53. [67]Liska, M., Tchekhovskoy, A., & Quataert, E. 2018c, ArXiv e-prints. https://arxiv.org/abs/1809.04608
  54. [68]Liska, M. T. P., Musoke, G., Tchekhovskoy, A., Porth, O., & Beloborodov, A. M. 2022, arXiv e-prints, arXiv:2201.03526. https://arxiv.org/abs/2201.03526
  55. [69]Lodato, G., & Price, D. J. 2010, MNRAS, 405, 1212, doi: 10.1111/j.1365-2966.2010.16526.xDOI
  56. [70]Lubow, S. H., Ogilvie, G. I., & Pringle, J. E. 2002, MNRAS, 337, 706, doi: 10.1046/j.1365-8711.2002.05949.xDOI
  57. [73]McKinney, J. C. 2005, ApJL, 630, L5, doi: 10.1086/468184DOI
  58. [75]McKinney, J. C., & Gammie, C. F. 2004, ApJ, 611, 977, doi: 10.1086/422244DOI
  59. [76]McKinney, J. C., Tchekhovskoy, A., & Blandford, R. D. 2012, MNRAS, 423, 3083, doi: 10.1111/j.1365-2966.2012.21074.xDOI
  60. [78]Mewes, V., Zlochower, Y., Campanelli, M., et al. 2020, Phys. Rev. D, 101, 104007, doi: 10.1103/PhysRevD.101.104007DOI
  61. [79]Mewes, V., Zlochower, Y., Campanelli, M., et al. 2018, PhRvD, 97, 084059, doi: 10.1103/PhysRevD.97.084059DOI
  62. [80]Mignone, A. 2014, Journal of Computational Physics, 270, 784, doi: 10.1016/j.jcp.2014.04.001DOI
  63. [81]Mignone, A., & Bodo, G. 2005, MNRAS, 364, 126, doi: 10.1111/j.1365-2966.2005.09546.xDOI
  64. [82]Mignone, A., & Bodo, G. 2006, 368, 1040, doi: 10.1111/j.1365-2966.2006.10162.xDOI
  65. [84]Mignone, A., Ugliano, M., & Bodo, G. 2009, MNRAS, 393, 1141, doi: 10.1111/j.1365-2966.2008.14221.xDOI
  66. [85]Miller-Jones, J. C. A., Tetarenko, A. J., Sivakoff, G. R., et al. 2019, Nature, 569, 374, doi: 10.1038/s41586-019-1152-0
  67. [86]Misner, C. W., Thorne, K. S., & Wheeler, J. A. 1973, Gravitation
  68. [87]Motta, S. E., Casella, P., Henze, M., et al. 2015, MNRAS, 447, 2059, doi: 10.1093/mnras/stu2579DOI
  69. [88]Musoke, G., Liska, M., Porth, O., van der Klis, M., & Ingram, A. 2022, arXiv e-prints, arXiv:2201.03085. https://arxiv.org/abs/2201.03085
  70. [89]Narayan, R., & Yi, I. 1994, ApJL, 428, L13, doi: 10.1086/187381DOI
  71. [91]Nealon, R., Price, D. J., & Nixon, C. J. 2015, MNRAS, 448, 1526, doi: 10.1093/mnras/stv014DOI
  72. [92]Newman, W. I., & Hamlin, N. D. 2014, SIAM Journal on Scientific Computing, 36, B661, doi: 10.1137/140956749DOI
  73. [93]Nixon, C., King, A., Price, D., & Frank, J. 2012, ApJL, 757, L24, doi: 10.1088/2041-8205/757/2/L24DOI
  74. [94]Noble, S. C., Gammie, C. F., McKinney, J. C., & Del Zanna, L. 2006, ApJ, 641, 626, doi: 10.1086/500349DOI
  75. [97]Ogilvie, G. I. 1999, MNRAS, 304, 557, doi: 10.1046/j.1365-8711.1999.02340.xDOI
  76. [98]Papaloizou, J. C. B., & Pringle, J. E. 1983, MNRAS, 202, 1181, doi: 10.1093/mnras/202.4.1181DOI
  77. [99]Penna, R. F., McKinney, J. C., Narayan, R., et al. 2010, MNRAS, 408, 752, doi: 10.1111/j.1365-2966.2010.17170.xDOI
  78. [100]Pons, J. A., Font, J. A., Ibanez, J. M., Martí, J. M., & Miralles, J. A. 1998, A&A, 339, 638. https://arxiv.org/abs/astro-ph/9807215
  79. [101]Porth, O., Olivares, H., Mizuno, Y., et al. 2017, Computational Astrophysics and Cosmology, 4, 1, doi: 10.1186/s40668-017-0020-2
  80. [102]Porth, O., Chatterjee, K., Narayan, R., et al. 2019, arXiv e-prints, arXiv:1904.04923. https://arxiv.org/abs/1904.04923
  81. [103]Ressler, S. M., Tchekhovskoy, A., Quataert, E., Chandra, M., & Gammie, C. F. 2015, MNRAS, 454, 1848, doi: 10.1093/mnras/stv2084DOI
  82. [104]Ressler, S. M., Tchekhovskoy, A., Quataert, E., & Gammie, C. F. 2017, MNRAS, 467, 3604, doi: 10.1093/mnras/stx364DOI
  83. [105]Rezzolla, L., & Zanotti, O. 2013, in Relativistic Hydrodynamics, by L. Rezzolla and O. Zanotti. Oxford University Press, 2013. ISBN-10: 0198528906; ISBN-13: 978-0198528906
  84. [106]Ripperda, B., Liska, M., Chatterjee, K., et al. 2022, ApJL, 924, L32, doi: 10.3847/2041-8213/ac46a1DOI
  85. [109]Ryan, B. R., Gammie, C. F., Fromang, S., & Kestener, P. 2017, ApJ, 840, 6, doi: 10.3847/1538-4357/aa6a52DOI
  86. [110]Ryan, B. R., Ressler, S. M., Dolence, J. C., Gammie, C., & Quataert, E. 2018, ApJ, 864, 126, doi: 10.3847/1538-4357/aad73aDOI
  87. [111]Sadowski, A., Wielgus, M., Narayan, R., et al. 2016, Monthly Notices of the Royal Astronomical Society, 466, 705, doi: 10.1093/mnras/stw3116DOI
  88. [112]Sądowski, A., Narayan, R., Tchekhovskoy, A., & Zhu, Y. 2013, MNRAS, 429, 3533, doi: 10.1093/mnras/sts632DOI
  89. [113]Schive, H.-Y., ZuHone, J. A., Goldbaum, N. J., et al. 2018, MNRAS, 481, 4815, doi: 10.1093/mnras/sty2586DOI
  90. [114]Shafee, R., McKinney, J. C., Narayan, R., Tchekhovskoy, A., et al. 2008, ApJL, 687, L25, doi: 10.1086/593148DOI
  91. [115]Shakura, N. I., & Sunyaev, R. A. 1973, A&A, 24, 337
  92. [116]Shiokawa, H., Krolik, J. H., Cheng, R. M., Piran, T., & Noble, S. C. 2015, ApJ, 804, 85, doi: 10.1088/0004-637X/804/2/85DOI
  93. [117]Sikora, M., Łukasz Stawarz, & Lasota, J.-P. 2007, The Astrophysical Journal, 658, 815. http://stacks.iop.org/0004-637X/658/i=2/a=815
  94. [118]Sironi, L., Petropoulou, M., & Giannios, D. 2015, MNRAS, 450, 183, doi: 10.1093/mnras/stv641DOI
  95. [119]Skinner, M. A., Dolence, J. C., Burrows, A., Radice, D., & Vartanyan, D. 2019, ApJS, 241, 7, doi: 10.3847/1538-4365/ab007fDOI
  96. [120]Stella, L., & Vietri, M. 1998, ApJL, 492, L59, doi: 10.1086/311075DOI
  97. [121]Stone, J. M., & Gardiner, T. 2009, NewA, 14, 139, doi: 10.1016/j.newast.2008.06.003DOI
  98. [122]Stone, J. M., Tomida, K., White, C. J., & Felker, K. G. 2020, ApJS, 249, 4, doi: 10.3847/1538-4365/ab929bDOI
  99. [123]Tchekhovskoy, A. 2019, HARMPI: 3D massively parallel general relativistic MHD code, Astrophysics Source Code Library, record ascl:1912.014. http://ascl.net/1912.014
  100. [124]Tchekhovskoy, A., McKinney, J. C., & Narayan, R. 2007, MNRAS, 379, 469, doi: 10.1111/j.1365-2966.2007.11876.xDOI
  101. [125]Tchekhovskoy, A., Narayan, R., & McKinney, J. C. 2011, MNRAS, 418, L79, doi: 10.1111/j.1745-3933.2011.01147.xDOI
  102. [126]van der Klis, M. 2006, Rapid X-ray Variability, Vol. 39, 39–112DOI
  103. [127]van der Klis, M., Jansen, F., van Paradijs, J., et al. 1985, Nature, 316, 225, doi: 10.1038/316225a0DOI
  104. [128]Volonteri, M., Madau, P., Quataert, E., & Rees, M. J. 2005, ApJ, 620, 69, doi: 10.1086/426858DOI
  105. [129]White, C. J., Stone, J. M., & Gammie, C. F. 2016, ApJS, 225, 22, doi: 10.3847/0067-0049/225/2/22DOI
  106. [130]Yoon, D., Chatterjee, K., Markoff, S. B., et al. 2020, MNRAS, 499, 3178, doi: 10.1093/mnras/staa3031DOI
  107. [131]Zink, B. 2011, arXiv e-prints, arXiv:1102.5202. https://arxiv.org/abs/1102.5202

Paper details

vlnc:W_xu8xa3rt
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents