Fast Graph-based Higher-Order Clustering Statistics on the GPU
Fast Graph-based Higher-Order Clustering Statistics on the GPU
Cristiano G. Sabiu
AbstractWe present a significant update to GRAMSCI (GRAph Made Statistics for Cosmological Information; Sabiu et.al 2019), an algorithm for the fast computation of the general $N$-point spatial correlation function of any discrete point set embedded in $\mathbb{R}^n$. Utilizing the concepts of kd-trees and graph databases, we count all possible $N$-tuples in binned configurations within a given length scale. In this {\em Version 2 update} we describe several additions to the original code. We replace the binary-search inner loop, which cost $O(m\log m)$ per hub--spoke pair, where $m$ is the mean neighbor count, with a merge-walk algorithm that reduces the inner loop to $O(m)$. We implement a parity-decomposed 4pCF that separates the signal into even and odd channels, enabling direct tests of parity violation in the galaxy distribution. We estimate the disconnected 4pCF internally on the same graph to return the connected 4pCF. We provide a Python interface so the Fortran engine can be called directly from NumPy arrays. Finally, and principally, we present a GPU port of the full query engine (OpenACC): the 3pCF, 4pCF, and parity-decomposed 4pCF kernels run on a single consumer GPU with measured speedups of $2.6\times$ (3pCF) to $9\times$ (4pCF) over a 64-thread CPU node, and an out-of-core tiling scheme allows graphs far exceeding device memory. We measure a $9\times10^9$-edge BAO-scale 3pCF on a 24\,GB card with ${\sim}20\%$ overhead. We validate the code against its CPU reference, against analytic injection tests, and demonstrate BAO-scale applications on the DESI DR1 LRG sample compared against the EZmock ensemble.