From ripley at stats.ox.ac.uk  Thu Oct 13 16:53:38 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 13 Oct 2005 15:53:38 +0100 (BST)
Subject: [Rd] R, Wine, and multi-threadedness.
In-Reply-To: <434E6A21.1010800@cimr.cam.ac.uk>
References: <434E321B.3040603@cimr.cam.ac.uk>
	<Pine.LNX.4.61.0510131158100.4655@gannet.stats>
	<434E506F.3080504@cimr.cam.ac.uk> <434E6A21.1010800@cimr.cam.ac.uk>
Message-ID: <Pine.LNX.4.61.0510131546150.5818@gannet.stats>

On Thu, 13 Oct 2005, Hin-Tak Leung wrote:

> Hin-Tak Leung wrote:
>> Prof Brian Ripley wrote:
>> 
>>> On Thu, 13 Oct 2005, Hin-Tak Leung wrote:
> <snipped>
>>>> (2) The interesting question: As I understand it (could be wrong),
>>>> R Win32 is (partly) multi-threaded, and the native linux R is not.
>>>> Is is possible to have better performance or CPU utilisation
>>>> on multi-CPU systems running Win32 R under Wine rather than natively?
>>>> At least on certain specific application areas?
>>> 
>>> 
>>> 
>>> Rterm.exe is multithreaded, but the second thread is only used for input. 
>>> RGui.exe is singlethreaded.  As R for Windows uses a DLL it is about the 
>>> same speed (running Windows natively on the same hardware) as R under ix86 
>>> Linux using a shared library, and that is appreciably slower than R under 
>>> ix86 Linux without (see the R-admin manual).  R under Linux can make use 
>>> of a multithreaded BLAS, but I know of none available for Windows.
>> 
>> 
>> Is the Intel MKL not available form Windows? Somewhat surprising...

It is not as much available as msvcp60.dll, which you were complaining 
about.  It has strict licence conditions, as well as compiler conditions 
(and MinGW does not use the same calling conventions as the compilers 
which are supported).  It is certainly not straightforward how to use it 
with MinGW, and I rather doubt if it would work properly (the Goto BLAS 
only works partially).

> Sorry to reply to my own post.
>
> Actually, FAQ 8.2 for r-on-windows and the netlib FAQ:
> http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-use-a-fast-BLAS_003f
> http://www.netlib.org/blas/faq.html#9
>
> seems to suggest otherwise - from what it says, (1) the BLAS dll can be 
> conveniently replaced without recompiling, (2) most vendor BLAS 
> implementations are multi-threaded. In fact the Atlas implementation
> is explicitly named in both places.
>
> Now, the interesting questions are: (1) is Atlas multi-threaded on *every* 
> platform, or more specifically, on Windows?,

By default it is not multi-threaded on any platform, and we have not 
succeeded in compiling a multi-threaded version on Windows except by using 
Cygwin extensions (i.e. not actually on Windows).

> (2) Can wine use the atlas dll under x86 linux?

`the atlas dll' being?  The ATLAS-based Rblas.dlls on CRAN are not 
multithreaded.  Who knows what wine can do?

Please be more reasonable in your support requests.  Yours is a rather 
unusual use, and we don't have time to support it.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] R, Wine, and multi-threadedness.
Prof Brian Ripley