This tag refers to the `parallel` package, R core team. It provides support for parallel computation in R.
Questions tagged [rparallel]
72 questions
25
votes
1 answer
R `parallel` package does not exist on CRAN?
I tried to google "r package parallel" but I have not found it on CRAN. I also tried the following links, but they do not…

Tomas
- 57,621
- 49
- 238
- 373
19
votes
3 answers
doParallel, cluster vs cores
What is the difference between cluster and cores in registerDoParallel when using doParallel package?
Is my understanding correct that on single machine these are interchangeable and I will get same results for :
cl <-…

Tomas Greif
- 21,685
- 23
- 106
- 155
15
votes
2 answers
Why does parLapplyLB not actually balance load?
I'm testing out the parLapplyLB() function to understand what it does to balance a load. But I'm not seeing any balancing happening. For example,
cl <- parallel::makeCluster(2)
system.time(
parallel::parLapplyLB(cl, 1:4, function(y) {
if (y…

josiekre
- 795
- 1
- 7
- 19
6
votes
2 answers
R parallel: rbind parallely into separate data.frames
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 / rbind data on Linux parallely (mclapply, mcmapply) while…

jangorecki
- 16,384
- 4
- 79
- 160
5
votes
1 answer
how to kill parallel program of R in Linux
I use R to do parallel computing. Every time, when I want to kill the parallel program, I always use kill 2130 2131 6456(PID). Is there a way to kill all the programs of R?

Ben
- 115
- 9
4
votes
1 answer
Export R package functions to parallel cluster within the R package
There are functions (like function1) within an R package I'm working on which rely on helper functions (like h_function1 and h_function2) in my package. I'm parallelizing to repeatedly call function1 within another function in my package.
Currently,…

user257566
- 93
- 5
4
votes
0 answers
R future package - understanding error message
I am submitting two jobs as below on Linux (R 3.6.0). See below sample code.
library("future")
plan(multicore)
job1 <- future({
print("job1")
})
job2 <- future({
print("job2")
})
while (!resolved(job1)) {
Sys.sleep(0.2)
}
while…

R007
- 101
- 1
- 13
4
votes
2 answers
what exactly does the first argument in makeCluster function do?
I am new to r programming as you can tell from the nature of my question. I am trying to take advantage of the parallel computing ability of the train function.
library(parallel)
#detects number of cores available to use for parallel package
nCores…

igbobahaushe
- 65
- 1
- 7
4
votes
1 answer
Master/slave multicore processing in R
I would like to parallelize the while loop in the following code:
work <- function(n) {
# Do some intensive work (e.g explore a graph starting at n).
# After this, we don't need to execute work() on nodes in excluding.
# (e.g exclude could be…

Miheer
- 99
- 5
4
votes
1 answer
R bigmemory always use backing file?
We are trying to use the BigMemory library with foreach to parallel our analysis. However, the as.big.matrix function seems always use backingfile. Our workstations have enough memory, is there a way to use bigMemory without the backing file?
This…

user7648269
- 111
- 1
4
votes
1 answer
R parLapply not parallel
I'm currently developing an R package that will be using parallel computing to solve some tasks, through means of the "parallel" package.
I'm getting some really awkward behavior when utilizing clusters defined inside functions of my package, where…

Carlos Ribeiro
- 133
- 2
- 8
3
votes
1 answer
Parallelize function taking external pointers (XPtr)
This question is neither a duplicate of this one nor of
this one, which were about functions returning external pointers.
Here's the issue. The Rcpp code hereafter defines two functions, one which creates an XPtr, and another one which can work on…

Elvis
- 548
- 2
- 14
3
votes
1 answer
How can I evaluate a C function from a dynamic library in an R package?
I’m trying to implement parallel computing in an R package that calls C from R with the .C function. It seems that the nodes of the cluster can’t access the dynamic library. I have made a parallel socket cluster, like this:
cl <- makeCluster(2)
I…

bensonsyd
- 31
- 2
3
votes
1 answer
Parallelized code result in inflated memory usage in threads (RStudio deffect)
Overview:
my B object is a big matrix 100 000 * 5000 of 2 GB
my A object is smaller 1000 * 5000
analyse_with_glm <- function(Y) {
cond1 = unlist(apply(B, 2, function(X) coef(summary(glm(Y~X)))[,4][2]))
cond2 = unlist(apply(B, 2, function(X)…

zakrapovic
- 413
- 3
- 17
3
votes
0 answers
Multiplot using Parallel in R
I have some 30 ggplot objects saved in a list say ggobject and now I want:
Plot objects in ggobject using parallel R package.
Also, I want to display these plots in a grid manner, and for this I am using multiplot function.
I am using following…

Haroon Lone
- 2,837
- 5
- 29
- 65