Reply to topic

Can I use openblas as blas backend in Eigen

chunkaowang
Registered Member
Posts
5
Karma
0
I want to use openblas as backend of blas in Eigen. Is it possible? Thank you!
User avatar ggael
Moderator
Posts
2619
Karma
16
OS
Yes, this should be possible: just compile with -DEIGEN_USE_BLAS and link to openblas.

See http://eigen.tuxfamily.org/dox-devel/To ... elMKL.html for the details.
allanmulin
Registered Member
Posts
9
Karma
0
Well, this does not seem to work with Eigen 3.2.2. First of all, the CMakeFiles.txt file would have to be changed to add the -DEIGEN_USE_BLAS definition:
Code: Select all
add_definitions(-DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE)

Anyway, when I define EIGEN_USE_BLAS before the Eigen headers are included:
Code: Select all
#define EIGEN_USE_BLAS
#include <Eigen/Dense>

I get a fatal error during compilation because the header file mkl.h could not be found. But I don't want to use Intel MKL's library, but OpenBLAS.

Can Eigen really link to OpenBLAS (or any other BLAS library)?

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Gishiki, Google [Bot], koriun, paulus3005, ryanl, Steve Guilford, workoft, Yahoo [Bot]