When you start GAP under UNIX, you may specify a number of options on
the command-line to change the default behaviour of GAP. All these
options start with a hyphen -, followed by a single letter. Options
must not be grouped, e.g., gap -gq is illegal, use gap -g -q
instead. Some options require an argument, this must follow the option
and must be separated by a space, e.g., gap -m 256k, it is not
correct to say gap -m256k instead.
GAP for UNIX will distinguish between upper and lower case options.
As is described in Chapter Installing GAP (see Installation of GAP for UNIX), usually you will not execute GAP directly. Instead you will
call a shell script, with the name gap, which in turn executes GAP.
This shell script sets some options which are necessary to make GAP work on
your system. This means that the default settings mentioned below may
not be what you experience when you execute GAP on your system.
-h
The options -h tells GAP to print a summary of all available
options. GAP exits after printing the summary, all other options are
ignored.
-b
The option -b tells GAP to suppress the banner. That means that
GAP immediately prints the prompt. This is useful when, after a
while, you get tired of the banner.
-q
The option -q tells GAP to be quiet. This means that GAP does
not display the banner nor the prompt gap>. This is useful if you want
to run GAP as a filter with input and output redirection and want to
avoid the banner and the prompts appearing in the output file.
-e
The option -e tells GAP not to quit when receiving a ctr-D on an
empty input line (see quit).
This option should not be used when the input is a file or pipe.
-f
The option -f tells GAP to enable the line editing and history (see
Line Editing).
In general line editing will be enabled if the input is connected to a
terminal. There are rare circumstances, for example when using a remote
session with a corrupted telnet implementation, when this detection fails.
Try using -f in this case to enable line editing.
-n
The option -n tells GAP to disable the line editing and history
(see Line Editing).
You may want to do this if the command line editing is incompatible with
another program that is used to run GAP. For example if GAP is run
from inside a GNU Emacs shell window, -n should be used since otherwise
every input line will be echoed twice, once by Emacs and once by GAP.
-x length
With this option you can tell GAP how long lines are. GAP uses this value to decide when to split long lines.
The default value is 80, unless another value can be obtained from the Operating System, which is the right value if you have a standard ASCII terminal. If you have a larger monitor, or use a smaller font, or redirect the output to a printer, you may want to increase this value.
-y length
With this option you can tell GAP how many lines your screen has. GAP uses this value to decide after how many lines of on-line help it should wait.
The default value is 24, unless another value can be obtained from the Operating System, which is the right value if you have a standard ASCII terminal. If you have a larger monitor, or use a smaller font, or redirect the output to a printer, you may want to increase this value.
-g
The option -g tells GAP to print a information message every time a
full garbage collection is performed.
#G FULL 44580/2479kb live 57304/4392kb dead 734/4096kb free
For example, this tells you that there are 44580 live objects that survived a full garbage collection, that 57304 unused objects were reclaimed by it, and that 734 KBytes from a total allocated memory of 4096 KBytes are available afterwards.
-g -g
If you give the option -g twice, GAP prints a information message
every time a partial or full garbage collection is performed.
#G PART 9405/961kb+live 7525/1324kb+dead 2541/4096kb free
For example, this tells you that 9405 objects survived the partial garbage collection and 7525 objects were reclaimed, and that 2541 KBytes from a total allocated memory of 4096 KBytes are available afterwards.
-m memory
The option -m tells GAP to allocate memory bytes at startup time.
If the last character of memory is k or K it is taken as KBytes and
if the last character is m or M memory is taken as MBytes.
Under UNIX the default amount of memory allocated by GAP is 8 MBytes. The amount of memory should be large enough so that computations do not require too many garbage collections. On the other hand, if GAP allocates more virtual memory than is physically available, it will spend most of the time paging.
-o memory
The option -o tells GAP to allocate at most memory bytes. If the
last character of memory is k or K it is taken as KBytes and if the
last character is m or M memory is taken as MBytes.
Under UNIX the default amount is 128 MBytes. If more than this amount is required during the GAP session, GAP prints an error messages and enters a break loop.
-l pathname
The option -l tells GAP that the GAP root directory (see GAP Root Directory) is pathname. By default pathname is './', i.e., the root
directory is normally expected to be the current directory. GAP
searches for the library files which contain the functions initially
known to GAP, in the subdirectory lib/ of the root directory.
pathname should end with a pathname separator, i.e., '/', but GAP
will silently add one if it is missing. GAP will read the file
'pathname/lib/init.g' during startup. If GAP cannot find this file
it will print the following warning
gap: hmm, I cannot find 'lib/init.g' maybe use option '-l <gaproot>'?
It is not possible to use GAP without the library files, so you must not ignore this warning. You should leave GAP and start it again, specifying the correct root path using the '-l' option.
It is also possible to specify several alternative library paths by separating them with semicolons ';'. This is explained in detail in GAP Root Directory. Note that no whitespace is permitted before or after the semicolons.
-r
The option -r tells GAP not to read the user supplied /.gaprc
files.
-L filename
The option -L tells GAP to load a saved workspace. See
section Saving and Loading a Workspace.
filename ...
Further arguments are taken as filenames of files that are read by GAP during startup, after the system and private init files are read, but before the first prompt is printed. The files are read in the order in which they appear on the command line. GAP only accepts 14 filenames on the command line. If a file cannot be opened GAP will print an error message and will abort.
GAP 4 manual