Line 5: | Line 5: | ||
}} | }} | ||
− | + | == Which Versions of Boost are Available? == | |
− | + | ||
− | + | ||
SHARCNET has a number of Boost versions available as special modules. The available versions can be viewed by running: | SHARCNET has a number of Boost versions available as special modules. The available versions can be viewed by running: | ||
Line 28: | Line 26: | ||
------------------------------------ /opt/sharcnet/modules ------------------------------------- | ------------------------------------ /opt/sharcnet/modules ------------------------------------- | ||
boost/gcc482-openmpi183/1.50.0 boost/intel12-openmpi162/1.50.0 | boost/gcc482-openmpi183/1.50.0 boost/intel12-openmpi162/1.50.0 | ||
− | boost/gcc482-openmpi183/1.53.0 boost/intel12-openmpi162/1. | + | boost/gcc482-openmpi183/1.53.0 boost/intel12-openmpi162/1.50.0 |
− | boost/gcc482-openmpi183/1.55.0 boost/intel12-openmpi162/1. | + | boost/gcc482-openmpi183/1.55.0 boost/intel12-openmpi162/1.50.0 |
boost/gcc482-openmpi183/1.57.0 boost/intel12-openmpi162/1.57.0 | boost/gcc482-openmpi183/1.57.0 boost/intel12-openmpi162/1.57.0 | ||
boost/intel/1.55.0 boost/intel15-noopenmpi/1.57.0 | boost/intel/1.55.0 boost/intel15-noopenmpi/1.57.0 | ||
Line 37: | Line 35: | ||
i.e., the following versions of Boost are available: | i.e., the following versions of Boost are available: | ||
# Boost versions 1.50, 1.53, 1.55, and 1.57 for GCC v4.8.2 and OpenMPI v1.8.3 | # Boost versions 1.50, 1.53, 1.55, and 1.57 for GCC v4.8.2 and OpenMPI v1.8.3 | ||
+ | #* i.e., boost/gcc482-openmpi183/1.50.0, boost/gcc482-openmpi183/1.53.0, boost/gcc482-openmpi183/1.55.0, boost/gcc482-openmpi183/1.57.0 | ||
# Boost versions 1.50, 1.53, 1.55, and 1.57 for Intel v12 and OpenMPI v1.6.2 | # Boost versions 1.50, 1.53, 1.55, and 1.57 for Intel v12 and OpenMPI v1.6.2 | ||
+ | #* i.e., boost/intel12-openmpi162/1.50.0, boost/intel12-openmpi162/1.53.0, boost/intel12-openmpi162/1.55.0, boost/intel12-openmpi162/1.57.0 | ||
# Boost version 1.57 for Intel v15 without OpenMPI features (i.e., the "noopenmpi" item). | # Boost version 1.57 for Intel v15 without OpenMPI features (i.e., the "noopenmpi" item). | ||
+ | #* i.e., boost/intel15-noopenmpi/1.57.0 | ||
'''NOTE:''' The boost/intel/1.55.0 module should not be used --it is older and will be removed in the near future. Use one of the other Boost modules instead. | '''NOTE:''' The boost/intel/1.55.0 module should not be used --it is older and will be removed in the near future. Use one of the other Boost modules instead. | ||
Line 49: | Line 50: | ||
'''NOTE:''' If you need a specific version of Boost compiled for a specific C++ compiler, version of OpenMPI, and/or a specific version of Python, then submit a ticket requesting such. Be sure to mention all required software packages and which versions are needed. | '''NOTE:''' If you need a specific version of Boost compiled for a specific C++ compiler, version of OpenMPI, and/or a specific version of Python, then submit a ticket requesting such. Be sure to mention all required software packages and which versions are needed. | ||
− | + | == Using a Specific Version of Boost == | |
− | + | ||
To use a specific version of Boost, do the following: | To use a specific version of Boost, do the following: | ||
Line 69: | Line 69: | ||
Once this is done, you may use Boost (e.g., write #include <boost/filesystem.hpp> in your code, etc.). No special compiler options will be required. | Once this is done, you may use Boost (e.g., write #include <boost/filesystem.hpp> in your code, etc.). No special compiler options will be required. | ||
− | + | == If Special Compiler Options are Required == | |
− | + | ||
If you are not having success building your code using Boost (e.g., in a Makefile), you might need to manually specify the INCLUDE and LIB directories. You can get these paths by running the following command (replacing the full Boost module name with the one you've loaded), e.g., | If you are not having success building your code using Boost (e.g., in a Makefile), you might need to manually specify the INCLUDE and LIB directories. You can get these paths by running the following command (replacing the full Boost module name with the one you've loaded), e.g., | ||
Line 91: | Line 90: | ||
$ | $ | ||
</pre> | </pre> | ||
− | + | i.e., for Boost 1.57.0 (flavour gcc482-openmpi183) you could explicitly invoke the compiler with: | |
− | + | <pre> | |
− | + | cxx $CPPFLAGS $LDFLAGS yoursourcecode.cxx | |
− | + | </pre> | |
+ | or manually specify the CPPFLAGS and LDFLAGS variables: | ||
+ | <pre> | ||
+ | cxx -I/opt/sharcnet/boost/1.57.0/gcc482-openmpi183/include -L/opt/sharcnet/boost/1.57.0/gcc482-openmpi183/lib yoursourcecode.cxx | ||
+ | </pre> | ||
== Operating System Installed Boost == | == Operating System Installed Boost == |
Revision as of 16:18, 24 January 2015
BOOST |
---|
Description: free peer-reviewed portable C++ source libraries |
SHARCNET Package information: see BOOST software page in web portal |
Full list of SHARCNET supported software |
Contents
Which Versions of Boost are Available?
SHARCNET has a number of Boost versions available as special modules. The available versions can be viewed by running:
module avail boost
and/or by viewing the BOOST software page in the web portal.
At the present time, when you look up the available boost modules you will see output such as:
$ module avail boost ------------------------------------ /opt/sharcnet/modules ------------------------------------- boost/gcc482-openmpi183/1.50.0 boost/intel12-openmpi162/1.50.0 boost/gcc482-openmpi183/1.53.0 boost/intel12-openmpi162/1.53.0 boost/gcc482-openmpi183/1.55.0 boost/intel12-openmpi162/1.55.0 boost/gcc482-openmpi183/1.57.0 boost/intel12-openmpi162/1.57.0 boost/intel/1.55.0 boost/intel15-noopenmpi/1.57.0 ------------------------------------ /opt/sharcnet/modules ------------------------------------- boost/gcc482-openmpi183/1.50.0 boost/intel12-openmpi162/1.50.0 boost/gcc482-openmpi183/1.53.0 boost/intel12-openmpi162/1.50.0 boost/gcc482-openmpi183/1.55.0 boost/intel12-openmpi162/1.50.0 boost/gcc482-openmpi183/1.57.0 boost/intel12-openmpi162/1.57.0 boost/intel/1.55.0 boost/intel15-noopenmpi/1.57.0 $
i.e., the following versions of Boost are available:
- Boost versions 1.50, 1.53, 1.55, and 1.57 for GCC v4.8.2 and OpenMPI v1.8.3
- i.e., boost/gcc482-openmpi183/1.50.0, boost/gcc482-openmpi183/1.53.0, boost/gcc482-openmpi183/1.55.0, boost/gcc482-openmpi183/1.57.0
- Boost versions 1.50, 1.53, 1.55, and 1.57 for Intel v12 and OpenMPI v1.6.2
- i.e., boost/intel12-openmpi162/1.50.0, boost/intel12-openmpi162/1.53.0, boost/intel12-openmpi162/1.55.0, boost/intel12-openmpi162/1.57.0
- Boost version 1.57 for Intel v15 without OpenMPI features (i.e., the "noopenmpi" item).
- i.e., boost/intel15-noopenmpi/1.57.0
NOTE: The boost/intel/1.55.0 module should not be used --it is older and will be removed in the near future. Use one of the other Boost modules instead.
All of the aforementioned versions of Boost have been built with the operating system's installed Python. You can see which version of Python it will use by running:
rpm -qi python
NOTE: If you need a specific version of Boost compiled for a specific C++ compiler, version of OpenMPI, and/or a specific version of Python, then submit a ticket requesting such. Be sure to mention all required software packages and which versions are needed.
Using a Specific Version of Boost
To use a specific version of Boost, do the following:
- Unload any loaded OpenMPI modules that will conflict.
- Unload any loaded C++ compiler modules that will conflict.
- Load any required C++ and OpenMPI modules.
- Load the required version of Boost.
e.g.,
$ module list # View which modules are currently loaded $ module unload openmpi/intel/1.6.2 # Unload the OpenMPI (for Intel) $ module unload intel/12.1.3 # Unload the Intel C++ compiler $ module load gcc/4.8.2 # Load GCC v4.8.2 $ module load openmpi/gcc/1.8.3 # Load OpenMPI (for GCC) $ module load boost/gcc482-openmpi183/1.57.0 # Load Boost v1.57 for GCC 4.8.2 and OpenMPI v1.8.3
Once this is done, you may use Boost (e.g., write #include <boost/filesystem.hpp> in your code, etc.). No special compiler options will be required.
If Special Compiler Options are Required
If you are not having success building your code using Boost (e.g., in a Makefile), you might need to manually specify the INCLUDE and LIB directories. You can get these paths by running the following command (replacing the full Boost module name with the one you've loaded), e.g.,
$ module show boost/gcc482-openmpi183/1.57.0 ------------------------------------------------------------------- /opt/sharcnet/modules/boost/gcc482-openmpi183/1.57.0: module-whatis Provides boost 1.57.0 (flavor gcc482-openmpi183) built using gcc/4.8.2, openmpi/gcc/1.8.3 on centos64. conflict intel conflict pgi conflict python prereq gcc/4.8.2 prereq openmpi/gcc/1.8.3 prepend-path --delim CPPFLAGS -I/opt/sharcnet/boost/1.57.0/gcc482-openmpi183/include prepend-path --delim LDFLAGS -L/opt/sharcnet/boost/1.57.0/gcc482-openmpi183/lib prepend-path LD_RUN_PATH /opt/sharcnet/boost/1.57.0/gcc482-openmpi183/lib ------------------------------------------------------------------- $
i.e., for Boost 1.57.0 (flavour gcc482-openmpi183) you could explicitly invoke the compiler with:
cxx $CPPFLAGS $LDFLAGS yoursourcecode.cxx
or manually specify the CPPFLAGS and LDFLAGS variables:
cxx -I/opt/sharcnet/boost/1.57.0/gcc482-openmpi183/include -L/opt/sharcnet/boost/1.57.0/gcc482-openmpi183/lib yoursourcecode.cxx
Operating System Installed Boost
If you don't load any SHARCNET-provided Boost module, you will be using the operating system's installed version of Boost. To determine which version(s) of boost and boost-devel are installed run the following commands:
rpm -qi boost rpm -qi boost-devel
NOTE: These versions may be very old, they won't be upgraded or maintained by SHARCNET staff unless something in the operating system requires it to be upgraded. You are therefore strongly encouraged to use the SHARCNET-provided Boost modules discussed earlier on this page.
References
o Boost Homepage
http://www.boost.org/