[Numpy-discussion] Numpy and MKL, update

David Cournapeau cournape@gmail....
Thu Nov 13 22:05:11 CST 2008

On Fri, Nov 14, 2008 at 10:58 AM, David Warde-Farley <dwf@cs.toronto.edu> wrote:
> On 13-Nov-08, at 8:47 PM, David Cournapeau wrote:
>> On Fri, Nov 14, 2008 at 5:23 AM, frank wang <f.yw@hotmail.com> wrote:
>>> Hi,
>>> Can you provide a working example to build Numpy with MKL in window
>>> and
>>> linux?
>>> The reason I am thinking to build the system is that I need to make
>>> the
>>> speed match with matlab.
>> The MKL will only help you for linear algebra, and more specifically
>> for big matrices. If you build your own atlas, you can easily match
>> matlab speed in that area, I think.
> Also make sure that you have a compiler suitable for building ATLAS.
> Basically, if your gcc is older than 4.2, *build a newer gcc and
> gfortran first*, then build ATLAS with that.
>  From http://math-atlas.sourceforge.net/errata.html
>        "The ATLAS architectural defaults were all build with gcc 4.2, except
> on IRIX/MIPS, where gcc was outperformed by SGI's cc. If you use gcc
> 4.0 or 4.1, then your performance will be cut roughly in half on all
> x86 platforms, so such users should install and use gcc 4.2."

I am not sure it is as relevant as before on recent CPU. For example,
on a core 2 duo on RHEL (which does not have gcc 4.2), atlas can reach
more decent performances. The problem was big for Pentium 4 (in part
because the x87 FPU was bad on that architecture, and other oddities
like a deficient cache L1).


More information about the Numpy-discussion mailing list