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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -