/pika

Primary LanguageC++Boost Software License 1.0BSL-1.0

Bors enabled CircleCI Linux CI (Debug) Linux CI (HIP, Debug) Linux CI (asan/ubsan) macOS CI (Debug) Codacy Codacy coverage

pika

pika is a C++ library for concurrency and parallelism. It implements senders/receivers (as proposed in P2300) for CPU thread pools, MPI, and CUDA.

Dependencies

pika requires:

pika optionally requires:

Building

pika is built using CMake. Please see the documentation of CMake for help on how to use it. Dependencies are usually available in distribution repositories. Alternatively, pika can be built using spack (pika spack package). The pika repository also includes a shell.nix file for use with nix. The file includes dependencies for regular development. It is provided for convenience only and is not comprehensive or guaranteed to be up to date. It may require the nixos unstable channel.

pika is configured using CMake variables. The most important variables are:

  • PIKA_WITH_MALLOC: This defaults to tcmalloc which requires gperftools. Can be set to tcmalloc, jemalloc, mimalloc, or system. Setting it to system can be useful in debug builds.
  • PIKA_WITH_CUDA: Enable CUDA support.
  • PIKA_WITH_HIP: Enable HIP support.
  • PIKA_WITH_MPI: Enable MPI support.
  • PIKA_WITH_GENERIC_CONTEXT_COROUTINES: Enable the use of Boost.Context for fiber context switching. This has to be enabled on non-Linux and non-x86 platforms.

Tests and examples are disabled by default and can be enabled with PIKA_WITH_TESTS, PIKA_WITH_TESTS_*, and PIKA_WITH_EXAMPLES. Note that reconfiguring pika with PIKA_WITH_TESTS=ON after the option has been off the individual subcategories of PIKA_WITH_TESTS_* must be also enabled explicitly. Use e.g. ccmake or CMakeCache.txt for a list of subcategories. The tests must be explicitly built before running them, e.g. with `cmake --build . --target tests && ctest --output-on-failure.

Documentation

Documentation is a work in progress. The following headers are part of the public API. Any other headers are internal implementation details.

  • pika/barrier.hpp
  • pika/channel.hpp
  • pika/condition_variable.hpp
  • pika/cuda.hpp
  • pika/execution.hpp
  • pika/latch.hpp
  • pika/mpi.hpp
  • pika/mutex.hpp
  • pika/runtime.hpp
  • pika/semaphore.hpp
  • pika/shared_mutex.hpp
  • pika/thread.hpp

Acknowledgements

pika is a fork of HPX focusing on the single-node use case complemented by minimal MPI support.

Name

Pick your favourite meaning from the following: