Dependencies install¶
Antares-Xpansion depends on several mandatory libraries:
- JsonCpp,
- Google Test,
- OR-Tools,
- Boost : MPI serialization (only for MPI benders compilation), program-options,
- Doxygen for documentation generation,
- GraphViz for Doxygen use.
- TBB for execution policy and parallelization
This section describes the install procedures for the third-party open source libraries used by Antares-Xpansion. The install procedure can be done:
- By using a package manager,
- By compiling the sources after cloning the official git repository.
Install with a package manager¶
For Windows we use vcpkg to download and compile the libraries. vcpkg
is available as a submodule in Antares-Xpansion.
-
You must install the corresponding vcpkg-triplet depending on the Antares version and libraries load:
x64-windows
: 64 bits version with dynamic libraries load,x86-windows
: 32 bits version with dynamic libraries load,x64-windows-static
: 64 bits version with static libraries load,x86-windows-static
: 32 bits version with static libraries load.
The chosen vcpkg-triplet will be named
<vcpkg-triplet>
in this document. -
Init submodule and install vcpkg:
git submodule update --init vcpkg cd vcpkg .\bootstrap-vcpkg.bat
All vcpkg command further described must be run from the vcpkg folder. This folder will be named
<vcpkg_root>
later in this document. -
Install dependencies:
cd vcpkg vcpkg install jsoncpp gtest boost-mpi boost-program-options tbb --triplet <vcpkg-triplet>
Note
Boost-mpi compilation depends on MSMPI redistributable package. Please follow VCPKG procedure :
Please install the MSMPI redistributable package before trying to install this port. The appropriate installer has been downloaded to: <vcpkg_root>/downloads/msmpisetup-10.0.12498.exe
sudo yum install
sudo yum install environment-modules jsoncpp-devel gtest-devel openmpi-devel boost-openmpi-devel boost-program-options doxygen graphviz redhat-lsb-core
sudo yum install libuuid-devel
Antares-Xpansion depends on 2018 <= TBB <= 2020 for libstdc++9 compatibility but centos7 only provide 2013 version. TBB can be build from source using the official source code compatible branch Unfortuanatly the compilation and installation of the official source code can be tedious. One alternative is to trust a third party repository which provide cmake build system for TBB. We propose to use the following third party repository installation procedure
git clone https://github.com/wjakob/tbb.git cd tbb/build cmake3 .. cmake3 --build . --target install -j8
Include and libraries will be installed in /usr/local
sudo apt-get install lsb-release libjsoncpp-dev libgtest-dev libboost-mpi-dev doxygen graphviz libboost-program-options-dev libtbb-dev
sudo apt-get install unzip uuid-dev
Note
Depending on Ubuntu version you might need to compile google test :
cd /usr/src/googletest/
sudo cmake .
sudo cmake --build . --target install
Automatic libraries compilation from git¶
Antares dependencies compilation repository is used as a git submodule for automatic libraries compilation from git.
ALL dependencies can be built at configure time using the option -DBUILD_ALL=ON
(OFF
by default), see here. For a list of available option see Antares dependencies compilation repository.
Some dependencies cannot be installed with a package manager. They can be built at configure step with a cmake
option : -DBUILD_not_system=ON
(ON
by default):
Warning
boost-mpi
is not compiled with this repository. On windows, VCPKG use is mandatory or you must compile boost-mpi
by yourself.
Defining dependency install directory¶
When using multiple directories for Antares development with multiple branches it can be useful to have a common dependency install directory.
Dependencies install directory can be specified with -DDEPS_INSTALL_DIR
. By default, the install directory is <antares_xpansion_checkout_dir>/../rte-antares-deps-<build_type>
.
Note
DEPS_INSTALL_DIR
is added to CMAKE_PREFIX_PATH
.
Pre-compiled libraries download : release version only¶
You can download pre-compiled antares-deps
archive from the Antares dependencies compilation repository. Only release versions are available.
Note
For windows, you must you use a MSVC version compatible with the MSVC version used in GitHub Action.