Projects

# OpenCilk

Website · GitHub organization

OpenCilk is the latest open-source implementation of the Cilk task-parallel programming platform.

int fib(int n) {
    if (n < 2) return n;
    int x, y;
    cilk_scope {
        x = cilk_spawn fib(n-1);
        y = fib(n-2);
    }
    return x + y;
}

OpenCilk extends C/C++ with a few keywords to expose logical task parallelism in a program. The OpenCilk compiler optimizes Cilk programs using Tapir/LLVM, an extension to LLVM to enable effective compiler analysis and optimization of task-parallel programs. The OpenCilk runtime system schedules and load-balances the Cilk computation automatically in a provably good manner using randomized work stealing.

In addition to the cilk_spawn, cilk_sync, and cilk_for keywords from previous versions of Cilk, OpenCilk supports the following:

  • The cilk_scope keyword, that defines a lexical scope that synchronizes spawned functions.
  • The cilk_reducer keyword, that provides language support for reducers.
  • Range-cilk_for loops, that allow for parallel execution of C++ range-for loops on ranges that support random access.

OpenCilk also provides tools to analyze Cilk programs, including the Cilksan race detector and the Cilkscale scalability analyzer, as well as the CSI framework for compiler instrumentation. For a given program and input, Cilksan offers a provable guarantee to find a race in the program, if one exists under any scheduling, or to certify that no races exist. Cilkscale measures the program's work, span, and parallelism to evaluate how the program's performance will scale on different numbers of processors. Both Cilksan and Cilkscale use Tapir and CSI, a framework for writing tool libraries that use compiler-inserted instrumentation efficiently.

OpenCilk is completely open source and freely available on GitHub. OpenCilk features the latest implementation of the Tapir compiler extension for task parallelism and the CSI compiler-instrumentation framework.

References
Tao B. Schardl, I-Ting Angelina Lee. 2023. OpenCilk: A Modular and Extensible Software Infrastructure for Fast Task-Parallel Code. In PPoPP, 189–203.
Tao B. Schardl, William S. Moses, Charles E. Leiserson. 2019. Tapir: Embedding Recursive Fork-Join Parallelism into LLVM’s Intermediate Representation. In ACM Transactions on Parallel Computing, 6(4).
Tao B. Schardl, Tyler Denniston, Damon Doucet, Bradley C. Kuszmaul, I-Ting Angelina Lee, Charles E. Leiserson. 2017. The CSI Framework for Compiler-Inserted Program Instrumentation. In SIGMETRICS, 1(2), 43:1–43:25.
Tao B. Schardl, William S. Moses, Charles E. Leiserson. 2017. Tapir: Embedding Fork-Join Parallelism into LLVM's Intermediate Representation. In PPoPP, 249–265. Won best paper award; invited to a special issue of ACM Transactions on Parallel Computing.

# CHEFSI

CHEFSI is an interdisciplinary research center at MIT focused on the exascale simulation of coupled high enthalpy fluid-solid interactions. See the CHEFSI website for details.

# CESMIX

CESMIX is an interdisciplinary research center at MIT focused on the exascale simulation of materials in hypersonic flow environments. See the CESMIX website for details.

# Other projects

You can find most of the other software projects itself on or linked from my personal GitHub.

# fccode LaTeX package

fccode Overleaf port and documentation

The fccode package provides fast, safe, and high-quality syntax highlighting of code for LaTeX documents. This package provides LaTeX macros, commands, and environments for syntax-highlighted code figures, in-paragraph code blocks, and inline code snippets. This package uses Pygments to syntax-highlight code, and it includes custom Pygments lexers and formatters to improve syntax-highlighting quality to add new features, including the following:

  • Selecting regions of source files to highlight.
  • Support LaTeX \label{} commands in code, allowing the document to use \ref{} commands to reference lines in the code symbolically.

This package includes latexmk rules and scripts to syntax-highlight code efficiently, in a manner that scales to handle very large documents with lots of code to highlight. In particular, fccode avoids the need for LaTeX's --shell-escape option.

# Code-highlighter tool for slide decks

Code highlighter

This web-based tool adds syntax and semantic highlighting to C/C++ and Cilk code to be easily copy-and-pasted into slide decks.

# PBFS

GitHub

PBFS is a work-efficient parallel breadth-first-search (BFS) algorithm. PBFS uses a custom reducer data structure, called a bag, to efficiently maintain sets of vertices. PBFS is currently implemented in OpenCilk, and the bag reducer is implemented using OpenCilk's cilk_reducer keyword.

Reference
Charles E. Leiserson, Tao B. Schardl. 2010. A work-efficient parallel breadth-first search algorithm (or how to cope with the nondeterminism of reducers). In SPAA, 303–314.

# Materials for "There's plenty of room at the Top"

GitHub · DOI

This repository contains the data and software used for the Science article, "There's plenty of room at the Top: What will drive computer performance after Moore's law?"

Reference
Charles E. Leiserson, Neil C. Thompson, Joel S. Emer, Bradley C. Kuszmaul, Butler W. Lampson, Daniel Sanchez, Tao B. Schardl. 2020. There’s plenty of room at the Top: What will drive computer performance after Moore’s law?. In Science, 368(6495).