matrices (one for
> each repition j).
> Any idea how it is possible to return only the last matrix and not all?
>
> Thanks and best,
>
> Martin
>
>
>
> Gesendet: Freitag, 31. Juli 2015 um 18:22 Uhr
> Von: "jim holtman"
> An: "Martin Spindler&q
015 um 18:22 Uhr
> Von: "jim holtman"
> An: "Martin Spindler"
> Cc: "r-help@r-project.org"
> Betreff: Re: [R] R parallel / foreach - aggregation of results
>
> Try this chance to actually return values:
>
>
> library(doParallel)
> Simpar3
. Juli 2015 um 18:22 Uhr
Von: "jim holtman"
An: "Martin Spindler"
Cc: "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) {
L2distan
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
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
forea
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 <- rn
t,
Martin
Gesendet: Donnerstag, 30. Juli 2015 um 15:28 Uhr
Von: "jim holtman"
An: "Jeff Newmiller"
Cc: "Martin Spindler" , "r-help@r-project.org"
Betreff: Re: [R] R parallel - slow speed
I ran a test on my Windows box with 4 CPUs. THere were 4 RScript processes
Uhr
Von: "Jeff Newmiller"
An: "Martin Spindler" , "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 a better approach. Microbenchma
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
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 c
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 in
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 -1.0807
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?
Th
ly on Windows. Package 'parallel' uses sockets and
pipes.
??
From: Tal Galili
To: Scott Raynaud
Cc: "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
t;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
C
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: w
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 runs
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 an
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:
http://www.nabble.com/R-Parallel-tp1425p1
19 matches
Mail list logo