Re: Save a notebook state
- To: mathgroup at smc.vnet.net
- Subject: [mg111570] Re: Save a notebook state
- From: Roger Wilson <rogerhw999 at googlemail.com>
- Date: Fri, 6 Aug 2010 06:54:45 -0400 (EDT)
- References: <firstname.lastname@example.org>
On 4 Aug, 12:55, "slawek" <sla... at host.pl> wrote: > I have got a medium size .nb notebook, but the "evaluate notebook" command > take about half a hour. > > The "save" command save only input cells (and comments etc.) - but the > context (the values of variables) are not saved. Therefore after "open" I > must "evaluate" to restore the state of computations from a previous > session. > > An example: > > after loading saved notebook with > > In := x = Simplify(1+1+1) > Out = 3 > > I have two lines in the Mathematica front-end, but: a. no kernel is loaded; > b. the value of x is not 3, because x is not defined. > > Is it a way to save the notebook with all results, variables etc. to avoid > re-calculation of formulas? I.e. a save .nb with a dump the state of kernel? > > slawek DumpSave[filename] will save the state of your kernel to a file. Get[filename] will load this back. It doesn't save the notebook as well as you can have the kernel in various different states for the same notebook. DumpSave can take some time, Get is usually fairly fast. So, first time round do... LongCalcs... DumpSave... Get... ShortCalcs... Next time start at Get.