Re: [R] R parallel / foreach - aggregation of results

2015-08-01 Thread jim holtman
An: Martin Spindler martin.spind...@gmx.de Cc: r-help@r-project.org r-help@r-project.org Betreff: Re: [R] R parallel / foreach - aggregation of results Try this chance to actually return values: library(doParallel) Simpar3 - function(n1) { L2distance - matrix(NA, ncol=n1, nrow=n1

Re: [R] R parallel / foreach - aggregation of results

2015-08-01 Thread Martin Spindler
. Juli 2015 um 18:22 Uhr Von: jim holtman jholt...@gmail.com An: Martin Spindler martin.spind...@gmx.de Cc: r-help@r-project.org r-help@r-project.org Betreff: Re: [R] R parallel / foreach - aggregation of results Try this chance to actually return values:     library(doParallel) Simpar3 - function(n1

Re: [R] R parallel / foreach - aggregation of results

2015-08-01 Thread William Dunlap
: [R] R parallel / foreach - aggregation of results Try this chance to actually return values: library(doParallel) Simpar3 - function(n1) { L2distance - matrix(NA, ncol=n1, nrow=n1) data - rnorm(n1) diag(L2distance)=0 cl - makeCluster(4) registerDoParallel(cl) x

[R] R parallel / foreach - aggregation of results

2015-07-31 Thread Martin Spindler
Dear all, when I am running the code attached below, it seems that no results are returned, only the predefined NAs. What mistake do I make? Any comments and help is highly appreciated. Thanks and best, Martin Simpar3 - function(n1) { L2distance - matrix(NA, ncol=n1, nrow=n1) data -

Re: [R] R parallel / foreach - aggregation of results

2015-07-31 Thread Jon Skoien
Martin, I think the main problem is that you are trying to assign your results to the result matrix inside the foreach loop. Parallel functions in R are generally not good at updating parts of matrices from the different workers in this way. Instead, using e.g. foreach, each loop of the

Re: [R] R parallel / foreach - aggregation of results

2015-07-31 Thread jim holtman
Try this chance to actually return values: library(doParallel) Simpar3 - function(n1) { L2distance - matrix(NA, ncol=n1, nrow=n1) data - rnorm(n1) diag(L2distance)=0 cl - makeCluster(4) registerDoParallel(cl) x - foreach(j=1:n1) %dopar% { library(np) datj - data[j]

Re: [R] R parallel - slow speed

2015-07-31 Thread Martin Spindler
Uhr Von: Jeff Newmiller jdnew...@dcn.davis.ca.us An: Martin Spindler martin.spind...@gmx.de, r-help@r-project.org r-help@r-project.org Betreff: Re: [R] R parallel - slow speed Parallelizing comes at a price... and there is no guarantee that you can afford it. Vectorizing your algorithms is often

Re: [R] R parallel - slow speed

2015-07-31 Thread Martin Spindler
: Donnerstag, 30. Juli 2015 um 15:28 Uhr Von: jim holtman jholt...@gmail.com An: Jeff Newmiller jdnew...@dcn.davis.ca.us Cc: Martin Spindler martin.spind...@gmx.de, r-help@r-project.org r-help@r-project.org Betreff: Re: [R] R parallel - slow speed I ran a test on my Windows box with 4 CPUs

[R] R parallel - slow speed

2015-07-30 Thread Martin Spindler
Dear all, I am trying to parallelize the function npnewpar given below. When I am comparing an application of apply with parApply the parallelized version seems to be much slower (cf output below). Therefore I would like to ask how the function could be parallelized more efficient. (With

Re: [R] R parallel - slow speed

2015-07-30 Thread Jeff Newmiller
Parallelizing comes at a price... and there is no guarantee that you can afford it. Vectorizing your algorithms is often a better approach. Microbenchmarking is usually overkill for evaluating parallelizing. You assume 4 cores... but many CPUs have 2 cores and use hyperthreading to make each

Re: [R] R parallel - slow speed

2015-07-30 Thread jim holtman
I ran a test on my Windows box with 4 CPUs. THere were 4 RScript processes started in response to the request for a cluster of 4. Each of these ran for an elapsed time of around 23 seconds, making the median time around 0.2 seconds for 100 iterations as reported by microbenchmark. The 'apply'

Re: [R] R Parallel question

2012-02-12 Thread Uwe Ligges
On 11.02.2012 23:12, slbfelix wrote: Hi All, I have a question about R parallel computing by using snowfall. How can I set the seeds on parallel workers to get the same result as sequential mode? For example: sfSapply(c(1,1),rnorm) [1] 1.823082 -2.222052 rnorm(2) [1] -0.5179967

[R] R Parallel question

2012-02-11 Thread slbfelix
Hi All, I have a question about R parallel computing by using snowfall. How can I set the seeds on parallel workers to get the same result as sequential mode? For example: sfSapply(c(1,1),rnorm) [1] 1.823082 -2.222052 rnorm(2) [1] -0.5179967 -1.0807196 How to get the identical result?

[R] R/parallel

2011-12-08 Thread Scott Raynaud
 I want to take advantage of my multicore CPU to speed up a loop in a simulation program.  I didn’t write the code, but the iterations appear independent to me, at least in the sense that the results of one loop do not depend on previous ones.  Right now I’m relegated to a Windows box that

Re: [R] R/parallel

2011-12-08 Thread Tal Galili
Hi Scott, Why not use the doSMP package from REvolution? http://www.r-statistics.com/2010/04/parallel-multicore-processing-with-r-on-windows/ Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] R/parallel

2011-12-08 Thread Scott Raynaud
scott.rayn...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Thursday, December 8, 2011 12:38 PM Subject: Re: [R] R/parallel Hi Scott, Why not use the doSMP package from REvolution? http://www.r-statistics.com/2010/04/parallel-multicore-processing-with-r-on-windows/ Tal

Re: [R] R/parallel

2011-12-08 Thread Prof Brian Ripley
. ?? From: Tal Galili tal.gal...@gmail.com To: Scott Raynaud scott.rayn...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Thursday, December 8, 2011 12:38 PM Subject: Re: [R] R/parallel Hi Scott, Why not use the doSMP package from REvolution? http://www.r-statistics.com/2010/04

[R] R/Parallel

2008-10-15 Thread Rajasekaramya
Hi there, I am looking for R/parallel package or some other package that would speed up the analysis.I am working on computatioanly intensive data so any suggestions would be really helpful. Kindly let me know if any -- View this message in context:

Re: [R] R/Parallel

2008-10-15 Thread Markus Schmidberger
Hi, have a look to Dirks tutorial at the UseR2008. This should be a good starting point: http://www.statistik.uni-dortmund.de/useR-2008/tutorials/eddelbuettel.html Markus Rajasekaramya wrote: Hi there, I am looking for R/parallel package or some other package that would speed up the