[R-sig-hpc] parallel and openblas

Dirk Eddelbuettel edd at debian.org
Wed Apr 25 17:10:26 CEST 2012


Sorry to follow-up on my own post from minutes ago, but maybe it is better
the way it is as it allows to explicitly spread tasks each of which would
limit itself to one core.  Isn't this the best way to avoid "clogging" when
we use, say, snow to get to eight cores, and each of the eight cores wants to
do BLAS work on eight cores...  That was after all the initial issue in
Martin's email.

And when I use the affinity trick (now breaking the single line for display)

  edd at max:~$ r -e 'library(parallel); \
                   system(sprintf("taskset -p 0xffffffff %d", Sys.getpid())); \
                   cores <- detectCores(); \
                   print(cores); \
                   mclapply(1:cores, function(i) repeat sqrt(3.14159), mc.cores=cores)'
  pid 24436's current affinity mask: 1
  pid 24436's new affinity mask: ff
  [1] 8

all is well -- eight cores humming along just fine per htop under OpenBLAS.  

Maybe this is actually better as it effectively gives us a run-time toggle?

Dirk

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com



More information about the R-sig-hpc mailing list