Hello all,
My problem is similar to Sergey's.
I could not try what Mario suggested, since doMPI is not available for
windows.

I have tried the Cedrick's commands, i.e. 
cl.tmp = makeCluster(rep("localhost",2), type="SOCK") 
registerDoSNOW(cl.tmp) 

but this is instead increasing the time taken. For Sergy's set of commands,
i get,
> x <- numeric(10000) 
> system.time(for(i in 1:10000) x[i] <- sqrt(i)) 
   user  system elapsed 
   0.03    0.00    0.03 
> system.time(system.time(x <- foreach(i=1:10000, .combine="c") %do%
> sqrt(i))) 
   user  system elapsed 
   4.71    0.00    4.71 
> system.time(system.time(x <- foreach(i=1:10000, .combine="c") %dopar%
> sqrt(i))) 
   user  system elapsed 
   7.35    1.07  127.06 

i.e. %dopar% is taking longer than %do%

Please guide me.



--
View this message in context: http://r.789695.n4.nabble.com/Parallel-computing-on-Windows-foreach-tp2256082p4637925.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

