[R-sig-hpc] Intel Phi Coprocessor?
simon.urbanek at r-project.org
Mon Jun 10 16:35:49 CEST 2013
On Jun 10, 2013, at 10:00 AM, ivo welch wrote:
> thanks, simon. for me, it is all about running the same code faster,
> i.e., without much optimization. so no phi for me. An Intel i7 costs
> about $100 more (of a b-o-m cost of $1,000) than an i5. I presume this
> is still worth it, because library parallel does use threads. correct?
No, parallel does not use threads. multicore forks off a process from the current session, all the other methods create a new process, send the data to it etc.
However, with so few cores that i5/i7 have I would certainly go for more. If you want real speed, you have to pay much more ;)
> [this is asking too much, but here is a related quick question. does stock R take advantage of SSE? SSEx? AVX? AVX2? are these all single-float based which stock R does not support anyway?]
That depends on how you compile R. R itself doesn't, but the compiler will use sse or avx if instructed so and system libraries do.
At least with gcc I found this to be a mixed bag, sse is certainly faster, but although avx can in theory speed double-precision arithmetics, it can also slow it down quite a bit, so for now I have only found MKL to use AVX to be consistently faster, but not the gcc or llvm compilers. This may change as the compilers get better ... hopefully ...
> Ivo Welch (ivo.welch at gmail.com)
> J. Fred Weston Professor of Finance
> Anderson School at UCLA, C519
> Director, UCLA Anderson Fink Center for Finance and Investments
> Free Finance Textbook, http://book.ivo-welch.info/
> Editor, Critical Finance Review, http://www.critical-finance-review.org/
> On Mon, Jun 10, 2013 at 5:15 AM, Simon Urbanek
> <simon.urbanek at r-project.org> wrote:
>> On Jun 10, 2013, at 1:44 AM, ivo welch wrote:
>>> does R run on the intel phi coprocessor? the intel literature makes it seem as if it can be treated just like a 50-core 200-thread just-like-i686 processor running linux, albeit with only 8GB of very fast shared RAM. some posts have suggested it can be 2-3 times as fast as two high-end Intel Xeon 8-core machines. how do simple library(parallel) R tasks scale on it?
>> Given that R is not thread-safe and almost everything (apart from parallel BLAS) is single-threaded, it's exactly the opposite of what you need for R. Explicit parallelization in R has overhead and cannot use threads, so you're better off with higher clock speed than large number of cores (unless you use those explicitly for particular tasks but writing your own low-level code). I was not able to test phi, but generally, in our experience scaling to many cores does not work very well, in particular when you have so little RAM (the only way parallel can scale is by running multiple processes which limits the amount of memory sharing that can be done). So, the way I see it you'd have to treat phi like GPU: you'll be able to leverage the speeds that are claimed by very specific code and algorithms written for it (or, e.g. by running BLAS on it if that's what you do often), but it will be much slower than Xenons for regular use of R. Your mileage may vary - this is just my personal experience evaluating high-core machines (250+) and R (the lesson was it's better to get multiple low-core, high-clockspeed, high-RAM machines instead - the opposite of phi), not particularly with phi.
>>> Ivo Welch (ivo.welch at gmail.com)
>>> R-sig-hpc mailing list
>>> R-sig-hpc at r-project.org
More information about the R-sig-hpc