> < ^ Date: Mon, 10 Jan 2000 12:34:13 +0000
> < ^ From: Steve Linton <sal@dcs.st-and.ac.uk >
< ^ Subject: Re: save and load

Dear GAP Forum,

Kurt Ewald asked about saving and loading workspaces. This is a feature new in
GAP4, which can be used to speed up the start-up of GAP or to save work in

A workspace is saved using the GAP command (actually a keyword)
`SaveWorkspace' from the main gap> prompt.

A new GAP session can later be started using the saved workspace using the
UNIX (or DOS) command `gap -L <filename> <more options>'. You can't load a
workspace "into" an existing session.

For example, I can set a global variable and save a workspace

{caolila:8}gap4 -N -b
GAP4, Version: 4.dev of today, i686-pc-linux-gnu-gcc
gap> a := SymmetricGroup(7);
Sym( [ 1 .. 7 ] )
gap> SaveWorkspace("gapws");

Now I can restart using that workspace:

{caolila:9}gap4 -L gapws
CoGAP4, Version: 4.dev of today, i686-pc-linux-gnu-gcc
Components:  small, small2, small3, small4, small5, small6, small7, 
             small8, id2, id3, id4, id5, id6, trans, prim, tbl, 
             tom  installed.
gap> ConjugacyClasses(a);
[ ()^G, (1,2)^G, (1,2)(3,4)^G, (1,2)(3,4)(5,6)^G, (1,2,3)^G, (1,2,3)(4,5)^G, 
  (1,2,3)(4,5)(6,7)^G, (1,2,3)(4,5,6)^G, (1,2,3,4)^G, (1,2,3,4)(5,6)^G, 
  (1,2,3,4)(5,6,7)^G, (1,2,3,4,5)^G, (1,2,3,4,5)(6,7)^G, (1,2,3,4,5,6)^G, 
  (1,2,3,4,5,6,7)^G ]

A few caveats apply to this feature. Firstly, saved workspaces are rather big
(12.6MB in this example), although they do compress quite well (down to
3.2MB). Secondly, they are highly specific to the version of GAP that you are
running. There is no guarantee (and indeed it is quite unlikely) that a saved
workspace will load correctly after even a bugfix is applies to the system,
let alone any more radical change.


> < [top]