* If you haven't acquired a Mosek license yet, see [Mosek Requirement](Install#common-requirements).
* If you haven't acquired a Mosek license yet, see [Mosek Requirement](Install#common-requirements).
* If you haven't installed Docker yet, see [Docker](docker).
* If you haven't installed Docker yet, see [Docker](docker).
## Setting up the container
## Setting up the container
* Please follow the instructions in the [User Installation Guide](User-Installation#setting-up-a-container) on how to set up a docker container for PDT-SPACE on either Linux or Windows.
* Please follow the instructions in the [User Installation Guide](User-Installation#setting-up-a-container) on how to set up a docker container for PDT-SPACE on either Linux or Windows.
* Once you run the docker image, you can find the source code of PDT-SPACE under ``/src/pdt-space``. You can start developing in this directory. The build system is under ``/src/pdt-space/Build``.
* Once you run the docker image, you can find the source code of PDT-SPACE under ``/src/pdt-space``. You can start developing in this directory. The build system is under ``/src/pdt-space/Build``.
* The Intel Vtune profiling tool has been added to the docker image, to set up the environment source the script ``/opt/intel/oneapi/setvars.sh``.
* The Intel Vtune profiling tool has been added to the docker image, to set up the environment source the script ``/opt/intel/oneapi/setvars.sh``.
# Native Development Install (Linux Only)
# Native Development Install (Linux Only)
- Note: These instructions assume you have administrative privileges (``sudo``) on your machine.
- Note: These instructions assume you have administrative privileges (``sudo``) on your machine.
- Note: We will use ``$HOME`` to refer to your home directory.
- Note: We will use ``$HOME`` to refer to your home directory.
## Pre-requisites
## Pre-requisites
- git: ``sudo apt-get install git``.
- git: ``sudo apt-get install git``.
- tar: ``sudo apt-get install tar``.
- tar: ``sudo apt-get install tar``.
- cpuid: ``sudo apt-get install cpuid``.
- 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).
- Modern compiler with ``C++20`` support (recen g++, clang, Ubuntu 24.04 and recent Mac OS clang work fine).
- git-lfs.
- git-lfs.
-[CMake](cmake) version >= 3.12.
-[CMake](cmake) version >= 3.28.3
-[Mosek Fusion C++ API](https://www.mosek.com/downloads/9.1.13/) version 9.1 - Mosek is the optimization library that PDT-SPACE uses to solve convex optimization problems. The library provides a free academic license for faculty and students that can be downloaded from their website.
-[Mosek Fusion C++ API](https://www.mosek.com/downloads/11.0.13/) version 11.0 - Mosek is the optimization library that PDT-SPACE uses to solve convex optimization problems. The library provides a free academic license for faculty and students that can be downloaded from their website.
-[Boost](www.boost.org) version >= 1.58.0 with serialization, timer, date\_time, system, program\_options unit\_test\_framework compiled
-[Boost](www.boost.org) version >= 1.83.0 with serialization, timer, date\_time, system, program\_options unit\_test\_framework compiled
(Ubuntu package ``libboost-all-dev``)
(Ubuntu package ``libboost-all-dev``)
-[VTK](https://www.vtk.org) 7.1.1 - needs to be built from source (it uses CMake, so see section [CMake](cmake))
-[VTK](https://www.vtk.org) 9.4.1 - needs to be built from source (it uses CMake, so see section [CMake](cmake))
-[Eigen](eigen.tuxfamily.org/) version >= 3.0 - can be install using ``sudo apt-get install libeigen3-dev``. Eigen3 is a C++ template library for linear algebra.
-[Eigen](eigen.tuxfamily.org/) version >= 3.0 - can be install using ``sudo apt-get install libeigen3-dev``. Eigen3 is a C++ template library for linear algebra.
-[FullMonteSW](gitlab.com/FullMonte/FullMonteSW) Fastest open-source tetrahedral Monte Carlo simulator for light propagation in biological tissues. Please, follow their [wiki](https://gitlab.com/FullMonte/FullMonteSW/-/wikis/Developer-Guide#native-development-install-linux-only) to see how to install it.
-[FullMonteSW](gitlab.com/FullMonte/FullMonteSW) Fastest open-source tetrahedral Monte Carlo simulator for light propagation in biological tissues. Please, follow their [wiki](https://gitlab.com/FullMonte/FullMonteSW/-/wikis/Developer-Guide#native-development-install-linux-only) to see how to install it.
## Installing all Required Libraries, Packages and Software to run PDT-SPACE
## Installing all Required Libraries, Packages and Software to run PDT-SPACE
1. If you haven't already done so, install git by typing: ```sudo apt-get install git```.
1. If you haven't already done so, install git by typing: ```sudo apt-get install git```.
2. Install git-lfs. We need ``curl`` for this, so this package will also be installed.
2. Install git-lfs. We need ``curl`` for this, so this package will also be installed.
> cd mosek/9.1/tools/platform/linux64x86/src/fusion_cxx
> cd /usr/local/mosek/11.0/tools/platform/linux64x86/src/fusion_cxx
> make install
> make install
```
```
This will install Mosek version 9.1.13 under ``$HOME/mosek/9.1/tools/platform/linux64x86``.
This will install Mosek version 11.0.13 under ``$HOME/mosek/11.0/tools/platform/linux64x86``.
-**Note:** You still need to obtain a [Mosek License](https://www.mosek.com/products/academic-licenses/) and store it under your ``$HOME`` directory.
-**Note:** You still need to obtain a [Mosek License](https://www.mosek.com/products/academic-licenses/) and store it under your ``$HOME`` directory.
5. Install boost 1.58 by typing: ``sudo apt-get install libboost-all-dev``.
5. Install boost 1.83 by typing: ``sudo apt-get install libboost-all-dev``.
6. Install VTK 7.1.1 by following the instructions in this [guide](vtk#how-to-install).
6. Install VTK 9.4.1 by following the instructions in this [guide](vtk#how-to-install).
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``.
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
## Installing PDT-SPACE
0. Go to your home directory (or wherever you prefer your workspace to be).
0. Go to your home directory (or wherever you prefer your workspace to be).
```
```
> cd $HOME
> cd $HOME
```
```
1. Clone the PDT-SPACE repository into your workspace directory.
1. Clone the PDT-SPACE repository into your workspace directory.
- Once CMake runs without errors, you will have project files for your chosen generator in the build directory.
-DUSE_CUDA=1 \
-**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``.
-DRUN_TEST=OFF \
-**Note**: The above ``cmake`` command defaults to the build tool ``make``. If you want to use ``ninja`` for instance, you need to start the command with:
../..
```
```
> cmake -G Ninja
- 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``.
7. Build PDT-SPACE: From your build directory, invoke your build tool (``make``, ``ninja``, etc) and the software should be built.
-**Note**: The above ``cmake`` command defaults to the build tool ``make``. If you want to use ``ninja`` for instance, you need to start the command with:
```
```
> make -j<NUM_THREADS>
> cmake -G Ninja
```
```
where ``<NUM_THREADS>`` is the number of threads available on your machine to use to speed up the compile time.
7. Build PDT-SPACE: From your build directory, invoke your build tool (``make``, ``ninja``, etc) and the software should be built.
```
### Notes:
> make -j<NUM_THREADS>
- 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.
where ``<NUM_THREADS>`` is the number of threads available on your machine to use to speed up the compile time.
### CMake Variables:
### Notes:
CMake variables can be specified on the command line in the form ``-D<var>=<value>``, eg. ``-DCMAKE_BUILD_TYPE=RELEASE``
- 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!
Some useful/important variables are listed below:
- 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.
CMake variables can be specified on the command line in the form ``-D<var>=<value>``, eg. ``-DCMAKE_BUILD_TYPE=RELEASE``
|CMAKE\_BUILD\_TYPE |Release, Debug, Debug\_check or RelWithDebInfo|Build type (Recommended: Release for highest performance)|
Some useful/important variables are listed below:
|Boost\_DIR |path |Directory prefix of Boost's ``include/boost`` and ``lib`` directories. May be omitted if they are in the standard location (eg. installed by package manager)|
|VTK\_DIR |path |The location of VTKConfig.cmake. May be omitted if installed globally. |
|Variable |Values |Description |
|MOSEK\_PREFIX |path |Directory prefix of Mosek's ``h`` and ``bin`` directories|
|FullMonteSW\_DIR |path |The location of FullMonteSWConfig.cmake |
|CMAKE\_BUILD\_TYPE |Release, Debug, Debug\_check or RelWithDebInfo|Build type (Recommended: Release for highest performance)|
|Eigen3\_DIR |path |The location of Eigen3Config.cmake |
|Boost\_DIR |path |Directory prefix of Boost's ``include/boost`` and ``lib`` directories. May be omitted if they are in the standard location (eg. installed by package manager)|
|CMAKE\_INSTALL\_PREFIX |path |Location where files are installed when the ``install`` target is invoked |
|VTK\_DIR |path |The location of VTKConfig.cmake. May be omitted if installed globally. |
|ARCH |AVX/AVX2 |Supported instruction architecture of the current machine |
|MOSEK\_PREFIX |path |Directory prefix of Mosek's ``h`` and ``bin`` directories|
|FullMonteSW\_DIR |path |The location of FullMonteSWConfig.cmake |
# Next Steps
|Eigen3\_DIR |path |The location of Eigen3Config.cmake |
|CMAKE\_INSTALL\_PREFIX |path |Location where files are installed when the ``install`` target is invoked |
|ARCH |AVX/AVX2 |Supported instruction architecture of the current machine |
# Next Steps
In order to verify your installation, please visit the [Running PDT-SPACE](Running-PDT-SPACE) tutorial.
In order to verify your installation, please visit the [Running PDT-SPACE](Running-PDT-SPACE) tutorial.