rparallel

Parallelize function taking external pointers (XPtr)

最后都变了- 提交于 2020-01-14 13:55:43
问题 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 the XPtr. #include <Rcpp.h> using namespace Rcpp; //[[Rcpp::export]] SEXP f(int n) { std::vector<int> * v = new std::vector<int>; for(int i = 0; i < n; i++) v->push_back(i); XPtr< std::vector<int> > p(v, true); return p; } //[[Rcpp::export]] int g

vectorizing & parallelizing the disagregation of a list

坚强是说给别人听的谎言 提交于 2019-12-25 01:17:49
问题 Here's some code that generates a list of data.frame s and then converts that original list into a new list with each list element a list of the rows of each data frame. Eg. - l1 has length 10 and each element is a data.frame with 1000 rows. - l2 is a list of length 1000 ( nrow(l1[[k]]) ) and each element is a list of length 10 ( length(l1) ) containing row-vectors from the elements of l1 l1 <- vector("list", length= 10) set.seed(65L) for (i in 1:10) { l1[[i]] <- data.frame(matrix(rnorm(10000

How to set up cluster slave nodes (on Windows)

喜你入骨 提交于 2019-12-19 10:26:42
问题 I need to run thousands* of models on 15 machines (each of 4 cores), all Windows. I started to learn parallel , snow and snowfall packages and read a bunch of intro's, but they mainly focus on the setup of the master. There is only a little information on how to set up the worker (slave) nodes on Windows. The information is often contradictory: some say that SOCK cluster is practically the easiest way to go, others claim that SOCK cluster setup is complicated on Windows (sshd setup) and the

Running parallel R on multiple hosts [closed]

家住魔仙堡 提交于 2019-12-14 03:29:23
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Can you please provide a script to run parallel cluster on 2 hosts ( amazon ec2) from scratch on Ubuntu Linux Machine ? Specifications The hosts are connected from local machine via identity key named amazon_key.pem hostnames are supposed to be connected via internal IP address

Package that suggests `parallel` fails compile in windows

别来无恙 提交于 2019-12-11 07:43:39
问题 I am developing a package that suggests R's parallel package (So my DESCRIPTION has a Suggests: parallel (>= 1.13.1) statement. It compiles fine under OSX and Linux but fails when building on windows (using win-builder). Here is the end of the install.log that win-builder spits out: *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded *** arch - i386 Error: package or namespace load failed for 'spectrolab' in library

R `parallel` package does not exist on CRAN?

梦想的初衷 提交于 2019-12-03 16:22:11
问题 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 work: http://cran.r-project.org/web/packages/parallel/index.html http://cran.r-project.org/web/packages/parallel http://cran.r-project.org/package=parallel It is also absent in the list of available.packages() . But apparently the package parallel does exist! :-) I have it in the list of my packages and it even has its own tag here :-) 回答1: Is this because it is inside r

How to set up cluster slave nodes (on Windows)

限于喜欢 提交于 2019-12-01 11:00:39
I need to run thousands* of models on 15 machines (each of 4 cores), all Windows. I started to learn parallel , snow and snowfall packages and read a bunch of intro's, but they mainly focus on the setup of the master. There is only a little information on how to set up the worker (slave) nodes on Windows. The information is often contradictory: some say that SOCK cluster is practically the easiest way to go , others claim that SOCK cluster setup is complicated on Windows (sshd setup) and the best way to go is MPI . So, what is an easiest way to install slave nodes on Windows? MPI, PVM, SOCK or

doParallel, cluster vs cores

喜夏-厌秋 提交于 2019-11-29 09:35:27
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 <- makeCluster(4) registerDoParallel(cl) and registerDoParallel(cores = 4) The only difference I see that makeCluster() has to be stopped explicitly using stopCluster() . Yes, it's right from software view. on single machine these are interchangeable and I will get same results. To understand 'cluster' and 'cores' clearly, I suggest to think from 'hardware' and 'software' level. In

doParallel, cluster vs cores

六眼飞鱼酱① 提交于 2019-11-27 23:31:39
问题 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 <- makeCluster(4) registerDoParallel(cl) and registerDoParallel(cores = 4) The only difference I see that makeCluster() has to be stopped explicitly using stopCluster() . 回答1: The behavior of doParallel::registerDoParallel(<numeric>) depends on the operating system, see print