search for: makepsockcluster

Displaying 20 results from an estimated 28 matches for "makepsockcluster".

2013 Oct 03
1
Problem with makePSOCKcluster R3.0.1
Hello, I am using function makePSOCKcluster to make parallel computation on 3 EC2 Amazon machines. I have a passwordless between machines and ssh is correct. In the R 2.15.1 release this function works correctly. Installing R 3.0.1 on my EC2 machines makePSOCKcluster does not produce the cluster. If I run the function with outfile="&quo...
2016 Jan 15
1
Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b", : cannot open the connection
Dear All I have sucessfully created cluster of four nodes using localhost in my local machine by executing the following command > cl<-makePSOCKcluster(c(rep("localhost",4)),outfile='',homogeneous=FALSE,port=11001) starting worker pid=4271 on localhost:11001 at 12:12:26.164 starting worker pid=4280 on localhost:11001 at 12:12:26.309 starting worker pid=4289 on localhost:11001 at 12:12:26.456 starting worker pid=4298 on localhost:...
2017 Dec 04
0
PSOCK cluster and renice
...tions about 'nice' arguments, but could be because a "non-standard" 'nice' is used. If we do: > trace(system, tracer = quote(print(command))) Tracing function "system" in package "base" we see that the system call used is: > cl <- parallel::makePSOCKcluster(2L, renice = 19) Tracing system(cmd, wait = FALSE) on entry [1] "nice +19 '/usr/lib/R/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11146 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE" nice: ?+1...
2017 Dec 04
2
PSOCK cluster and renice
Hi all, Is it possible to use the 'renice' option together with parallel clusters of type 'PSOCK'? The help page for parallel::makeCluster is not specific about which options are supported on which types and I am getting the following message when passing renice = 19 : > cl <- parallel::makeCluster(2, renice = 19) nice: ?+19?: No such file or directory Kind regards,
2017 Dec 04
1
PSOCK cluster and renice
...s, but could be because a "non-standard" 'nice' is used. If > we do: > >> trace(system, tracer = quote(print(command))) > Tracing function "system" in package "base" > > we see that the system call used is: > >> cl <- parallel::makePSOCKcluster(2L, renice = 19) > Tracing system(cmd, wait = FALSE) on entry > [1] "nice +19 '/usr/lib/R/bin/Rscript' > --default-packages=datasets,utils,grDevices,graphics,stats,methods -e > 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11146 OUT=/dev/null > TIMEOUT=2592000...
2016 Nov 24
1
[parallel-package] feature request: set default cluster type via environment variable
...ormance Computing (HPC) Cluster which runs on Linux. A lot of people are using R on this Linux cluster and, of course, the *parallel* package to speed up their computations. It has been our collective experience, that using |makeForkCluster| yields an overall better experience /on Linux/ than the |makePSOCKcluster|, for whatever definition of better. Let me just summarize that it works smoother. I believe, other people working with *parallel* on Linux can share this experience Also, we did really welcome the environment variable |MC_CORES|, to be able to specify (in job submit scripts) the amount of CPU cor...
2012 Aug 21
1
parLapply fails to detect default cluster?
invoking parLapply without a cluster fails to find a previously registered cluster > library(parallel) > setDefaultCluster(makePSOCKcluster(2)) > parLapply(X=1:2, fun=function(...) {}) Error in cut.default(i, breaks) : invalid number of intervals This is because in parLapply length(cl) is determined before defaultCluster(cl) is called. By inspection, this appears to be true of other high-level functions, but ironically not of pa...
2019 Mar 18
2
SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
...a PSOCK cluster for which connection will fail (because port 80 is reserved): $ Rscript -e 'parallel::makeCluster(1L, port=80)' Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : cannot open the connection Calls: <Anonymous> ... makePSOCKcluster -> newPSOCKnode -> socketConnection In addition: Warning message: In socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : port 80 cannot be opened The launched R worker is still running: $ ps aux | grep -E "exec[/]R" hb 20778 37...
2023 Jul 01
1
Number of Cores limited to two in CRAN
This is the specific error messsage from R CMD check --as-cran Error in .check_ncores(length(names)) : 16 simultaneous processes spawned Calls: prepost -> makeCluster -> makePSOCKcluster -> .check_ncores Execution halted Thanks, Ravi ________________________________ From: Ravi Varadhan Sent: Saturday, July 1, 2023 1:15 PM To: R-Help <r-help at r-project.org> Subject: Number of Cores limited to two in CRAN Hi, I am developing a package where I would like to utilize mu...
2020 Nov 07
2
Process to Incorporate Functions from {parallely} into base R's {parallel} package
FWIW, there are indeed a few low hanging bug fixes in 'parallelly' that should be easy to incorporate into 'parallel' without adding extra maintenance. For example, in parallel::makePSOCKcluster(), it is not possible to disable SSH option '-l USER' so that it can be set in ~/.ssh/config. The remote user name will be the user name of your local machine and if you try to set user=NULL, you'll end up with an invalid SSH call. The current behavior means that you are forced to sp...
2011 Oct 04
1
Is there a way to disable / warn about forking?
...heck whether it is safe to use forking, or whether another mechanism should be used. I am aware that options(mc.cores=1) will effectively disable forking in mclapply(). However, this would make it look like (local) parallelization is not worth while at all, while actually, parallelization with makePSOCKCluster() works just fine. So, I'm looking for a way to selectively disable the use of forking. Thanks! Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message par...
2018 Mar 09
2
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
BACKGROUND: While troubleshooting random, occasionally occurring, errors from parallel::makePSOCKcluster("localhost", port = 11000); Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : cannot open the connection I had another look at parallel:::newPSOCKnode(), which is used internally to set up each background worker. It is designed to, firs...
2018 Mar 09
2
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
...et, fix that does *not* seem to change anything. > > /Henrik > > On Thu, Mar 8, 2018 at 7:05 PM, Henrik Bengtsson > <henrik.bengtsson at gmail.com> wrote: >> BACKGROUND: >> >> While troubleshooting random, occasionally occurring, errors from >> parallel::makePSOCKcluster("localhost", port = 11000); >> >> Error in socketConnection("localhost", port = port, server = TRUE, >> blocking = TRUE, : >> cannot open the connection >> >> I had another look at parallel:::newPSOCKnode(), which is used >> internal...
2023 Jul 01
1
Number of Cores limited to two in CRAN
Hi, I am developing a package where I would like to utilize multiple cores for parallel computing. However, I get an error message when I run R CMD check --as-cran. I read that CRAN limits the number of cores to 2. Is this correct? Is there any way to overcome this limitation? Thank you, Ravi [[alternative HTML version deleted]]
2012 Feb 14
0
New version: dclone 1.7-1 and dcmle 0.1-4 rolled out
...4 classes around infrastructure provided by the dclone package to make package development with data cloning for hierarchical models easy as a breeze. The testing suite of the two packages now includes 30 examples (see listDcExamples() ). library(dcmle) sourceDcExample("seeds") cl <- makePSOCKcluster(3) parLoadModule("glm") m <- dcmle(seeds, n.clones=c(1,2,4), cl=cl, partype="parchains") stopCluster(cl) m I am grateful for the feedback and support provided by a growing user base. Special thanks to Martyn Plummer for exposing RNG handling in rjags for better integration,...
2012 Feb 14
0
New version: dclone 1.7-1 and dcmle 0.1-4 rolled out
...4 classes around infrastructure provided by the dclone package to make package development with data cloning for hierarchical models easy as a breeze. The testing suite of the two packages now includes 30 examples (see listDcExamples() ). library(dcmle) sourceDcExample("seeds") cl <- makePSOCKcluster(3) parLoadModule("glm") m <- dcmle(seeds, n.clones=c(1,2,4), cl=cl, partype="parchains") stopCluster(cl) m I am grateful for the feedback and support provided by a growing user base. Special thanks to Martyn Plummer for exposing RNG handling in rjags for better integration,...
2011 Dec 10
0
clusterSetRNGStream() question
In a vanilla R 2.14.0 GUI session (on Windows XP SP3): > library(parallel) > cl<-makePSOCKcluster(2) > RNGkind() [1] "Mersenne-Twister" "Inversion" > clusterSetRNGStream(cl) > RNGkind() [1] "L'Ecuyer-CMRG" "Inversion" > stopCluster(cl) Is it intentional that clusterSetRNGStream() changes the RNG kind in the master process? The code o...
2018 May 22
0
DCC model simulation in R
...)), distribution.model="norm",mean.model=list(armaOrder=c(0,0),include.mean=F)) model=multispec(replicate(2,uspec)) # replicate for two series # specify ADCC model mvspec=dccspec(model,dccOrder = c(1,1),model = "aDCC",distribution = "mvnorm") # cluster cl= makePSOCKcluster(2) multf = multifit(model, Data, cluster = cl) fitADCC=dccfit(mvspec,data = Data, fit = multf, cluster = cl) ADCC<-print(fitADCC) stopCluster(cl) # stop cluster # store covariance matrix COV<-matrix(rcov(fitADCC)[1,2,]) # COV contains 2345 obs # simulate the model # given...
2015 Nov 17
1
Exporting a method to a cluster object
...library("ergm") library("parallel") # create list of matrices m <- matrix(rbinom(900, 1, 0.1), nrow = 30) l <- list(m, m, m, m, m) # write wrapper function that computes results fun <- function(mat) { s <- summary(mat ~ edges + dsp(1)) return(s) } cl <- makePSOCKcluster(2) # create cluster object test1 <- sapply(l, fun) # works! test2 <- parSapply(cl, l, fun) # problem: results look weird! clusterExport(cl, varlist = "summary.statistics") test3 <- parSapply(cl, l, fun) # error! ########## I found a solution somewhere in a forum: cluster...
2019 Mar 27
0
SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
...ill fail > (because port 80 is reserved): > > $ Rscript -e 'parallel::makeCluster(1L, port=80)' > Error in socketConnection("localhost", port = port, server = TRUE, > blocking = TRUE, : > cannot open the connection > Calls: <Anonymous> ... makePSOCKcluster -> newPSOCKnode -> socketConnection > In addition: Warning message: > In socketConnection("localhost", port = port, server = TRUE, > blocking = TRUE, : > port 80 cannot be opened > > The launched R worker is still running: > > $ ps aux | grep -...