Skip to content

Lyα MCRT

How does THOR stack up against established Lyα radiative-transfer codes on accuracy and speed?

HPC

Lyα MCRT throughput on Vera for THOR on four NVIDIA A100 SXM4 GPUs and the four CPU codes on two Intel Xeon Platinum 8360Y sockets Lyα MCRT throughput on Vera for THOR on four NVIDIA A100 SXM4 GPUs and the four CPU codes on two Intel Xeon Platinum 8360Y sockets

The CPU timings are medians of five runs for THOR and three for each other code (FP64, \(N=10^4\)). THOR uses one MPI rank per socket, COLT and voroILTIS use OpenMP, and RASCAS uses 72 MPI ranks including its coordinator. The GPU timing comes from a single THOR run (FP32, \(N=10^6\)) with one MPI rank per GPU. Every run recovered all packets and passed the analytic spectrum check.

Lyα MCRT throughput on Viper-GPU for THOR on two AMD Instinct MI300A GPUs and the four CPU codes on 48 physical cores Lyα MCRT throughput on Viper-GPU for THOR on two AMD Instinct MI300A GPUs and the four CPU codes on 48 physical cores

The CPU timings are medians of five runs for THOR and three for each other code (FP64, \(N=10^4\)). THOR uses one MPI rank per socket with 24 threads per rank. COLT and voroILTIS use 48 OpenMP threads, and RASCAS uses 48 MPI ranks including its coordinator. The GPU timing comes from a single THOR run (FP32, \(N=10^6\)) with one MPI rank per GPU. Every run passed the analytic spectrum check. voroILTIS returned 9,996–9,997 of the 10,000 packets per run. The throughput uses the requested packet counts.

Desktop

Lyα MCRT throughput for THOR on a Ryzen 9 5900XT and RTX 3090, with fixed CPU references on a Ryzen 9 5950X Lyα MCRT throughput for THOR on a Ryzen 9 5900XT and RTX 3090, with fixed CPU references on a Ryzen 9 5950X

THOR's CPU runs use 16 threads (FP64, \(N=10^4\)), and the GPU run uses FP32 and \(N=10^6\). The CPU bar shows the median of five runs.3 The other codes' FP64 timings come from the original comparison.2

Laptop

Apple M3 Max Lyα MCRT throughput for THOR on Metal and CPU, RASCAS, COLT, and Iltis Apple M3 Max Lyα MCRT throughput for THOR on Metal and CPU, RASCAS, COLT, and Iltis

The laptop runs predate THOR's later performance improvements. Metal reached 1,700 photons/s, 35–125× the CPU codes. Laptop benchmark record

Accuracy

The test is the Neufeld static sphere — a point source at the centre of a static, uniform, dust-free sphere of hydrogen — run against RASCAS, COLT and Iltis. Its emergent Lyα profile has a closed-form solution1, so each code's accuracy is just its R² against it:

\[ J(x) \;\propto\; \frac{x^2}{1 + \cosh\!\big[\sqrt{2\pi^3/27}\,|x^3|/(a\,\tau_0)\big]} \]

Canonical run: \(\tau_0 = 10^6\), \(T = 2\times10^4\,\mathrm{K}\), xcrit = 0 (no acceleration). The four-code spectra below are the historical 2026-06-05 comparison.2

Emergent Lyα spectra of THOR (CPU and GPU), COLT, RASCAS and Iltis vs the analytic solution at τ₀ = 10⁶ Emergent Lyα spectra of THOR (CPU and GPU), COLT, RASCAS and Iltis vs the analytic solution at τ₀ = 10⁶

The historical profiles give R² ≈ 0.91–0.96 against the analytic solution. The refreshed THOR CPU and GPU runs give R² = 0.951 and 0.946 at 10,000 photons each, passing the R² ≥ 0.9 check.3

Iltis

The public cbehren/Iltis is broken for this comparison (spiky spectrum, R² ≈ 0.6 at τ₀ ≥ 10⁵), so it is not in the default run. Add it with a maintained (private) voroILTIS build — run_all.sh forwards ILTIS_URL/ILTIS_REF to the container build:

ILTIS_URL=<voroILTIS-repo> ILTIS_REF=<sha> \
  run_all.sh --build --codes "thor rascas colt iltis" --tau10 6 --out ./out

Run it

apptainer/benchmarks/neufeld/common/run_all.sh --build --tau10 6 --out ./out

TAU10 sets the optical depth; NPHOTONS, RASCAS_NRANKS and --march are the other knobs.

On an Apple Silicon Mac, use the native runner. CPU and GPU use separate binaries because the benchmark compares FP64 and FP32 builds:

brew install cmake gcc open-mpi hdf5 yaml-cpp gsl libomp
VOROILTIS_SOURCE=/path/to/voroILTIS \
  THOR_CPU_BIN=/path/to/thor-fp64 THOR_GPU_BIN=/path/to/thor-fp32 \
  apptainer/benchmarks/neufeld/common/run_all_apple.sh \
  --build --tau10 6 --out ./out-apple

References

  • Neufeld (1990), ApJ 350, 216 — ADS
  • Dijkstra, Haiman & Spaans (2006), ApJ 649, 14 — ADS
  • Byrohl & Nelson (2025), THOR code paper — see Papers

  1. Dijkstra, Haiman & Spaans (2006), after Neufeld (1990). ↩

  2. Run 2026-06-05. Code versions — THOR 7449d06a, COLT 88429d9, RASCAS 3b18dd0, voroILTIS 9ae77da (plus local Neufeld-setup modifications not captured by the hash). The public-Iltis container recipe pins 3efd87c but is not used for these figures. ↩↩

  3. THOR 70f4d7d0, run 2026-11-23. See the results record for timings, methodology, accuracy, and build details. ↩↩