Installation
Code Availability
THOR is available via Apptainer containers. The source code will be released openly after publication of the code paper (under review). For early source access or contributions, contact contact@thor-rt.org.
Containers Available
Apptainer containers provide an alternative to compiling from source — the generic image runs on CPU, NVIDIA, or AMD GPU, MPI included (experimental).
Requirements
- Clang >= 18.0 (required)
- CMake >= 3.29.0 && < 4.0.0
- Git with submodules
- MPI (for distributed computing)
- SYCL implementation: AdaptiveCpp >= 25.10.0 with the required PTX logarithm fix (recommended), or Intel oneAPI
PointCloud/Voronoi datasets use portable SYCL kernels and oneDPL sorting when built with Intel oneAPI. Install the oneDPL headers alongside the compiler.
Optional TBB enables parallel RAMSES loading and octree Morton preprocessing independently of CGAL.
With OpenMP available, concurrency follows OMP_NUM_THREADS, capped by OMP_THREAD_LIMIT, per process.
Without TBB or OpenMP, these stages run serially.
Setup
1. Clone the repository
Use graphical instead for native-display or GUI-test dependencies; all
initializes every nested submodule. Failed updates retry after 15, 30, and 60
seconds before tag-fetch and broken-checkout repair. Successful updates incur
no delay; a persistent failure adds at most 105 seconds of backoff, plus the
Git operations themselves. CI (--ci) clones up to four submodules concurrently;
use --jobs N to override this. Without either option, Git's
submodule.fetchJobs setting applies. [AI-Codex]
2. Install SYCL runtime
You need either AdaptiveCpp (recommended) or Intel oneAPI. If your HPC provider doesn't offer these as modules, you'll need to compile AdaptiveCpp from source. See AdaptiveCpp setup for guidance.
3. Build
Linux
Set CC and CXX to the paths of your SYCL compiler. For AdaptiveCpp, the executables are clang and acpp, while for Intel oneAPI these are icx and icpx, see here for more details.
AdaptiveCpp target on Linux
The default generic (SSCP/JIT) target serves both CPU and GPU execution.
For other targets, see
Compiler Settings.
macOS
With AdaptiveCpp available as acpp and the build dependencies installed through
Homebrew, use the CPU configuration from the self-hosted nightly CI:
CC=clang CXX=acpp cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release -DACPP_TARGETS=omp \
-DCMAKE_PREFIX_PATH="$(brew --prefix)" \
-DCMAKE_CXX_FLAGS="-I$(brew --prefix libomp)/include" \
-DCMAKE_CXX_SCAN_FOR_MODULES=OFF \
-DTHOR_OPTIMIZE_ARCHITECTURE=OFF \
-DTHOR_MPI_ENABLED=OFF -DTHOR_CGAL_PARALLEL=OFF
cmake --build build --target thor -j 2
ACPP_VISIBILITY_MASK=omp ./build/src/thor --selftest
Memory Usage
Compilation can require large amounts of memory. If you run out of memory during the build, reduce the number of concurrent builders by adding -j1 to the build command:
Python Packages
For the full Python environment without compiling the C++ bindings, run from the repository root:
This installs the analysis helpers, live client, MCP interface, and test helpers.
Install thor-bindings separately if needed.
For reference-data preparation, install the base package:
See Preparing reference data for catalog manifests, downloads, verification, and shared data storage.
THOR includes Python packages for post-processing and visualization. To install the thor-tools CLI globally:
For development (editable install into the current environment):
See Python Packages for details on individual packages and the C++ bindings.