ar2015
ar2015

Reputation: 6150

What is Armadillo+Atlas , Armadillo+OpenBLAS, Armadillo+uBLAS, Armadillo+MKL?

In many website they talk about Armadillo+something else. What do they mean?

I use Armadillo library in form of

#include <armadillo>

in Linux environment.

In this website

http://nghiaho.com/?p=1726

Armadillo+OpenBLAS is mentioned. What do they mean? How to use Armadillo+OpenBLAS?


UPDATE

Now is more than a year later. I just add this point that Armadillo is a wrapper over implementations such as BLAS or OpenBLAS. It is not a matrix operation implementation.

Upvotes: 2

Views: 3190

Answers (4)

Alexander Korovin
Alexander Korovin

Reputation: 1475

In addition, you should use the key -lopenblas instead -lblas. Also, you must add the path to the folders (include, lib) in the openblas package (previously downloaded and made). In my experience, the order and number of installed packages doesn't matter. I experimented with different versions of openblas packages without reinstalling armadillo.

Upvotes: 1

allanbcampbell
allanbcampbell

Reputation: 41

Armadillo can do its own math or it can call 3rd party libraries to do the math. Atlas, BLAS, OpenBLAS, uBLAS, lapack, MKL are examples of such 3rd party libraries. If Armadillo does its own maths, it will be single thread. Some of these 3rd party libraries can do multi-thread eg OpenBLAS. Some libraries can use GPU eg nvBLAS from Nvidia. Note that nvBLAS only does partial blas implementation and you still need another blas library for what nvBLAS does not do.

You can control Armadillo by editing armadillo_bits/config.hpp or by using -D compiler option to set the relevant precompiler directives for your needs.

Something that might save you time: the order in which you link armadillo and 3rd party libraries is important. Armadillo calls to say lapack and lapack calls to blas so the order should be:

-larmadillo -llapack -lblas otherwise you will have link errors.

Upvotes: 2

nunodsousa
nunodsousa

Reputation: 2805

Be careful with the OpenBLAS version, i.e. you should install the version 0.2.14. Otherwise you will have problems if you want to use multithreads.

So:

1 - remove everything that you have already installed (Armadillo or openBLAS). 2 - Install openBLAS ver 0.2.14 3 - Install Armadillo (if you use the repository probably you will not have access to the last version). 4 - Enjoy it!

Upvotes: 1

mtall
mtall

Reputation: 3620

Instead of linking Armadillo based code with BLAS, you link with OpenBLAS. This can be done manually, or the Armadillo installer can figure out that OpenBLAS is present. See the FAQ for details.

Basically you need to install OpenBLAS first, then install Armadillo (not from a Linux repository, but the downloaded version).

Upvotes: 3

Related Questions