compile_time_config - noma/ham GitHub Wiki

Compile-Time Configuration

In most use-cases it should not be necessary to refer to the options described below. Everything is handled by the provided CMake files.

If you try building HAM-Offload or applications using it with another build system, the tables below might become handy. It might also help to use make VERBOSE=1 within the CMake generated Makefile-project to see which commands are used to build the code.

Defines

Define Description
Configurable:
HAM_EXPLICIT Switch to explicit mode, where ham_init() and ham_finalise() must be called explicitly in each process. Helpful in complex scenarios, sse ham_offload_explicit.cpp
HAM_DEBUG_ON Enable (lots of) debug output. Automatically enabled in in CMake Debug builds.
HAM_LOG_NODE_PREFIX Prepend the HAM node ID before every log output.
HAM_MESSAGE_SIZE Internally used; maximum size of an active message used for a HAM RPC. Does not affect data transfers.
Query-able
HAM_COMM_ONE_SIDED Internally used; defined if the communication back-end uses one-sided communication.
MPI Backend:
HAM_COMM_MPI* Enables the MPI communication backend.
NEC VE Backend:
HAM_COMM_VEO* Enable the NEC SX-Aurora TSUBASA communication backend (based on NEC VEO). A value of 0 configures the code for the Vector Host (VH), a value of 1 for the Vector Engine (VE).
HAM_COMM_VEDMA* Same as above, but enables a different protocol based VE hardware capabilities. (Recommended for performance.)
HAM_COMM_VEO_VH Defined if the code is compiled for the NEC Vector Host (VH), i.e. the CPU.
HAM_COMM_VEO_VE Defined if the code is compiled for the NEC SX-Aurora TSUBASA Vector Engine (VE), i.e. the accelerator device.
HAM_COMM_VEO_STATIC Setup NEC VE backend, for use with statically linked VE binary (otherwise a dynamic library is assumed), passed via --ham-veo-ve-lib argument.
SCIF Backend:
HAM_COMM_SCIF* Enables the SCIF communication backend.
HAM_SCIF_RMA_CPU Enable size-dependent switching between CPU and DMA for RMA (remote memory access).
HAM_SCIF_RMA_CPU_THRESHOLD If the above is defined, the CPU will be used instead of DMA for remote memory accesses with a data size below this value, i.e. SCIF_RMA_USECPU will be used in SCIF-calls.

*only of these should be set at any given time

CMake Options

Option Description
HAM_BUILD_EXECUTABLES Triggers building executables, i.e. tests, benchmarks, etc. If CMake detects a parent scope (i.e. the ham folder is used inside another CMake project, it defaults to OFF, otherwise it is ON.