building_running - noma/ham GitHub Wiki
Building and Running HAM-Offload Applications
The specifics of building and running HAM-offload and applications depends on the targeted system architecture(s) and the communication backend used. In general, each architecture requires its own build, possibly with a respective C++ compiler. Starting an application also differs.
- When MPI is used, programs are built as MPI applications and started via
mpirun. - The NEC SX-Aurora TSUBASA (Vector Engine) requires the device code to be built as a library using the NEC compiler, and then passing the generated library as a command line argument to the host executable, built with a host compiler, e.g. GCC.
- The SCIF backend for on the Intel Xeon Phi accelerator requires executables built for the host and target, which can then be started via
sshon the devices.
There is a separate guide for every communication backend:
For each backend, there are two libraries. The ones with the _explicit suffix are intended for developers who need to explicitly initialise and finalise HAM-Offload, e.g. library authors.
| Backend | Static Libraries | Dynamic Libraries |
|---|---|---|
| MPI | ham_offload_mpi.a, ham_offload_mpi_explicit.a |
libham_offload_mpi.so, libham_offload_mpi_explicit.so |
| NEC VEO | ham_offload_veo.a, ham_offload_veo_explicit.a |
libham_offload_veo.so, libham_offload_veo_explicit.so |
| NEC VEO + VEDMA | ham_offload_vedma.a, ham_offload_vedma_explicit.a |
libham_offload_vedma.so, libham_offload_vedma_explicit.so |
| SCIF | ham_offload_scif.a, ham_offload_scif_explicit.a |
libham_offload_scif.so, libham_offload_scif_explicit.so |
See also:
Using CMake
CMake allows to set a build type and is configured to default to Release, which is equivalent to calling CMake with -DCMAKE_BUILD_TYPE=Release.
CMAKE_BUILD_TYPE |
result |
|---|---|
Debug |
Debug build, HAM_DEBUG will be defined which enables plenty of debug output |
RelWithDebInfo |
Release build with debug symbols, HAM_DEBUG will not be defined, good for debugger runs without all the output. |
Release |
Default: Release build. Use for production. |
If more than one architecture is targeted, multiple builds using different compilers or flags are needed, e.g. by calling CMake like this:
# g++ build for Intel Skylake architecture with AVX-512 instructions
CXX=`which g++` CC=`which gcc` cmake -D CMAKE_CXX_FLAGS="-marchskylake-avx512" ../ham
Replace compiler binaries and flags as needed.