Boost 1.79

Boost provides free peer-reviewed portable C++ source libraries. Many scientific codes uses Boost as it provides template-based sources that facilitate development of numerical algorithms.

Compilation of boost libraries is a bit unusual. Boost can be used a template only library with no compilation involved. However, if you want to use any of the separately-compiled Boost libraries, you’ll need to acquire library binaries.

On Spruce and Thorny, the native versions of GCC and Python are too old for compiling boost. For that reason, GCC 9.3 and Python 3.9.7 will be used instead.

Downloading the code

By April, 2022, the latest version available is 1.79 that can be downloaded with boost_1_79_0.tar.bz2

On the clusters the canonical location for sources is /shared/src. Download the archive there and uncompress it:

wget https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2
tar -jxvf boost_1_79_0.tar.bz2
cd boost_1_79_0

Bootstrap for GCC 9.3

Load the modules for GCC and Python:

module load lang/gcc/9.3.0 lang/python/cpython_3.9.7_gcc93

With those two modules, before compiling boost, run the bootstrap script indicating python 3.x executable and location for installation:

./bootstrap.sh --with-python=python3 --prefix=/shared/software/libs/boost/1.79_gcc93 --with-libraries=all

Compile and install boost

Boost libraries can be compiled and installed with:

./b2 install --prefix=/shared/software/libs/boost/1.79_gcc93