parallel-foreach Questions
3
Solved
I have a List<byte[]> and I like to deserialize each byte[] into Foo. The List is ordered and I like to write a parallel loop in which the resulting List<Foo> contains all Foo in the sa...
Conatus asked 20/6, 2012 at 7:49
3
Solved
I'm trying to train several random forests (for regression) to have them compete and see which feature selection and which parameters give the best model.
However the trainings seem to take an ins...
Unclog asked 12/5, 2016 at 14:36
1
I have a Threadripper 1950X based workstation with 16 cores and 32 threads and plenty of memory. Running 64-bit R 3.6.0 (patched) on Windows 10, I frequently run parallel code in R using the doPara...
Roberto asked 26/6, 2019 at 22:8
3
While using "multicore" parallelism using foreach and the doMC backend (I use doMC as at the time I looked into it other package did not allow logging from the I would like to get a progress bar, u...
Dishwasher asked 6/7, 2018 at 15:9
3
Solved
I am trying to understand how to parallelize some of my code using R. So, in the following example I want to use k-means to cluster data using 2,3,4,5,6 centers, while using 20 iterations.
Here is...
Wrongdoer asked 6/12, 2013 at 5:49
1
I managed to create parallel connections in R to a TSQL server using the below code:
SQL_retrieve <- function(x){
con <- odbcDriverConnect(
'driver={SQL Server};server=OPTMSLMSOFT02;database=...
Armet asked 17/8, 2016 at 14:49
1
Solved
By changing %dopar% to %do% when using foreach, I can run the code sequentially. How can I do this programmatically?
E.g. I want the following but with only ONE foreach statement:
library(doParal...
Drobman asked 2/5, 2017 at 8:21
2
Solved
I have developed an R package that contains embarassingly parallel functions.
I would like to implement parallelization for these functions in a way that is transparent to the user, regardless of ...
Ritchie asked 21/2, 2017 at 17:33
1
Solved
Below you can find a piece of code in R which I would like to convert to run as a parallel process using several CPU's. I tried using foreach package, but didn't go far.. I could not find a good ex...
Caudill asked 25/7, 2016 at 13:7
1
Solved
I have a for loop that is something like this:
for (i=1:150000) {
tempMatrix = {}
tempMatrix = functionThatDoesSomething() #calling a function
finalMatrix = cbind(finalMatrix, tempMatrix)
}
...
Draft asked 12/7, 2016 at 0:20
2
Solved
I'm running the following code (extracted from doParallel's Vignettes) on a PC (OS Linux) with 4 and 8 physical and logical cores, respectively.
Running the code with iter=1e+6 or less, every thi...
Scrimmage asked 10/6, 2016 at 14:36
2
Solved
The following (simplified) script works fine on the master node of a unix cluster (4 virtual cores).
library(foreach)
library(doParallel)
nc = detectCores()
cl = makeCluster(nc)
registerDoParalle...
Lisa asked 22/4, 2016 at 12:38
2
Solved
If I run foreach... %dopar% without registering a cluster, foreach raises a warning, and executes the code sequentially:
library("doParallel")
foreach(i=1:3) %dopar%
sqrt(i)
Yields:
Warning me...
Toulouse asked 2/8, 2014 at 17:39
1
Solved
Using the foreach package, I was expecting the following line to run in about 10 seconds
system.time(foreach (i=1:5, .combine='c') %do% {Sys.sleep(2);i})
user system elapsed
0.053 0.011 10.012 ...
Changteh asked 6/6, 2015 at 22:43
2
The below code produces different results on Windows and Ubuntu platforms. I understand it is because of the different methods of handling parallel processing.
Summarizing:
I cannot insert / rbin...
Stephanotis asked 22/5, 2015 at 12:7
1
Solved
This is really blowing my mind. The basic loop takes like 8 seconds on my computer:
system.time({
x <- 0
for (p in 1:2) {
for (i in 1:500) {
for (j in 1:5000) {
x <- x + i * j
}
}
}
})
x...
Chan asked 9/7, 2014 at 10:49
1
© 2022 - 2024 — McMap. All rights reserved.