set or query kernel variables and options
kernelopts(arg1, arg2, ... )
arg1, arg2, ...
argument(s) of the form name=val or name
The kernelopts command is a mechanism for communication between the user and the Maple kernel. Specifically, this command is used to set and query variables that affect the computation of Maple. The variables that can be set and queried are as follows.
There is a Maplet interface to the kernelopts routine. For more information, see the Maplets[Examples][KernelOpts] help page.
If an argument is of the form name=val then this specifies the setting for the named variable.
For each argument of this type, kernelopts returns the old value of the argument. This is convenient when you want to change and later restore a value, for example,
oldNumCPUs := kernelopts(numcpus=4); # set new value and save old
. . . .
kernelopts(numcpus=oldNumCPUs); # restore previous value
If an argument is a name then the current value of the named variable is retrieved and returned as the function value.
When kernelopts is called with many arguments, it returns an expression sequence containing the values.
The cpulimit, datalimit, and stacklimit limit variables must be used carefully. When a limit is reached Maple may shutdown without warning. The option to save may not be given. On some platforms, including all Windows platforms, the detection of limit violations is tied to garbage collection. Therefore, the detection of limit violations is inaccurate for code that rarely invokes garbage collection. If garbage collection is never invoked, Maple does not detect limit violations.
The filelimit and processlimit limit variables must also be used carefully. They limit the total number of files or processes that Maple can use. Some internal Maple functions open files or run processes and thus will fail if these limits are too low.
The values assigned to the following kernelopts options can be modified by attaching a unit: cacheclearlimit, cpulimit, datalimit, jvmheaplimit, and stacklimit. When the conversion from the given unit to the default unit is not exact the value is rounded down. The units used for these options follow the IEC prefixes and definitions, with the exception of the unit word. For kernelopts a word is the wordsize of the current machine (either 32 or 64 bits). The return value for these options is the previous value in the default unit.
Some kernelopts are most useful in the multithreaded Maple engine. In particular the numcpus and numactivethreads have limited usefulness in the single threaded kernel.
The standard set of kernelopts variables is:
If true, ASSERT functions are
evaluated as expected. If false
(default), ASSERT functions are
ignored. ASSERT is obsolete (but still
supported) and has been replaced by
0, 1, 2
0 - no assertions are checked.
1 - only calls to the ASSERT function
2 - calls to the ASSERT function, and
assignment type assertions are