[R-sig-Debian] Accessto OpenBLAS
Scott Raynaud
scott.raynaud at yahoo.com
Wed Feb 29 22:42:46 CET 2012
So I was passing this to my IT department but they have now
abandoned me and I'm left to fend for myself. I guess I have to
learn how to do everything on my own now.
I looked at the read.me. It's pretty cryptic. How does one link
with -lopenblas to a shared library? At the bash command line?
Somewhere else? Where?
My machine has 4 Intel® Xeon® Processor X5650 CPUs. On
Intel's site they say each CPU has 6 cores and 12 threads. Of
course I want to take advatage of that horsepower. It looks like
the environment variables can be setup when I launch R, correct?
The questions is how? There are three environment variables.
Which one should I use? And how do I get R to pick up
those environment variables. (I'm usinf Rkward as a front end).
There's some ambiguity in the read.me under known issues.
It says:
The number of CPUs/Cores should less than or equal to
8*sizeof(unsigned long). On 64 bits, the limit is 64.
I'm not sure what that implies in terms of my machine.
To what values do I set my environment variables?
----- Original Message -----
From: Dirk Eddelbuettel <edd at debian.org>
To: Scott Raynaud <scott.raynaud at yahoo.com>
Cc: "r-sig-debian at r-project.org" <r-sig-debian at r-project.org>
Sent: Thursday, February 23, 2012 11:31 AM
Subject: Re: [R-sig-Debian] Accessto OpenBLAS
On 23 February 2012 at 09:08, Scott Raynaud wrote:
| So my experiments have confirmed that the binary version of
| OpenBLAS uses onlt two cores. Should the compiled version
| use more?
|
| I want figure out which package to utilize mulitiple cores in
| a UNIX environment. Did some research on this a while back
| but it's a bit fuzzy right now. My main concern is there's a
| warning about BLAS and multiple cores in the install docs.
| Will I run into problems?
Did you see the README?
4.Usages
Link with libopenblas.a or -lopenblas for shared library.
4.1 Set the number of threads with environment variables. for example,
export OPENBLAS_NUM_THREADS=4
or
export GOTO_NUM_THREADS=4
or
export OMP_NUM_THREADS=4
The priorities are OPENBLAS_NUM_THREADS > GOTO_NUM_THREADS > OMP_NUM_THREADS.
If you compile this lib with USE_OPENMP=1, you should only set OMP_NUM_THREADS environment variable.
Some BLAS libraries can respond to environment variables at run-time: MKL,
GotoBlas and hence OpenBlas. For others such as Atlas this is fixed at
compile time.
Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
More information about the R-SIG-Debian
mailing list