High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed
Armadillo on Biowulf or Helix

Armadillo is an open source C++ linear algebra library that aims to have a good balance between speed and ease of use. The library supports integer, floating point and complex numbers, as well as a subset of trigonometric and statistics functions. Various matrix decompositions are provided through optional integration with LAPACK, or one its high-performance drop-in replacements, such as MKL from Intel or ACML from AMD.

Loading the armadillo module environment

You must load the armadillo module environment before using the armadillo libraries. This is done by means of the steps illustrated in the following:

biowulf$ module purge                         ## clear module environment [optional]
biowulf$ module list
No modules loaded 
biowulf$ module avail armadillo               ## show  available versions of armadillo
------------------------ /usr/local/lmod/modulefiles -------------------------
  armadillo/6.200.5  (D)
biowulf$ module load armadillo                ## load default  version of armadillo
[+] Loading armadillo 6.200.5 libraries
biowulf$ module list 

Currently Loaded Modules:
  1) armadillo/6.200.5

Using the armadillo C++ library
The procedure for compiling a C++ application with the armadillo library is simple as shown here by the "module help armadillo" command:

biowulf$ module help armadillo

 Module Specific Help for "armadillo/6.200.5" 
To build and link a C++ program with the armadillo library, use commands like:

    $ g++ -O2 -o program program.cpp -I$ARMADILLO_INCLUDE -L$ARMADILLO_LIB -larmadillo

where "$ARMADILLO_INCLUDE" is the path to armadillo include files, 
      "$ARMADILLO_LIB" is the path to armadillo library files.

and both variables are set by the "module load armadillo" command.