0

I'm using Windows 10 64bit, and already installed theano. I've downloaded OpenBLAS from: http://sourceforge.net/projects/openblas/files/v0.2.15/OpenBLAS-v0.2.15-Win64-int32.zip/download and put libopenblas.dll in C:\openblas and other dll file from minGW64_dll as well

my .theanorc file:

[global]
floatX = float32
device = gpu

[nvcc]
flags= -LC:\Anaconda2\libs
compiler_bindir= C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin

[blas]
ldflags= -LC:\\openblas -lopenblas

when I try to run C:\Anaconda2\Lib\site-package\theano\misc\check_blas.py

I got something like this:

...
lapack_opt_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd', 'mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
    library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
blas_opt_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
    library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
openblas_lapack_info:
  NOT AVAILABLE
lapack_mkl_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd', 'mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
    library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
blas_mkl_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
    library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
mkl_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
    library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
...

I don't understand, but there is written:

openblas_lapack_info:
  NOT AVAILABLE

Is it correct? or something is error?

I've try to print ldflags using command

print('blas.ldflags=', theano.config.blas.ldflags)

And I think I got the correct output

('blas.ldflags=', '-LC:\\openblas -lopenblas')

So, why when I test using check_blas.py my openblas status is not available?

I'm new in Theano so I hope anybody here can help me, Thank You

abccd
  • 23,977
  • 10
  • 56
  • 68
malioboro
  • 2,624
  • 4
  • 33
  • 47

1 Answers1

1

I don't think Theano uses OpenBLAS directly, I think it only uses it via numpy. So you need to configure numpy to use OpenBLAS. This does not appear to be an easy task on Windows.

See this thread for example.

Your numpy configuration is being printed by Theano's check_blas.py script. That configuration appears to be all set up for using MKL. If you have MKL installed (and appropriately licensed) then you don't need OpenBLAS.

If you don't have MKL installed, despite the numpy config, an alternative to OpenBLAS is to use Anaconda's MKL extensions. This is a commercial product but a license is free to students and non-commercial researchers.

Daniel Renshaw
  • 32,045
  • 8
  • 71
  • 91