Compilation
This page describes how to build HASEonGPU manually from source.
For most users, manual compilation is only required when using the standalone binary directly or when adjusting build options. For general setup and dependency information, see Getting Started.
Basic Build
Clone the repository and build HASEonGPU with CMake:
git clone https://github.com/computationalradiationphysics/haseongpu.git
cd haseongpu
mkdir build
cd build
cmake ..
cmake --build .
After compilation, the calcPhiASE binary is available under:
./build/calcPhiASE
When Python bindings are enabled, they are built alongside the C++ backend.
Typical Build Variants
Minimal default build:
cmake ..
cmake --build .
Build with MPI support:
cmake .. -DDISABLE_MPI=OFF
cmake --build .
CMake Options
The following CMake variables control important build options.
DISABLE_MPI
Default:
OFFDescription: Enabling allows compilation without requiring MPI or BoostMPI as a dependency.
Values:
OFF: MPI support remains - dependencies are requiredON: MPI support is disabled
HASE_CUDA_ARCHITECTURES
Default:
nativeDescription: Selects the CUDA target architecture used for compilation.
Typical values:
native: detect the local GPU architecture automaticallyexplicit CUDA architectures such as
75,80,86
Using native is convenient for local builds. For reproducible and performance on
different systems, specifying the CUDA architecture is recommended.
HASE_ENABLE_PYTHON
Default:
OFFDescription:
This option usually does not need to be enabled manually unless you want to customize the Python interface build. For normal Python installation and usage, please refer to Python Interface.
Values:
OFF: build only the C++ project and binary interfaceON: build the Python interface
HASE_RELEASE
Default:
ONDescription: Controls whether HASEonGPU is built in release mode.
Values:
OFF: non-release buildON: release-oriented build
This option is enabled by default for performance-oriented builds. Disabling it allows internal runtime assertions and is therefore mainly useful for debugging and development.
HASE_TESTING
Default:
OFFDescription: Enables the test suite during configuration and build.
Values:
OFF: tests are not builtON: test targets are enabled
This option is primarily useful for development and validation work.
Notes
Manual compilation is usually not required for every workflow.
For example, when using the Python interface, the backend may be built as part of the Python installation process. However, a manual build can be useful for adjusting CMake options, debugging, or working directly with the standalone binary.