All Questions
Tagged with doparallel domc
9
questions
0
votes
1
answer
60
views
foreach %dopar% do not produce all results
I was trying to using parallel computing by using foreach %dopar%. In short, when I try set nCores > 1, I received incomplete results. When I set nCores = 1, the results are fine. Here are the ...
0
votes
0
answers
125
views
Does parallellization in R copy all data in the parent process?
I have some large bioinformatics project where I want to run a small function on about a million markers, which takes a small tibble (22 rows, 2 columns) as well as an integer as input. The returned ...
1
vote
1
answer
109
views
assembling a matrix from diagonal slices with mclapply or %dopar%, like Matrix::bandSparse
Right now I'm working with some huge matrices in R and I need to be able to reassemble them using diagonal bands. For programming reasons (to avoid having to do n*n operations for a matrix of size n (...
0
votes
0
answers
542
views
Why does doparallel::getDoParWorkers() return 14 but AFTER I have completed the loop?
My understanding was that if registering an implicit cluster with e.g. registerDoParallel(cores = 14) then at the end of the loop the cluster is automatically closed.
In trying to debug another issue ...
0
votes
1
answer
451
views
R: parallelization with foreach
I am new to R. I've written this very simple script to highlight my problem. If I run this regular for loop testdata is updated on each iteration just as I want it.
a = 5
b = 4
c = 3
testdata = ...
0
votes
3
answers
533
views
Use of doParallel / doMC not only with foreach package
all official tutorials doParallel, doParallel-Vignette, doMC and doMC-Vignette I've found so far cover only how to use parallel-computation in combination with foreach. Is there a way to speed up "...
2
votes
1
answer
1k
views
R foreach parallel loop value not saved
When executing the following dummy code:
P = 2
library(foreach)
library(doMC)
registerDoMC(P)
f = double(length = P)
print('=== f values in loop ===')
foreach(c = 1:P) %dopar%
{
f[c] = c
...
11
votes
3
answers
4k
views
how to use %dopar% when only import foreach in DESCRIPTION of a package
How to avoid "could not find function "%dopar%"" in a function of a package when only imports (not depends) foreach in DESCRIPTION of a package? is there a way like foreach::%dopar% as I use foreach::...
52
votes
1
answer
18k
views
the difference between doMC and doParallel in R
What's the difference between doParallel and doMC in R concerning foreach function? doParallel supports windows, unix-like, while doMC supports unix-like only. In other words, why doParallel cannot ...