... | ... | @@ -17,6 +17,7 @@ |
|
|
## Pre-requisites
|
|
|
- git: ``sudo apt-get install git``.
|
|
|
- tar: ``sudo apt-get install tar``.
|
|
|
- cpuid: ``sudo apt-get install cpuid``.
|
|
|
- Modern compiler with ``C++11`` support (recen g++, clang, Ubuntu 16.04/Xenial and recent Mac OS clang work fine).
|
|
|
- git-lfs.
|
|
|
- [CMake](cmake) version >= 3.12.
|
... | ... | @@ -51,5 +52,60 @@ |
|
|
7. Install FullMonteSW by following this [guide](https://gitlab.com/FullMonte/FullMonteSW/-/wikis/Developer-Guide#native-development-install-linux-only). We will refer to the build directory of FullMonteSW by ``$FULLMONTE_BUILD_DIR``.
|
|
|
|
|
|
## Installing PDT-SPACE
|
|
|
0. Go to your home directory (or wherever you prefer your workspace to be).
|
|
|
```
|
|
|
> cd $HOME
|
|
|
```
|
|
|
1. Clone the PDT-SPACE repository into your workspace directory.
|
|
|
```
|
|
|
> git clone https://gitlab.com/FullMonte/pdt-space.git
|
|
|
```
|
|
|
2. Create a build directory for out-of-source build for PDT-SPACE.
|
|
|
```
|
|
|
> mkdir -p pdt-space/Build/ReleaseGCC
|
|
|
```
|
|
|
3. Test data requires Git LFS for download. You will need to run git-lfs in the source directory just once to set it up.
|
|
|
```
|
|
|
> cd pdt-space
|
|
|
> git lfs install
|
|
|
```
|
|
|
4. Go to the build directory and get the paths for ``g++`` and ``gcc``.
|
|
|
```
|
|
|
> cd $HOME/pdt-space/Build/ReleaseGCC
|
|
|
> OUT_CXX = "$(which g++)"
|
|
|
> OUT_C = "$(which gxx)"
|
|
|
```
|
|
|
5. Run the following command in the terminal:
|
|
|
```
|
|
|
cpuid | grep -i avx | sort | uniq
|
|
|
```
|
|
|
- If the results state that AVX2 is false, type ``AVX_ARCH = "AVX"``. Otherwise, type ``AVX_ARCH = "AVX2"``.
|
|
|
|
|
|
6. Configure PDT-SPACE with ``cmake`` by executing the following:
|
|
|
```
|
|
|
cmake \
|
|
|
-DARCH=${AVX_ARCH} \
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
-DCMAKE_CXX_COMPILER=${OUT_CXX} \
|
|
|
-DCMAKE_C_COMPILER=${OUT_C} \
|
|
|
-DFullMonteSW_DIR=${FULLMONTESW_BUILD_DIR}/cmake \
|
|
|
-DMOSEK_PREFIX=$HOME/mosek/9.1/tools/platform/linux64x86 \
|
|
|
-DRUN_TEST=OFF \
|
|
|
../..
|
|
|
```
|
|
|
- Once CMake runs without errors, you will have project files for your chosen generator in the build directory.
|
|
|
- **Note**: The above ``cmake`` command assumes that all the required libraries other than FullMonteSW and Mosek are installed globally using ``sudo`` privilages. If that's not the case, please look at the _CMAKE Variables_ section below that summarizes the important variables you need to supply for ``cmake``.
|
|
|
- **Note**: The above ``cmake`` command defaults to the build tool ``make``. If you want to use ``ninja`` for instance, you need to add the following to the command:
|
|
|
```
|
|
|
cmake -G Ninja
|
|
|
```
|
|
|
7. Build PDT-SPACE: From your build directory, invoke your build tool (``make``, ``ninja``, etc) and the software should be built.
|
|
|
```
|
|
|
> make -j<NUM_THREADS>
|
|
|
```
|
|
|
where ``<NUM_THREADS>`` is the number of threads available on your machine to use to speed up the compile time.
|
|
|
|
|
|
### Notes:
|
|
|
- If the build system *generates correctly* and *then* fails, please log an issue in our bug tracker ([this wiki page](Fixing-bugs-and-adding-features)). It's not a bug if prerequisites are not installed (unless they are undocumented), or if they are installed but not provided to CMake. Please include the command line you used to run `cmake` or `ccmake`, a copy of `CMakeCache.txt` from your build directory, and the error text. Thank you!
|
|
|
- If you wish to install the software for use, it will be installed in the `CMAKE_INSTALL_PREFIX` dir when you run `make install`. Note this may require `sudo` if installing in `/usr` or other global dirs.
|
|
|
# Next Steps |
|
|
\ No newline at end of file |