Docs · Context Runtime

Install the Context Runtime.

Running the runtime needs nothing beyond a normal install. Writing a ChiMod needs the headers and the clio-core CMake package, which a source or Spack install provides.

Binary
clio_run
CMake package
clio-core (alias of iowarp-core)
Package dir
<

To run it

Every method on the Installation page installs the runtime: the top-level option CLIO_CORE_ENABLE_RUNTIME defaults to ON and the pip wheel pins it on. After any of them:

shell
$ pip install iowarp-core
$ clio_run --help
$ clio_run start

The first import of iowarp_core in Python copies the default configuration to ~/.clio/clio.yaml. The release packages do not create it; without a file the runtime uses built-in defaults, and CLIO_SERVER_CONF points it at your own. The installed copy at <prefix>/etc/clio/clio_default.yaml documents every key.

To build modules

A ChiMod compiles against the runtime headers and links the clio::run::cxx target, so you need an install that includes them. Build from source and install to a prefix, or use Spack, which installs the same tree.

Linux

shell
$ sudo apt install -y build-essential cmake ninja-build pkg-config git \
    libyaml-cpp-dev libcereal-dev libmsgpack-dev libsodium-dev libzmq3-dev
$ git clone --recurse-submodules https://github.com/iowarp/clio-core.git
$ cd clio-core
$ cmake --preset release
$ cmake --build build -j"$(nproc)"
$ cmake --install build --prefix $HOME/clio-inst
$ export PATH=$HOME/clio-inst/bin:$PATH

Or let CI/ci-deps.sh --only-deps release build the dependencies into a conda environment first.

macOS

shell
$ git clone --recurse-submodules https://github.com/iowarp/clio-core.git
$ cd clio-core
$ ./CI/ci-deps.sh --only-deps release
$ conda activate iowarp
$ cmake --preset release -DCLIO_CORE_ENABLE_CONDA=ON
$ cmake --build build -j"$(sysctl -n hw.ncpu)"
$ cmake --install build --prefix $HOME/clio-inst

Windows

powershell
PS&gt;git clone --recurse-submodules https://github.com/iowarp/clio-core.git
PS&gt;cd clio-core
PS&gt;cmake --preset windows-release
PS&gt;cmake --build build --config Release
PS&gt;cmake --install build --config Release --prefix $HOME\clio-inst

Dependencies come from vcpkg; set VCPKG_ROOT first. Module libraries end in _runtime.dll and CLIO_REPO_PATH entries are separated by ;.

With Spack, spack install iowarp and then spack load iowarp puts the prefix on the usual CMake search paths.

Options that matter for module developers

  • CLIO_CORE_ENABLE_RUNTIME (ON): the runtime itself.
  • CLIO_CORE_ENABLE_CTE, CLIO_CORE_ENABLE_CAE, CLIO_CORE_ENABLE_CEE (ON): the engines' modules. A module that forwards to the CTE needs clio::cte::core_client, which the package exports only when the CTE was built.
  • CLIO_CORE_ENABLE_BOOST_COROUTINES (OFF): stackful fibers instead of C++20 coroutines. The handler macros are the same either way.
  • CLIO_CORE_ENABLE_CUDA, CLIO_CORE_ENABLE_ROCM, CLIO_CORE_ENABLE_SYCL (OFF): GPU task submission.
  • CLIO_CORE_ENABLE_TESTS (OFF): the runtime's unit tests, including the external-module test under context-runtime/test/unit/external-chimod.

Finding the CMake package

The install writes the package to lib/cmake/iowarp-core and an alias to lib/cmake/clio-core. Either name works; clio-core is the canonical one. Point CMAKE_PREFIX_PATH at the prefix:

cmake
find_package(clio-core CONFIG REQUIRED)
shell
$ cmake -S . -B build -DCMAKE_PREFIX_PATH=$HOME/clio-inst

The package config finds yaml-cpp and Threads for you, looks for Boost, cereal and msgpack quietly, includes the ClioCoreCommon.cmake helpers that define add_clio_module_client and add_clio_module_runtime, and loads the always-available targets clio::run::cxx, clio::run::admin_client and clio::run::bdev_client. It prints what it found:

output
-- IOWarp Core found:
--   Version: ...
--   Prefix: /home/you/clio-inst
--   Clio Runtime: Available (clio::run::cxx)
--   Admin: Available (clio::run::admin_client, clio::run::admin_runtime)
--   Bdev: Available (clio::run::bdev_client, clio::run::bdev_runtime)

An external repository that uses the per-module packages instead can find_package(clio_run REQUIRED) and find_package(clio_run_admin REQUIRED), as the external-module test does.

Check that it works

shell
$ ls $HOME/clio-inst/lib/cmake/clio-core
clio-coreConfig.cmake  clio-coreConfigVersion.cmake
$ clio_run status
clio runtime (port 9413): STOPPED (clean)

Next: Usage builds a module against this prefix.