Getting setup#
POLARIS aims to be cross-compilable on both Windows and Linux (including HPC cluster distributions). In general you will need to install the following tools to compile POLARIS:
git
cmake 3.15.4 or newer
a C++17 compatible compiler
gcc 9.3 or 10 (not recommended for debugging)
Clang 10.0.0
Visual Studio 2022
Python 3.8 or newer
Generally you will also need an Integrated Development Environment (IDE) to pull all the above tools together for an actual development workflow. Currently the team uses a mixture of two main IDEs:
Visual Studio
Pros - already installed for compiler, good debugger
Cons - terrible Git support, hard to change branches, hard to use python based build tool
VS Code
Pros - great Git support, faster intellisense and code navigation, highly capable plugin system, can be used for WSL or remote Linux machines
Cons - debugging support isn’t as good as Visual Studio
See the below guides for getting these setup on your OS.
Quick Start#
No matter what platform you are on or tool you are using you will need to:
Clone the repository
git clone https://git-out.gss.anl.gov/polaris/code/polaris-linux.git
Run the python build tool to generate build files (Makefile or Visual Studio Project) for your platform
python build.py -cb -i
This will configure (
-c
) and compile (-b
) the code and prompt you interactively (-i
) for any required information (like the dependencies path)
The following shows this in practice:
cd $HOME # Go to your home directory
mkdir -p git # Create a sub-dir for repositories from git
cd git
git clone https://git-out.gss.anl.gov/polaris/code/polaris-linux.git
python -cb -i
If all you want is a compiled executable, this is all you need. However if you want to modify code, experiment and recompile, you should read the guide appropriate to your workflow. If you don’t know which workflow you want - we recommend the VS Code approach as it has the lowest friction setup.