Installing Nebula
Requirements
Nebula needs the following software to be available:
- cmake 3.18 or greater
- hdf5 1.8.13 or greater, including the high-level libraries
- Optionally: CUDA 9.2 or greater (to run on GPUs)
- A C++14-compliant compiler, such as gcc 5 or later
Getting Nebula
Via the command line with git
installed:
git clone https://github.com/nebula-simulator/nebula
Alternatively, via a web browser without git
installed, you can download the
zip file from
github.
Compiling Nebula
Start your terminal and go to the folder in which you placed Nebula (at the same
level as the and source
folders). We're going to compile the simulator in a
new folder called build
:
mkdir build
cd build
cmake ..
make
This will make a new folder called build
in which all temporary build files
are written. The final executables are located in build/bin
.
The cmake step will attempt to locate the HDF5 libraries and a CUDA compiler.
If it complains that the HDF5 library cannot be found, you can provide a
location by passing -DHDF5_ROOT=<xxx>
to the cmake
command. If a CUDA
compiler is not found, the build step will not build a GPU version of the
simulator.
If you are running CUDA version 10 or earlier, you probably need to install the
cub library from nvidia. It comes included with CUDA 11 and later. You can
download it here. Then, instead of running
cmake ..
as above, you should run
cmake -DCMAKE_CUDA_STANDARD_INCLUDE_DIRECTORIES=/path/to/cub ..
where the /path/to/cub
folder is the top-level folder of cub, that is, the one
with the readme file in it.
Making Nebula available
In order to make Nebula available as a command, you need to add it to your PATH
environment variable. To do this, add the following line to your ~/.bashrc
file:
export PATH=$PATH:/path/to/nebula/build/bin
Alternatively, you can perform that command manually every time you start a new terminal session.
You can find /path/to/nebula/
by typing pwd
when you are in the Nebula
folder.