From edd at debian.org  Mon Aug 24 13:42:32 2015
From: edd at debian.org (Dirk Eddelbuettel)
Date: Mon, 24 Aug 2015 06:42:32 -0500
Subject: [Rd] Build optimized R : openblas, MKL, ATLAS
In-Reply-To: <CAK1hC9vFZePpqWBprPDqds0ck5g1foBJ4eBWatmLgtbEJCh=uw@mail.gmail.com>
References: <CAK1hC9v6vu+tMLTVMpZd=covXX06cVk2JRLb+jT37yD2yk88ag@mail.gmail.com>
	<s3smvxhnife.fsf@slagelg.uio.no>
	<CAK1hC9vFZePpqWBprPDqds0ck5g1foBJ4eBWatmLgtbEJCh=uw@mail.gmail.com>
Message-ID: <21979.808.561019.747002@max.nulle.part>


On 24 August 2015 at 11:43, arnaud gaboury wrote:
| On Mon, Aug 24, 2015 at 11:29 AM, Bj?rn-Helge Mevik
| <b.h.mevik at usit.uio.no> wrote:
| > arnaud gaboury <arnaud.gaboury at gmail.com> writes:
| >
| >> - Intel MKL: this is part of Intel Parallel Studio and is a paid
| >> software. Now, there is the MKL package distributed by
| >> Revolutionanalytics, but I am not certain how this can be distributed
| >> for free. Is there any kind of difference? In case of use of this
| >> package, do I need to install RRO or can I just build R from GNU
| >> against these libraries?
| >
| > We regularly build the standard R against MKL, simply using
| 
| Do you use proprietary Intel MKL or open source package like OpenBLAS ?

You may be able to switch at will _after_ R has been built and installed.

That is something people simply cannot get their head around but lapack and
blas are an INTERFACE for which several implementations provide suitable
code.

That is the gist behind the package gcbd -- which is really a container for a
paper / vignette where I use(d) the fact that on a Debian-based system I do
have access to several of these (including the MKL) so that I can even script
benchmark runs for comparison _from R_ as it is just a (system) package
removal / installation which can be automated.

The paper never got finished as the gpu/cpu comparison aspect confuses
matters further --- but the basic idea is solid:  you can still switch
later, so benchmarking is possibly.  And desirable as these question pop up
all the time.

For Debian/Ubuntu, I ensure we built using --with-blas --with-lapack and
after that you just swap the system libraries providing them.  You should
only need rebuilds of R if your system fails to make these swappable.

Dirk

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



[Rd] Build optimized R : openblas, MKL, ATLAS
Dirk Eddelbuettel