Absorption Lines
How does THOR's native sightline optical-depth integration compare to established absorption-spectrum tools on accuracy and speed?
The test casts HI Lyα sightlines through the TNG50-4 snapshot at z = 0 (51.7 cMpc box, ~18.5 million Voronoi gas cells), on a single consumer desktop (AMD Ryzen 9 5900XT, 16 threads, and an NVIDIA RTX 3090). Throughput is the per-sightline rate, excluding one-time setup. THOR on the GPU integrates sightlines orders of magnitude faster than established tools, and well ahead of the 16-thread CPU (above).1
Accuracy
Both codes trace the same rays and integrate HI Lyα from the same neutral-hydrogen field (the
snapshot's NeutralHydrogenAbundance, not a Cloudy ionization model), with peculiar velocities and
Hubble flow applied identically. So the comparison isolates the ray-tracing and Voigt machinery, and
the forests line up absorber by absorber:
Per sightline, the two agree well. The small differences visible above come down to how each code samples the gas: THOR traces it directly on the native Voronoi tessellation, while Trident leans on yt's SPH deposition onto an intermediate grid.
THOR's single-precision (FP32) build, used for the GPU run, reproduces the FP64 τ to ~0.1 %, so the GPU result is the same physics at >70× the CPU throughput.
Matched on cores
The Trident bar is 16 MPI ranks (mpirun -n 16), matched to THOR's 16 CPU threads, so the
CPU-vs-Trident comparison is core-for-core. MPI buys Trident only ~5×, not 16×: the yt SPH
sampling is memory-bandwidth-bound and does not scale linearly on one node (single-threaded Trident
is another ~5× slower than the bar shown). The gap is algorithmic and holds core-for-core: THOR
integrates τ on the native Voronoi mesh rather than resampling onto an intermediate SPH grid.
References
- Hummels, Smith & Silvia (2017), Trident, ApJ 847, 59 — ADS
- Nelson et al. (2019), IllustrisTNG public data release, ComAC 6, 2 — ADS
-
TNG50-4 (z = 0), HI Lyα over 1200–1232 Å. THOR release builds via AdaptiveCpp (CPU FP64, 16 threads; GPU FP32 saturated at N = 65536). Trident 1.4.2 + yt 4.4.2, SPH deposition on 16 MPI ranks (512 rays / 676 s wall; single-threaded is ~5× slower). Run 2026-06-25. ↩