Boost - shawfdong/hyades GitHub Wiki

Boost is a set of libraries for the C++ programming language that provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing.

Table of Contents

Installing Boost 1.57.0

Download the tar ball for the latest Boost release, and unpack it:

$ cd /scratch
$ tar xvfj boost_1_57_0.tar.bz2

Build and install Boost 1.57.0[1]:

$ module load python
$ cd boost_1_57_0
$ ./bootstrap.sh --show-libraries \
  --with-python=/pfs/sw/python/Python-2.7.8/bin/python \
  --prefix=/pfs/sw/serial/gcc/boost-1.57.0
$ ./b2 install --prefix=/pfs/sw/serial/gcc/boost-1.57.0

Installing Boost.MPI

Boost.MPI is a C++-friendly interface to the standard Message Passing Interface (MPI). Although there exist C++ bindings for MPI, they offer little functionality over the C bindings. The Boost.MPI library provides an alternative C++ interface to MPI that better supports modern C++ development styles, including complete support for user-defined data types and C++ Standard Library types, arbitrary function objects for collective algorithms, and the use of modern C++ library techniques to maintain maximal efficiency[2].

We'll build Boost.MPI with Intel MPI.

Create a file in the home directory, with the following content:

using mpi : /opt/intel/impi/4.1.3.045/intel64/bin/mpigxx ;

Install Boost.MPI:

$ ./bjam --with-mpi install \
  --prefix=/pfs/sw/serial/gcc/boost-1.57.0

Using Boost

Boost 1.57.0 is installed in /pfs/sw/serial/gcc/boost-1.57.0 on Hyades.

References

  1. ^ Boost - Getting Started on Unix Variants
  2. ^ Boost.MPI
⚠️ **GitHub.com Fallback** ⚠️