Changes between Version 1 and Version 2 of AnugaCheckpoints
- Timestamp:
- Jun 30, 2010, 9:38:40 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AnugaCheckpoints
v1 v2 29 29 }}} 30 30 31 To use this code normally, make sure use_restore_point is False. If your script is interrupted for any reason, set use_restore_point to be True, and it will continue from the last save point. 32 33 {{{cPickle.dump}}} will store an entire class on disk. 34 {{{cPickle.load}}} will restore that class from disk. 35 So when you pickle the domain, you can reload its exact state using {{{cPickle.load}}}. 36 37 31 38 == use_cache Method == 32 39 ANUGA also has inbuilt caching functionality. You can set the use_cache = True parameter on many functions, and the results of the operation will be stored on disk for the next time the same operation is executed.