Skip to content
Jeremy edited this page Apr 5, 2018 · 6 revisions

The DARMA Wiki is intended for a couple purposes:

  1. Basic installation instructions
  2. Help for users of DARMA when writing applications
  3. Help for developers of DARMA adding new features

But really, everyone who wants to learn about DARMA should start with the online tutorial - with editable examples! DARMA Tutorial

DARMA provides an asynchronous, data-effects programming model providing deterministic-by-default concurrency. While the programming model and semantics are provided by the frontend header libraries, this repository implements the actual runtime. Before installing the backend, one should have installed the frontend using the instructions here: Frontend Install

Once completed, the only important flags are:

cmake {source_dir} \
 -DCMAKE_INSTALL_PREFIX=... \
 -DCMAKE_CXX_COMPILER=... \
 -Ddarma_frontend_DIR=${fronted_prefix}

setting up the standard CMake build, but also pointing the backend to the frontend installation prefix.

For Spack installation, visit our Spack package repo here:

Building external applications with the DARMA simple backend

Per DARMA requirements, each valid DARMA backend must install a CMake package called 'darma' (or PkgConfig for non-cmake build system). The application then only needs to include in its CMakeLists.txt:

find_package(darma)
target_link_libraries(myproj darma)

During configuration of your DARMA application, simply configure with

-Ddarma_DIR=path/to/simple-backend/cmake

pointing CMake to a valid installed darmaConfig.cmake file. The simple backend will provide one possible darma CMake package for on-node development and initial debugging. However, if wishing to run your application later with a different (possibly distributed DARMA backend) simple change your configuration

-Ddarma_DIR=path/to/other-backend/cmake

Your DARMA application will now grab a different backend's CMake package and configure appropriately for that. NO CHANGES to your application source or CMake files should ever be required when building with different backends - only the options passed to the cmake configuration.

DARMA backends are required to provide CMake variables DARMA_CXX_COMPILER and DARMA_CXX_FLAGS. Each DARMA application is encouraged to include the following after find_package in their CMakeLists.txt:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARMA_CXX_FLAGS}")
set(CMAKE_CXX_COMPILER "${DARMA_CXX_COMPILER}")

MPI Interoperability Mode

Everything is almost exactly the same if your project is not a full DARMA project, but only uses DARMA kernels in MPI interoperability mode. For this, simple change your CMakeLists.txt to use:

find_package(darma)
target_link_libraries(myproj darma_interop)

Every DARMA backend (that supports MPI interoperability) is required to also provide darma_interop.

Clone this wiki locally