jeromerobert / hmat-oss

A hierarchical matrix C/C++ library
GNU General Public License v2.0
22 stars 11 forks source link

Fix undeclared openblas_set_num_threads #62

Closed jschueller closed 5 years ago

jschueller commented 5 years ago

I cannot compile with openblas:

disable_threading.cpp:60:5: error: use of undeclared identifier 'openblas_set_num_threads'
    openblas_set_num_threads(1);
jeromerobert commented 5 years ago

Hello Julien. Which version of OpenBLAS is it ?

jschueller commented 5 years ago

Hi, I'm using 0.3.6

jschueller commented 5 years ago

openblas does not have headers that declare this, so how could this work.

jeromerobert commented 5 years ago

Yes it does: https://github.com/xianyi/OpenBLAS/blob/develop/cblas.h#L13. May be you are using the cblas.h of Debian which is generic for all BLAS ?

jschueller commented 5 years ago

oh, indeed, cblas.h is taken from lapack

jschueller commented 5 years ago

or maybe we could define if only if the cblas header does not come from openblas:

#ifndef OPENBLAS_THREAD
void openblas_set_num_threads(int num_threads);
#endif