similar to: setTimeLimit sometimes fails to terminate idle call in R

Displaying 20 results from an estimated 400 matches similar to: "setTimeLimit sometimes fails to terminate idle call in R"

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.
2016 Oct 26
5
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
setTimeLimit(elapsed=1) causes a timeout error whenever a call takes more than one second. For instance, this is how it works on Windows (R 3.3.1): > setTimeLimit(elapsed=1) > Sys.sleep(10); message("done") Error in Sys.sleep(10) : reached elapsed time limit Also, the error propagates immediately and causes an interrupt after ~1 second; > system.time({ Sys.sleep(10);
2016 Oct 27
2
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
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. Rstudio uses event polling, and in particular sets R_wait_usec to 10000, which means event and interrupt checks happen during a Sys.seep call. The R GUI on macOS doesn't seem to do this (but my lldb
2016 Oct 26
3
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for the feedback and confirmations. Interesting to see that it's also reproducible on macOS expect for Spencer; that might indicate a difference in builds. BTW, my original post suggested that timeout error was for sure detected while running Sys.sleep(10). However, it could of course also be that it is only detected after it finishes. For troubleshooting, the
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
Hi. WISHLIST: Regardless on console, I'd like to be able to timeout a call to readline()/file("stdin", blocking=TRUE) via setTimeLimit. OBSERVATION: On Windows Rterm as well as plain R on Linux, setTimeLimit() does not momentarily interrupt from stdin, but only after hitting RETURN. A few examples: timeout00 <- function() { setTimeLimit(elapsed=5); Sys.sleep(10); }
2016 Sep 18
0
getGraphicsEvent() and setTimeLimit() bug and compatibility patch.
Hey all. Setting a time limit with setTimeLimit(), and then using getGraphicsEvent(), will cause graphics event handling for the current device to break on timeout, until the device is destroyed and recreated. The problem lies in do_getGraphicsEvent() checking the value of dd->gettingEvent and concluding it's being called recursively (ironically this same test fails to detect actual
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On 10/25/2016 9:44 PM, Henrik Bengtsson wrote: > setTimeLimit(elapsed=1) causes a timeout error whenever a call takes > more than one second. For instance, this is how it works on Windows > (R 3.3.1): > >> setTimeLimit(elapsed=1) >> Sys.sleep(10); message("done") > Error in Sys.sleep(10) : reached elapsed time limit > > Also, the error propagates
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Spencer also had tools and rsconnect loaded (via a namespace) but it doesn't seem to make a difference for me if I load them. It also doesn't seem to matter for me whether it is CRAN R, locally built R, Terminal, R.app. However, RStudio differs > setTimeLimit(elapsed=1) Error: reached elapsed time limit > setTimeLimit(elapsed=1) Error: reached elapsed time limit >
2016 Oct 31
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
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. Rstudio uses > event polling, and in particular sets R_wait_usec to 10000,
2011 Dec 16
2
Event handling in R
Dear R-helpers, I've just started playing with getGraphicsEvent() in R, and was wondering if there is a simple way to stop this function waiting for input after a pre-defined time, instead of relying either on a non-NULL value from one of the event handlers or for a user-interrupt for it to halt (as per the R manual). The only way that I've thought of to make this work is using
2019 May 22
1
make running on.exit expr uninterruptible
Hi, Is there currently any way to guarantee that on.exit does not fail to execute the recorded expression because of a user interrupt arriving during function exit? Consider: f <- function() { suspendInterrupts({ on.exit(suspendInterrupts(cntr_on.exit <<- cntr_on.exit + 1L)) cntr_f <<- cntr_f + 1L }) TRUE } It is possible to interrupt this function such that cntr_f
2018 Jan 19
1
setSessionLimit
Hello The doc/NEWS.2 file mentions a setSessionLimit function, added with version 2.8.0 ??? o?? setTimeLimit() function to set limits on the CPU ??????? and/or elapsed time for each top-level computation, and ??????? setSessionLimit() to set limits for the rest of the session. However, I no longer see this function in recent versions of R, and there is no mention of its removal in the NEWS
2011 Aug 26
1
kernlab: ksvm() bug?
Hello all, I'm trying to run a gird parameter search for a svm. Therefore I'M using the ksvm function from the kernlab package. ---- svp <- ksvm(Ktrain,ytrain,type="nu-svc",nu=C) ---- The problem is that the optimization algorithm does not return for certain parameters. I tried to use setTimeLimit() but that doesn't seem to help. I suspect that ksvm() calls c code that
2010 May 30
1
Location of source code for readline()
A few days ago on R-help I asked about a cross-platform timeout version of readline(). Some suggestions, but only partial joy so far. I can get the Gnu bash 'read -t ...' to work in Windows by using the 'bash -c ' construct, but then R's system() function does not seem to allow this to pass through. Similarly a Perl and Free Pascal routine that I tried, the latter being a
2019 May 03
1
Strange error messages from parallel::mcparallel family under 3.6.0
Dear All, Since upgrading to 3.6.0, I've been getting a strange error messages from the child process when using mcparallel/mccollect. Before filing a report in the Bugzilla, I want to figure out whether I had been doing something wrong all this time and R 3.6.0 has exposed it, or whether something else is going on. # Background # Ultimately, what I want to do is to be able to set a time
2011 Apr 12
1
Signal handling / alarm timeouts
What are the ramifications of setting up user signal handling to allow the use of e.g. alarm(2) to send a SIGALRM to the R process at some number of seconds in the future to e.g. interrupt a routine that is taking too long to complete. I can't find any R language support for this (e.g. a timeout argument to tryCatch() would be ideal), so am wondering what kinds of problems are to be expected
2012 Dec 13
4
Running MCMC in R
Dear all I am now running a MCMC iteration in the R program. But it is always stucked in some loop. This cause big problems for my research. So I want to know whether we can skip the current dataset and move to next simulated data when the iteration is stucked? Alternatively, can the MCMC chain skip the current iteration when it is stucked and automatically to start another chain with different
2008 Jun 16
1
Execute expr with a timeout?
Hello, Does someone know how to execute an expression in R, limiting the time to evaluate it and raising an exception if it takes too long to run? Something like: > with.timeout(expr, timeout = 10) which stops the evaluation of 'expr' if it is not done after 10 sec? Best, Philippe Grosjean
2010 Dec 07
2
Time out for a R Function
Hello Group, I have an R-function that works fine for most part but sometime runs into a long loop! (I'm lazy and short on time to debug right now so want to do something easy) For my purpose, it is ok to make few errors .... is there a way I can put a timeout on a function and the r-process needes to move on to the next step? Thank you. S
2012 Mar 15
2
Timer on a function
Hello, I have a program that consists of a loop fitting a function over many models. Sometimes the fitting on a particular model takes minutes to converge. Is there a way that I can limit the amount of time that R spends on a given model: say if my line is: fittingFunction( func, model.1) can I have some function: stopIfUnderTime( fittingFunction( func, model.1) , 5 ) where