Pull request Compare This branch is 465 commits ahead of stable.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
examples
scripts
src
tests
.gitignore
README.md
README.spmd.md
install.py
regent.py
test.py
travis.py

README.md

Regent Compiler

This directory contains the compiler for the Regent language.

Quickstart for Ubuntu

sudo apt-get install llvm-3.5-dev libclang-3.5-dev clang-3.5
./install.py --debug
./regent.py examples/circuit.rg

Prerequisites

Regent requires:

  • Python 2.7 or 3.x (for the self-installer and test suite)
  • LLVM and Clang with headers (as of January 2017 LLVM 3.5 is recommended; 3.6-3.9 also work but may be missing debug symbols)

Regent also has a number of transitive dependencies via Legion:

  • Linux, macOS, or another Unix
  • A C++ 98 or newer compiler (GCC, Clang, Intel, or PGI) and GNU Make
  • Optional: CUDA 5.0 or newer (for NVIDIA GPUs)
  • Optional: GASNet (for networking)
  • Optional: LLVM 3.5 (for dynamic code generation)
  • Optional: HDF5 (for file I/O)

Installing

Run the following command from the language directory:

./install.py [-h] [--with-terra TERRA] [--debug] [--gasnet]
             [--cuda] [-j [THREAD_COUNT]]

This command:

  • Downloads and builds Terra. (Terra will recursively download and build LuaJIT).
  • Builds a dynamic library for Legion.
  • (OS X) Patches said dynamic library to avoid hard-coded absolute paths.
  • Sets everything up to run from regent.py.

Notes:

  • Use --debug to enable Legion's debug mode. Debug mode includes significantly more safety checks and better error messages, but also runs signficantly slower than release mode.
  • For CUDA support, use --cuda.
  • For GASNet (networking) support, use --gasnet.
  • If you want to build with your own copy of Terra, pass the path to the Terra directory via the --with-terra flag. You will be responsible for building Terra yourself if you do this.

Running

To use Regent, run:

./regent.py [SCRIPT] [OPTIONS]

Regent source files use the extension .rg. A number of examples are contained in the examples directory. For example:

./regent.py examples/circuit.rg

Tests

To run the test suite, run:

./test.py [-h] [-j [THREAD_COUNT]] [-v]