|
The Set- procedures allow the user to attach values to certain
internal variables which control system or global features.
The Get- functions enable one to obtain
the current values of these variables.
GetAssertions() : -> RngIntElt
Controls the checking of assertions (see the assert statement and
related statements in the chapter on the language). Default is SetAssertions(1). The relevant values are 0 for no checking at all,
1 for normal checks, 2 for debug checks and 3 for extremely stringent
checking.
GetAutoColumns() : -> BoolElt
If enabled, the IO system will try to determine the number of
columns in the window by using ioctl(); when a window change
or a stop/cont occurs, the Columns variable (below) will be
automatically updated. If disabled, the Columns variable will
only be changed when explicitly done so by SetColumns.
Default is SetAutoColumns(true).
GetAutoCompact() : -> BoolElt
Control whether automatic compaction is performed.
Normally the memory manager of Magma will compact all of its memory
between each statement at the top level. This removes fragmentation
and reduces excessive memory usage. In some very rare situations, the
compactions may become very slow (one symptom is that an inordinate pause
occurs between prompts when only a trivial operation or nothing is done).
In such cases, turning the automatic
compaction off may help (at the cost of possibly more use of memory).
Default is SetAutoCompact(true).
GetBeep() : -> BoolElt
Controls `beeps'.
Default is SetBeep(true).
GetColumns() : -> RngIntElt
Controls the number of columns used by the IO system. This affects
the line editor and the output system. (As explained above, if
AutoColumns is on, this variable will be automatically determined.)
The number of columns will determine how words are wrapped.
If set to 0, word wrap is not performed. The default value is
SetColumns(80) (unless SetAutoColumns(true)).
Returns the current directory as a string.
(Use ChangeDirectory(s) to change the working directory.)
GetEchoInput() : ->
Set to true or false according to whether or not input
from external files should also be sent to standard output.
GetEnv(s) : MonStgElt -> MonStgElt
Returns the value of the external environment variable s as a string.
GetExitSummary() : ->
Controls whether or not Magma should print the exit summary ("Total time: ...") when it exits ({true} by default at startup).
SetGPU(b) : BoolElt ->
GetGPU() : -> BoolElt
Set the NVIDIA GPU mode to b; this determines whether Magma
should use NVIDIA GPUs via CUDA when present. This
is only relevant to a CUDA-enabled executable (typically downloaded as
magma.cuda.exe) and is {true} by default in that case (so
the GPU is used by default); for a non-CUDA-enabled executable,
the procedure has no effect.
Currently, a GPU is exploited in matrix multiplication over GF(2)
and small prime finite fields and consequently anything which
depends on such multiplication, such as the
dense F4 Gröbner basis algorithm over such fields.
GetHistorySize() : ->
Controls the number of lines saved in the history. If the
number is set to 0, no history is preserved.
GetIgnorePrompt() : -> BoolElt
Controls the option to ignore the prompt
to allow the pasting of input lines back in.
If enabled, any leading '>' characters (possibly separated by white space)
are ignored by the history system when the input file is a terminal,
unless the line consists of the '>' character alone (without
a following space), which could not come from a prompt since in a prompt
a space or another character follows a '>'.
Default is SetIgnorePrompt(false).
GetIgnoreSpaces() : -> BoolElt
Controls the option to ignore spaces when searching in the line editor.
If the user moves up or down in the line editor using <Ctrl>-P or <Ctrl>-N
(see the line editor key descriptions)
and if the cursor
is not at the beginning of the line, a search is made forwards or
backwards, respectively, to the first line which starts with the same string
as the string consisting of all the characters before the cursor.
While doing the search, spaces are ignored if and only if this option is on
(value true). Default is SetIgnoreSpaces(true).
GetIndent() : -> RngIntElt
Controls the indentation level for formatting output.
The default is SetIndent(4).
GetLibraries() : -> MonStgElt
Controls the Magma library directories via environment
variable MAGMA_LIBRARIES.
The procedure SetLibraries takes a string, which will be taken as the
(colon-separated) list of sub-directories in the library root
directory for the libraries; the function
GetLibraryRoot returns the current value as a string.
These directories will be searched when you try to load
a file; note however that first the directories indicated
by the current value of your path environment variable MAGMA_PATH will be searched. See SetLibraryRoot for the
root directory.
GetLibraryRoot() : -> MonStgElt
Controls the root directory for the Magma libraries, via the
environment variable MAGMA_LIBRARY_ROOT.
The procedure SetLibraryRoot takes a string, which will be the
absolute pathname for the root of the libraries; the function
GetLibraryRoot returns the current value as a string.
See also SetLibraries.
GetLineEditor() : -> BoolElt
Controls the line editor.
Default is SetLineEditor(true).
Overwrite: BoolElt Default: false
UnsetLogFile() : ->
Procedure.
Set the log file to be the file specified by the string F: all
input and output will be sent to this log file as well as to the terminal.
If a log file is already in use, it is closed and F is used instead.
The parameter Overwrite can be used to indicate that
the file should be truncated before writing input and output on it; by default
the file is appended.
GetMemoryLimit() : -> RngIntElt
Set the limit (in bytes) of the memory which the memory manager
will allocate (no limit if 0).
Default is SetMemoryLimit(0).
GetNthreads() : -> RngIntElt
Set the number of threads to be used in multi-threaded algorithms to be
n, if POSIX threads are enabled in this version of Magma. Currently,
this affects the coding theory minimum weight algorithm
(MinimumWeight) and the F4 Gröbner basis algorithm
for medium-sized primes (Groebner).
Overwrite: BoolElt Default: false
UnsetOutputFile() : ->
Start/stop redirecting all Magma output to a file (specified by the
string F). The parameter Overwrite can be used to indicate that
the file should be truncated before writing output on it.
GetPath() : -> MonStgElt
Controls the path by which the searching of files is done. The
path consists of a colon separated list of directories which
are searched in order ("." implicitly assumed at the front).
Tilde expansion is done on each directory.
(May be overridden by the environment variable MAGMA_PATH.)
GetPrintLevel() : -> MonStgElt
Controls the global printing level, which is one of
"Minimal", "Magma", "Maximal", "Default".
Default is SetPrintLevel("Default").
GetPrompt() : -> MonStgElt
Controls the terminal prompt (a string). Expansion of
the following % escapes occurs:
- %%
- The character %
- %h
- The current history line number.
- %S
- The parser `state': when a new line is about to be
read while the parser has only seen incomplete
statements, the state consists of a stack of words
like "if", "while", indicating the incomplete
statements.
- %s
- Like %S except that only the topmost word is
displayed.
Default is SetPrompt("%S> ").
Set whether Magma should quit on any error to b. If b is true,
Magma will completely quit when any error (syntax, runtime, etc.) occurs.
Default is SetQuitOnError(false).
GetRows() : -> RngIntElt
Controls the number of rows in a page used by the IO system. This affects
the output system. If set to 0, paging is not performed. Otherwise
a prompt is given after the given number of rows for a new page.
The default value is SetRows(0).
Returns a string giving the filename used to launch Magma in script
mode. If Magma was not started in script mode this intrinsic will
still succeed, and the returned string will contain text indicating
that script mode was not in use.
Returns a sequence of strings that were given as arguments to a Magma
running in script mode (i.e., with the -i or -I options).
Will return an empty sequence if Magma was not started in script mode.
GetSeed() : -> RngIntElt, RngIntElt
Controls the initialization seed and step number for pseudo-random
number generation. For details, see the section on random object
generation in the chapter on statements and expressions.
Returns the directory Magma uses for storing temporary files.
May be influenced on startup via the MAGMA_TEMP_DIR environment variable (see Section Environment Variables).
GetTraceback() : -> BoolElt
Controls whether Magma should produce a traceback of user
function calls before each error message.
The default value is SetTraceback(true).
Return integers x, y and z such the current version of Magma is
Vx.y--z.
GetViMode() : -> BoolElt
Controls the type of line editor used: Emacs (false) or VI style.
Default is SetViMode(false).
GetWarnIntrinsicOverride() : -> BoolElt
Controls whether warnings are printed when a package intrinsic overrides
a previous intrinsic. The default is false (no warning).
[Next][Prev] [Right] [Left] [Up] [Index] [Root]
|