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
- 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)
Run the following command from the
./install.py [-h] [--with-terra TERRA] [--debug] [--gasnet] [--cuda] [-j [THREAD_COUNT]]
- 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
--debugto 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
- For GASNet (networking) support, use
- If you want to build with your own copy of Terra, pass the path to
the Terra directory via the
--with-terraflag. You will be responsible for building Terra yourself if you do this.
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:
To run the test suite, run:
./test.py [-h] [-j [THREAD_COUNT]] [-v]