parallel processing - Can't use all cores in R -


i trying make parallel loop, i've found r can't utilize 8 cores, uses 1 code:

library(parallel) library(foreach) library(doparallel) no_cores <- detectcores() - 1 cl <- makecluster(no_cores) registerdoparallel(cl, cores = no_cores)  sum.of.squares <- foreach(i = 1:10e4, .combine = "+", .init = 0) %dopar% {   sqrt(i) }  stopcluster(cl) 

it uses 13-15% of cpu. why?

using windows 8.1 r 3.2.1.

use r revolution open (rro) 3.2

http://mran.revolutionanalytics.com/documents/rro/installation/

it comes integrated intel mkl parallel math libraries.

see fuller comparison here.


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -