Le jeudi 18 septembre 2014 à 22:35 +0200, Milan Bouchet-Valat a écrit : > Le jeudi 18 septembre 2014 à 15:12 -0400, Andreas Noack a écrit : > > You are not using a fast BLAS, but the slow reference BLAS which > > unfortunately is the default on Linux. An option is to build Julia > > from source. Usually it is just to download the source and write make. > > Then you'll have Julia compiled with OpenBLAS which is much faster and > > comparable in speed to Intel MKL which MATLAB uses. > My Fedora RPM package uses OpenBLAS, or at least is supposed to. But > indeed only one thread is used in my tests here too. The problem seems > to be that LAPACK is not the OpenBLAS one: > julia> versioninfo() > Julia Version 0.3.0 > Platform Info: > System: Linux (x86_64-redhat-linux) > CPU: Intel(R) Core(TM) i5 CPU M 450 @ 2.40GHz > WORD_SIZE: 64 > BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY) > LAPACK: liblapack > LIBM: libopenlibm > LLVM: libLLVM-3.3 > > And indeed I'm passing USE_SYSTEM_LAPACK=1. I didn't know it would incur > such a slowdown. Is there a way to get Julia use the system's OpenBLAS > version of LAPACK? Replying to myself, it appears I can set LAPACK=-lopenblas and LAPACKNAME=openblas when calling make. These should probably be made the default, even when USE_SYSTEM_LAPACK=1, so that people have to explicitly ask for the slow LAPACK.
The problem is, it doesn't make Julia use more than one thread, even when calling Base.blas_set_num_threads(4). I've even removed all liblapack* files to be sure it isn't used, no luck. So I guess there's a problem with Fedora's OpenBLAS, I'll have a look. Regards