[R] Q: how to interrupt long calculation?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Aug 30 20:29:56 CEST 2007
On Thu, 30 Aug 2007, D. R. Evans wrote:
> Prof Brian Ripley said the following at 08/30/2007 11:00 AM :
>> On Thu, 30 Aug 2007, D. R. Evans wrote:
>>> Paul Smith said the following at 08/29/2007 04:32 PM :
>>>> The instance of R running will be immediately killed and then you can
>>>> start R again.
>>> But then I would lose all the work. There must be some way to merely
>>> interrupt the current calculation. Mustn't there?
>> Only if it is long-running in R code, when ctrl-C or equivalent (Esc in
>> Rgui) works. If it is long-running in C or Fortran code, there is not.
> It's inside loess()... so isn't that R code?
No, it is mainly Fortran, called from C called from R.
> I can sit hitting ctrl-C all day (well, it seems like it), but the code
> does not get interrupted :-(
>> Assuming a Unix-alike, sending SIGUSR1 will save the current workspace and
>> quit. Even that is a little dangerous as the workspace need not be in a
>> consistent state.
> That's helpful, thank you; at least it means I stand a chance of being able
> to interrupt the code and recover.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help