Enabling Efficient Composition of Parallel Libraries

View project on GitHub

Applications built by composing different parallel libraries perform poorly when those libraries interfere with one another by obliviously using the same physical cores, leading to destructive resource oversubscription. Lithe was developed in the UC Berkeley Parallel Computing Lab as a low-level substrate that provides basic primitives and a standard interface for composing such parallel libraries efficiently. Legacy parallel libraries can be ported into the Lithe framework to provide bolt-on composability without the need to change existing application code. Ports currently exist for both Intel's Thread Building blocks (TBB) and OpenMP. Links to both of these ports are provided below.

Lithe is now part of the DEGAS project, a joint effort between UC Berkeley, LBNL, UT Austin, and Rice University to develop the next generation of programming models, runtime systems and tools to meet the challenges of Exascale systems.

A reference to the current Lithe API can be found here.

The links below provide information to help you familiarize yourself with the overall architecture of Lithe. While many of the interfaces discussed in these papers differ from the API provided by Lithe today, the core philosophy and the primary substance of the ideas remain the same.

Lithe is designed to run on any system that contains a port of the following library:

Parlib has been designed in conjunction with the Akaros OS project in the AMP Lab at UC Berkeley. It defines a set of low-level interfaces for helping build highly parallel systems across multiple operating systems and varying hardware platforms. Ports currently exist for Linux/i686, Linux/x86_64, Akaros/i686, and Akaros/RISC-V.

Make sure you have properly installed Parlib on your system before proceeding with the Lithe installation.

Lithe is made available under a modified BSD Licence.

The latest release can be downloaded here.

If you prefer to work directly from the development branch, we also provide read-only access to our shared github repository, with a tag for the current release:

git clone git://
git checkout release_1_0_0

Once downloaded, follow the standard GNU installation procedure to compile and install it.
If cross compiling, make sure and set the --host configuration option appropriately, (e.g. --host=i686-ros).
Also, if you have Parlib installed in a non-standard location, be sure and set the --with-parlib configure option as well.
Finally, if you install into a non-standard location, don't forget to set your LD_LIBRARY_PATH when running executables that link against Lithe as a shared library.

cd lithe
mkdir build
cd build
../configure --prefix=<install_dir> --host=<host_prefix> --with-parlib=<parlib_install_dir>
<sudo> make install

A number of test applications are included with Lithe and can be compiled from the Lithe build directory as follows:

cd lithe/build
make check
The current tests are:
  • test_cls
  • test_mutex
  • test_recursive_mutex
  • test_condvar
  • test_parent
  • test_scheduler
  • test_mutex_cc
  • test_recursive_mutex_cc
  • test_condvar_cc
  • test_parent_cc
  • test_scheduler_cc
To run them, simply execute them from the current directory.
If they run to completion, they pass.

An online reference to the current Lithe API can be found here.

A pdf version is also available for download.

On Linux, if you installed Lithe into a standard location, you should also be able to access the API reference via one (or both) of the following two commands:

man lithe
info lithe

We have created a lithe-users Google group.
Feel free to join the list and post any questions you have there.

Current Contributors:

Past Contributors: