From ggrothendieck at gmail.com  Tue Jan  3 14:21:08 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Tue, 3 Jan 2006 08:21:08 -0500
Subject: [Rd] checkpointing
In-Reply-To: <BCA2993F-D89F-4054-BB33-495B2EA8B74F@stat.berkeley.edu>
References: <Pine.GSO.4.31.0601030832230.5822-100000@markov.stats>
	<BCA2993F-D89F-4054-BB33-495B2EA8B74F@stat.berkeley.edu>
Message-ID: <971536df0601030521u4377de72jfbd1ff4499e7deed@mail.gmail.com>

One possibility for overcoming this problem might be to divide the
variables being optimized over into two sets using a grid over one
set (which should probably consist of only one or two variables) and then
fixing the gridded variables use optim over the rest.  In many problems its
really just one or two variables that cause all the problems and if that
were the case, each of the many runs of optim would be fast
and one could save its state upon completion.

Of course it would be even more convenient if there were some
builtin facility as the poster stated but this might work depending
on the particulars of the problem.

On 1/3/06, Kasper Daniel Hansen <khansen at stat.berkeley.edu> wrote:
> On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote:
>
> > I use save.image() or save(), which seem exactly what you are
> > asking for.
>
> I have the (perhaps unsupported) impression that Ross wanted to save
> the progress during the optim run. Since it spends most of its time
> in the .Internal(optim(***)) call, save/save.image would not work.
>
> /Kasper
>
> > On Mon, 2 Jan 2006, Ross Boylan wrote:
> >
> >> I would like to checkpoint some of my calculations in R, specifically
> >> those using optim.  As far as I can tell, R doesn't have this
> >> facility,
> >> and there seems to have been little discussion of it.
> >>
> >> checkpointing is saving enough of the current state so that work can
> >> resume where things were left off if, to take my own example, the
> >> system
> >> crashes after 8 days of calculation.
> >>
> >> My thought is that this could be added as an option to optim as
> >> one of
> >> the control parameters.
> >>
> >> I thought I'd check here to see if anyone is aware of any work in
> >> this
> >> area or has any thoughts about how to proceed.  In particular, is
> >> save a
> >> reasonable way to save a few variables to disk?  I could also make
> >> the
> >> code available when/if I get it working.
> >
> > --
> > 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
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] checkpointing
Gabor Grothendieck