Faster way to measure black hole spins in costly simulations
This paper tackles a practical bottleneck in binary black hole simulations. Numerical relativity codes need to measure each hole’s spin from the evolving geometry. One commonly used measure, the “approximate Killing vector” (AKV) spin, becomes very costly to compute as simulations increase in resolution. The authors describe a new algorithm that computes AKV spins far faster than the method in common use.
In these simulations a black hole’s surface (the apparent horizon) is represented by a sum of spherical harmonic modes up to a highest mode L. The AKV method finds a special vector field on that surface that is as close as possible to a true rotational symmetry. Mathematically that search becomes a generalized eigenvalue problem of size roughly L^2. After removing a trivial constant mode, the three eigenfunctions with the smallest eigenvalues give the preferred rotation directions and, after a chosen normalization, the spin magnitudes.
The standard implementation used a dense linear algebra solver that computes all eigenvalues. That approach has theoretical cost that grows like L^6 and, in practice, was even worse on the authors’ tests. For example, using the dense solver’s routine (dggev) the runtime for the eigenvalue step grew from about 0.07 seconds at L=15 to about 13,100 seconds at L=100 on an Intel Xeon Platinum CPU. Because the AKV solve was done on a single core, it could stall an entire simulation while waiting for one core to finish.
The new algorithm avoids computing all eigenvalues. Instead it uses an iterative eigensolver (ARPACK) to extract just the three eigenpairs that are needed, together with LU decomposition for the linear solves ARPACK requires. According to the authors’ measurements, this change makes the AKV computation orders of magnitude faster than the dense solver. The paper also notes that with the new eigensolver the time spent building the matrices becomes the dominant cost, so further speedups may come from improving that step.