Building and Installation
Spiner is self-contained and header-only. Clone it as:
git clone --recursive git@github.com:lanl/spiner.git
Building from source
To build tests and install:
mkdir -p spiner/bin
cd sppiner/bin
cmake -DBUILD_TESTING=ON
make -j
make test
make install
Spiner supports a few cmake configuration options:
BUILD_TESTINGenables testsSPINER_USE_HDF5enables support for saving and loading tables as hdf5.SPINER_HDF5_INSTALL_DIRtells the build system where hdf5 is located.SPINER_USE_KOKKOSenables Kokkos as a backendSPINER_USE_KOKKOS_SRCtells the build system to build Kokkos from source, and where the source directory is located. Note that if you use this option, you cannot install Spiner, only build the tests.SPINER_KOKKOS_INSTALL_DIRtells the build system where to find pre-compiled KokkosSPINER_USE_CUDAenables the Kokkos cuda backendCMAKE_INSTALL_PREFIXsets the install locationCMAKE_BUILD_TYPEsets the build typeSPINER_FORCE_INTERNAL_PORTSforces use of a ports-of-call submodule rather than a system install
HDF5 is searched for and configured via the usual cmake machinery.
A format_spiner target is also added if clang-format is found, so
that make format_spiner will auto-format the repository.
Testing is enabled via Catch2, which is automatically downloaded during the cmake configure phase if needed.
Spack
Warning
The spack build is currently experimental. Please report problems you have as github issues.
Although the spackage has not yet made it to the main Spack
repositories, we provide a spackage for Spiner within the
the source repository. If you have spack installed,
simply call
spack repo add spiner/spack-repo
spack install spiner
The spack repo supports a few variants:
+kokkosenables the Kokkos backend+cudaenables the cuda backend. Acuda_archmust be specified.+hdf5enables HDF5 file support.+mpienables parallel hdf5 support+pythoninstalls python, numpy, and matplotlib support+docadds tooling for building the docs+formatadds support for clang-format
Including Spiner in your Project
Spiner can be included into a cmake project, either in-tree as a
submodule or after installation via find_package.
The cmake system provides the spiner::spiner cmake target.