kernelopts - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Resource Management : kernelopts

kernelopts

set or query kernel variables and options

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Compatibility

Calling Sequence

kernelopts(arg1, arg2, ... )

Parameters

arg1, arg2, ...

-

argument(s) of the form name=val or name

Description

• 

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.

ASSERT

assertlevel

bindir

byteorder

bytesalloc

bytesused

cacheclearlimit

cpulimit

cputime

cputype

dagtag

datadir

datalimit

dirsep

display_zero_complex_part

filelimit

floatPi

gcbytesavail

gcbytesreturned

gcmaxthreads

gcthreadmemorysize

gctimes

gctotaltime

gmpthreshold

gmpversion

heaps

homedir

includepath

inline

jvmheaplimit

level

limitjvmheap

locale

mapledir

max_record_depth

maxdigits

maximmediate

memusage

multithreaded

numcpus

numactivethreads

opaquemodules

pathsep

pid

platform

printbytes

'printlevel'

processlimit

profile

readdotm

sparse_sort_cutoff

stackalloc

stacklimit

system

toolboxdir

toolboxversion

unread

username

version

wordsize

• 

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:

NAME

VALUES

EXPLANATION

 

 

 

ASSERT

true/

If true, ASSERT functions are

 

false

evaluated as expected. If false

 

 

(default), ASSERT functions are

 

 

ignored. ASSERT is obsolete (but still

 

 

supported) and has been replaced by

 

 

assertlevel.

 

 

 

assertlevel

0, 1, 2

0 - no assertions are checked.

 

 

1 - only calls to the ASSERT function

 

 

are checked.

 

 

2 - calls to the ASSERT function, and

 

 

assignment type assertions are

 

 

checked.

 

 

The default value is 0.

 

 

 

bindir

string

The path to the system binary directory

 

 

of the Maple installation.

 

 

This value cannot be set.

 

 

 

byteorder

string

Either "little endian" or "big endian"

 

 

This value cannot be set.

 

 

 

bytesalloc

integer

Total number of bytes allocated by the

 

 

Maple mathematical kernel. This value

 

 

cannot be set.

 

 

 

bytesused

integer

Total number of bytes used by the Maple

 

 

mathematical kernel. This value cannot

 

 

be set.

 

 

 

cacheclearlimit

integer

The data limit, in kibibytes, for

 

 

maintaining temporary elements in cache

 

 

tables. A check is performed whenever

 

 

memory is allocated from the system.

 

 

If the total amount of memory allocated

 

 

exceeds this limit, cache tables will be

 

 

automatically cleared of all temporary

 

 

elements on the next garbage collection.

 

 

Values passed for this option can be

 

 

given with a Unit of information.

 

 

 

cpulimit

integer

The total amount of CPU time, in

 

 

seconds that Maple may consume. Maple

 

 

aborts if this time limit is exceeded.

 

 

If the value is 0 or it is not given the

 

 

current limit is returned. Limits may be

 

 

raised or lowered. Maple limits cannot

 

 

be raised above any system imposed hard

 

 

limits.

 

 

Values passed for this option can be

 

 

given with a Unit of time.

 

 

 

cputime

float

Total CPU time used since the beginning

 

 

of the session. This value cannot be

 

 

set.

 

 

 

cputype

string

A string describing the CPU type

 

 

that the current version of Maple

 

 

was built for.  This is most useful

 

 

on APPLE_UNIVERSAL_OSX where there

 

 

are multiple possible CPU types for