Boost C++ Libraries
Boost contains a large collection of free peer-reviewed libraries to speed up development of C++ programs. If you are compiling a third party program, you may also run into Boost being a dependency.
Availability
| Cluster | Module/Version |
|---|---|
| BOSE | boost/1.91.0 |
| BGSC | Not Available |
Note: You can simply use module load boost to activate the most recently installed version of this software.
Environment Variables
If your program requires access to Boost and it isn't automatically detected, then you can pass in the $BOOST_ROOT environment variable. This points directly to the root directory of the Boost files on the cluster.
| Variable | Value |
|---|---|
$BOOST_ROOT |
/data/software/default/boost/1.91.0 |
Example:
Example Usage
This example is taken in part from the official Boost website.
example.cpp
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
Compiling:
Running:
Results:
Real Example
Has your research group used Boost in a project? Contact the HPC Team and we'd be glad to feature your work.