search for: slaversock

Displaying 15 results from an estimated 15 matches for "slaversock".

Did you mean: serversock
2018 Mar 09
2
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
A solution is to have parallel:::.slaveRSOCK() attempt to connect multiple times before failing, e.g. makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries = 10L, interval = 1.0) { port <- as.integer(port) for (i in seq_len(maxTries)) { con <- tryCatch({ socketConnection(master,...
2018 Mar 09
2
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
...= 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, first launch the background worker as: system('R --slave --no-restore -e "parallel:::.slaveRSOCK()" --args MASTER=localhost PORT=11000 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE', wait = FALSE) which immediately tries to connect to a socket on localhost:11000 with timeout. Immediately after the master launched the above (without waiting), it will set up the connection waiting for the co...
2018 Mar 10
1
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
.... You don't want to retry > indefinitely since the connection could be failing because the master > died, and then you want the workers to die as well. > > Best, > > luke > > > On Fri, 9 Mar 2018, Henrik Bengtsson wrote: > >> A solution is to have parallel:::.slaveRSOCK() attempt to connect >> multiple times before failing, e.g. >> >> makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries >> = 10L, interval = 1.0) { >> port <- as.integer(port) >> for (i in seq_len(maxTries)) { >>...
2019 Mar 18
2
SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
...alhost", 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.0 0.4 283092 70624 pts/0 S 17:50 0:00 /usr/lib/R/bin/exec/R --slave --no-restore -e parallel:::.slaveRSOCK() --args MASTER=localhost PORT=80 OUT=/dev/null SETUPTIMEOUT=120 TIMEOUT=2 592000 XDR=TRUE This process will keep running for 'TIMEOUT=2592000' seconds (= 30 days). The reason for this is that it is currently in the state where it attempts to set up a connection to the main R process:...
2018 Mar 09
0
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
...this but it didn't seem necessary at the time. You don't want to retry indefinitely since the connection could be failing because the master died, and then you want the workers to die as well. Best, luke On Fri, 9 Mar 2018, Henrik Bengtsson wrote: > A solution is to have parallel:::.slaveRSOCK() attempt to connect > multiple times before failing, e.g. > > makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries > = 10L, interval = 1.0) { > port <- as.integer(port) > for (i in seq_len(maxTries)) { > con <- tryCatch({ >...
2018 Mar 09
0
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
I just noticed that parallel:::.slaveRSOCK() passes 'timeout' to socketConnection() as a character, i.e. there's a missing timeout <- as.integer(timeout), cf. port <- as.integer(port) and useXDR <- as.logical(value): > parallel:::.slaveRSOCK function () { makeSOCKmaster <- function(master, port, timeout, useX...
2017 Dec 04
1
PSOCK cluster and renice
...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: ?+19?: No such file or directory > ^C > > The code that prepends that 'nice +19' is in parallel:::newPSOCKnode: > > if (!is.na(renice) && renice) > cmd <-...
2019 Jun 04
2
MacOS parallel::makeCluster fails
...Frameworks/R.framework/Resources/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'try(cat(Sys.getpid(),file="/var/folders/5s/kgm05t2s0_52gz1s445mnlgw0000gn/T//RtmpZp1RX6/future.parent=835.3434fe0c5c6.pid"), silent = TRUE)' -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11867 OUT=/dev/null TIMEOUT=60 XDR=TRUE [local output] - Exit code of system() call: 0 [local output] Waiting for worker #1 on ?localhost? to connect back [local output] Detected a warning from socketConnection(): ?problem in listening on this socket? Killing worker pro...
2019 Mar 27
0
SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
...> blocking = TRUE, : > port 80 cannot be opened > > The launched R worker is still running: > > $ ps aux | grep -E "exec[/]R" > hb 20778 37.0 0.4 283092 70624 pts/0 S 17:50 0:00 > /usr/lib/R/bin/exec/R --slave --no-restore -e parallel:::.slaveRSOCK() > --args MASTER=localhost PORT=80 OUT=/dev/null SETUPTIMEOUT=120 > TIMEOUT=2 592000 XDR=TRUE > > This process will keep running for 'TIMEOUT=2592000' seconds (= 30 > days). The reason for this is that it is currently in the state where > it attempts to set up a connecti...
2019 Jul 12
1
MacOS parallel::makeCluster fails
...Frameworks/R.framework/Resources/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'try(cat(Sys.getpid(),file="/var/folders/5s/kgm05t2s0_52gz1s445mnlgw0000gn/T//RtmpZp1RX6/future.parent=835.3434fe0c5c6.pid"), silent = TRUE)' -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11867 OUT=/dev/null TIMEOUT=60 XDR=TRUE > [local output] - Exit code of system() call: 0 > [local output] Waiting for worker #1 on ?localhost? to connect back > [local output] Detected a warning from socketConnection(): ?problem in listening on this...
2017 Dec 04
0
PSOCK cluster and renice
...age "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: ?+19?: No such file or directory ^C The code that prepends that 'nice +19' is in parallel:::newPSOCKnode: if (!is.na(renice) && renice) cmd <- sprintf("nice +%d %s", as.i...
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,
2019 Jun 05
0
MacOS parallel::makeCluster fails
...Frameworks/R.framework/Resources/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'try(cat(Sys.getpid(),file="/var/folders/5s/kgm05t2s0_52gz1s445mnlgw0000gn/T//RtmpZp1RX6/future.parent=835.3434fe0c5c6.pid"), silent = TRUE)' -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11867 OUT=/dev/null TIMEOUT=60 XDR=TRUE > [local output] - Exit code of system() call: 0 > [local output] Waiting for worker #1 on ?localhost? to connect back > [local output] Detected a warning from socketConnection(): ?problem in listening on this socket? &gt...
2013 Mar 08
0
Passing command line arguments using parallel package
...it was given a particular argument. I am running the following code on a Windows PC to start slave processes: require(parallel) cl <- makeCluster(8) parLapply(cl, mylist, myfunction) This seems to create R processes with the following arguments: Rterm.exe --slave --no-restore -e parallel:::.slaveRSOCK() --args MASTER=localhost PORT=10187 OUT=/dev/null TIMEOUT=2592000 METHODS=TRUE XDR=TRUE I would like to be able to add something like --myargument or MYARGUMENT=TRUE when the master process was started with the same argument. Thank you, Gene Bokk
2016 Oct 31
1
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On Mon, 31 Oct 2016, Henrik Bengtsson wrote: > Thank you for looking into this Luke. > > On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote: >> On unix, unless event polling is enabled Sys.sleep just waits in a >> select() call (with a SIGINT handler in place) so the elapsed time >> isn't checked until after the select call is complete.