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
. 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
: [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
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
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]
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
: 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
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
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'
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
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:
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
.
??
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
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
14 matches
Mail list logo