layout | title | sidebar | highlight_first | permalink |
---|---|---|---|---|
page |
Install |
false |
false |
/install/index.html |
These quickstart instructions describe how to install Regent on Ubuntu and macOS, respectively.
If you use Ubuntu, you can install Regent by running:
{% highlight bash %}
sudo apt-get install build-essential cmake git wget wget https://github.com/terralang/llvm-build/releases/download/llvm-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu.tar.xz tar xf clang+llvm-13.0.0-x86_64-linux-gnu.tar.xz export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:$PWD/clang+llvm-13.0.0-x86_64-linux-gnu"
git clone -b master https://github.com/StanfordLegion/legion.git cd legion/language ./install.py --debug --rdir=auto
./regent.py examples/circuit_sparse.rg {% endhighlight %}
(These instructions have been tested on Ubuntu 18.04 and 20.04.)
If you use macOS, you can install Regent by running:
{% highlight bash %}
sudo xcode-select --install
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-macos-universal.tar.gz tar xfz cmake-3.22.2-macos-universal.tar.gz export PATH="$PATH:$PWD/cmake-3.22.2-macos-universal/CMake.app/Contents/bin"
curl -L -O https://github.com/terralang/llvm-build/releases/download/llvm-13.0.0/clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz tar xfJ clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:$PWD/clang+llvm-13.0.0-x86_64-apple-darwin"
export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" export CXXFLAGS="-std=c++11"
git clone -b master https://github.com/StanfordLegion/legion.git cd legion/language ./install.py --debug --rdir=auto
./regent.py examples/circuit_sparse.rg {% endhighlight %}
(These instructions have been tested on macOS 12.3 on an x86 Mac.)
Complete instructions for other systems follow below.
For supercomputers, you may refer directly to the README.
Regent requires:
- Linux, macOS, or another Unix
- A C++ 11 (or newer) compiler (GCC, Clang, Intel, or PGI) and GNU Make
- Python 3.5 or newer
- LLVM and Clang with headers:
- LLVM 13.0 is recommended
- See the version support table for more details
- Pre-built binaries are available here
- Optional (but strongly recommended): CMake 3.5 or newer
There are also a number of optional dependencies. For most users, we recommend skipping these initially and installing them later on an as-needed basis.
- Optional: CUDA 7.0 or newer (for NVIDIA GPUs)
- Optional: GASNet (for networking, see installation instructions)
- Optional: HDF5 (for file I/O)
Regent includes a self-installer which downloads Terra and builds the Regent compiler. Run:
{% highlight bash %} git clone -b master https://github.com/StanfordLegion/legion.git cd legion/language ./install.py --debug {% endhighlight %}
For other installation options (e.g., multi-node and GPU configurations, including supercomputers), see the README.
Regent includes a frontend interpreter which can be run with:
{% highlight bash %} ./regent.py <script> {% endhighlight %}
For example:
{% highlight bash %} ./regent.py examples/circuit_sparse.rg {% endhighlight %}
(Note: The Regent frontend can also be run without arguments to obtain a Terra/LuaJIT shell. However, this mode is not very useful because of the way that Terra language extensions works. Also, the Legion runtime is not currently reentrant, making interactive use difficult.)
Regent syntax highlighting modes are available for the following editors: