From edd @end|ng |rom deb|@n@org  Fri Jun 14 15:44:36 2019
From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel)
Date: Fri, 14 Jun 2019 08:44:36 -0500
Subject: [Rd] compiler flags for performance
In-Reply-To: <CAK1hC9vfEvA2dZHLZZKh_6jPF9kX2fER=3MdwqfLrkfBbUpnOQ@mail.gmail.com>
References: <3cd16957-b4f0-6d32-25ed-c3b1ffa4f241@yahoo.co.uk>
 <23810.26695.725131.693656@rob.eddelbuettel.com>
 <b312e475-575f-5173-d7c8-2b404690b1ce@yahoo.co.uk>
 <CAK1hC9vfEvA2dZHLZZKh_6jPF9kX2fER=3MdwqfLrkfBbUpnOQ@mail.gmail.com>
Message-ID: <23811.42180.811363.513415@rob.eddelbuettel.com>


On 14 June 2019 at 15:22, arnaud gaboury wrote:
| I have build R with Intel MKL.The libraries are free for one year (maybe
| did it change). The build is far from being trivial. Please find on my
| github[0] some details

Gee, when oh when does this "meme" of "I built R with MKL" die?

BLAS/LAPACK are _an interface_ and once you tell R to configure with BLAS as
a shared library, _all_ matching BLAS/LAPACK libraries become _pluggable_. My
gcbd package and vignette demonstrated that a decade+ ago (then using Goto).
It also holds for MKL, and these days Intel tries harder with a) friendlier
licenses and b) better packaging -- they even give .deb (and I believe .rpm).

So now you just drop MKL in/out with a single script which you can find here
https://github.com/eddelbuettel/mkl4deb with supporting blog posts at
http://dirk.eddelbuettel.com/blog/2018/04/15#018_mkl_for_debian_ubuntu

So please, let's not repeat this 'you have to use Revolution / Microsoft /
$whatever R to get MKL' or 'you have to recompile R for MKL'.

Lastly, if it matters is up to the beholder. Because the optmization in the
MKL appears to come from _many_ explicit code paths for many Intel cpu
(micro-)architectures, the installed footprint is sizeable -- IIRC it was 2gb
when I wrote the blog post above.  My linear algebra use (at home) is light
so I just kept OpenBLAS which is almost as fast, and proper free software
with a smaller installation footprint. Your mileage, as they say, may vary.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] compiler flags for performance
Dirk Eddelbuettel