Restart Kernel - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


restart

clear internal memory

 

Calling Sequence

Description

Examples

Calling Sequence

restart

Description

• 

The restart command causes the Maple kernel to clear its internal memory so that Maple acts (almost) as if just started.

• 

A warning message will appear when restart is called by the restart button in the toolbar ( ) in the Standard interface, but not when the restart command is entered and executed.

• 

On restart, the Maple kernel returns most of the memory it has allocated to the operating system. This includes, but is not limited to, garbage collection. After a restart, the amount of memory the Maple kernel has allocated should be similar to the amount of memory allocated when a Maple kernel first starts.

• 

The settings of all identifiers (variables and procedures) are reset, libname is reset to its initial state, names read from any repositories are marked as unread, and then the Maple initialization files are reread.

• 

Shared libraries loaded for external_calling are unloaded on restart. The Java Virtual Machine that is started for Java external calling is terminated on restart.

• 

The output of Maple commands remains, but the memory of their execution is erased. So although the ditto operators will not work, the context menus are still available on (almost) all output, and equation labels may be referenced.  The numbering of equation labels continues, as they refer only to the output.

• 

The only type of displayed output that can no longer be manipulated is data in rtables. In general, Arrays, Matrices, and Vectors no longer have working context menus after restart, including imported data, which is displayed in an rtable.

• 

The restart command only works at the top level. It cannot be executed within a procedure, or from a file being read by the read statement; this would cause Maple to be in an inconsistent state. It must be executed in a separate prompt (or line) from all other commands, since all commands in a prompt are passed to the kernel at once; entering other commands in the prompt could cause unexpected results.

• 

Note that most Maple packages can be unloaded using the unwith command. However, there are some older packages with a table-based implementation, rather than the newer module-based implementation, which can only be unloaded using the restart command.  A list of these packages is found on the unwith help page.

• 

When Command-line Maple is started with the -c option, the specified commands are re-executed after a restart. For information on the -c option, see maple.

  

In the Standard interface, the autoexecute feature may be set on individual commands before restart is executed, and repeating autoexecution after restart will re-execute only those commands.

  

Note that any existing start up code will also be re-executed.

• 

Any help searches that have been performed are cleared on restart, but the help history is not affected, and the current help pages remain open.

  

Note: Using restart in a document that contains embedded components is not advised, since any expressions that have been executed outside the component, then used inside, are reset, even though the contents of components are not affected.

• 

If multiple Maple documents are open, either in separate tabs or in separate windows, restart will only apply to the document(s) associated with the Maple kernel in which the restart command is executed. By default, this is only the current document. This setting is controlled by the options for the Mathematical Engine in the Options dialog.

• 

Below is a table of properties affected and not affected by a restart, including a list of kernelopts and interface settings and how they are affected.

Reset

Unaffected

 

 

variables

character and paragraph settings and styles

procedures

page numbering

shared libraries

numeric formatting

imported files and data

output from Maple commands and context menus

files of Maple code read

context menus on most output

Maplet definitions

drawing palette on most output

loaded packages

equation labels

Typesetting rules

embedded components* (see note above)

plot output and display options

print settings

commands in spreadsheets

spreadsheet cell assignments

help searches

currentdir

kernelopts(ASSERT)

kernelopts(display_zero_complex_part)

kernelopts(assertlevel)

kernelopts(max_record_depth)

kernelopts(cacheclearlimit)

kernelopts(numcpus)

kernelopts(cpulimit)

interface(elision ...)

kernelopts(datalimit)

interface(historyfile)

kernelopts(filelimit)

interface(historysize)

kernelopts(inline)

interface(labelwidth)

kernelopts(jvmheaplimit)

interface(typesetting)

kernelopts(limitjvmheap)

options from the Options menu (Standard interface)

kernelopts(opaquemodules)

 

kernelopts(printbytes)

 

kernelopts('printlevel')

 

kernelopts(processlimit)

 

kernelopts(profile)

 

kernelopts(sparse_sort_cutoff)

 

kernelopts(stacklimit)

 

interface(ansi)

 

interface(autoassign)

 

interface(displayprecision)

 

interface(echo)

 

interface(errorbreak)

 

interface(errorcursor)

 

interface(imaginaryunit)

 

interface(indentamount)

 

interface(labeling)

 

interface(latexwidth)

 

interface(longdelim)

 

interface(plotdevice)

 

interface(plotoptions)

 

interface(plotoutput)

 

interface(postplot)

 

interface(preplot)

 

interface(prettyprint)

 

interface(prompt)

 

interface(quiet)

 

interface(rtablesize)

 

interface(screenheight)

 

interface(screenwidth)

 

interface(showassumed)

 

interface(verboseproc)

 

interface(warnlevel)

 

interface(worksheetdir)

 

Examples

a2

a2

(1)

withinttrans:

fourierx,x,t

2IπDirac1,t

(2)

interfaceverboseproc=0

1

(3)

Note that the output of an interface variable assignment is the old value, not the new one.

proc(x)
   trunc(x):
end proc;

procx...end proc

(4)

52104

29130486520243894529623053895593834890786414833841548364617732063716754081481379078028552440792926355704746836652054508584597185528433952366101529418011123632967861702261909487616

(5)

interfaceelisionthreshold=100:

interfaceelisiondigitsbefore=10:

interfaceelisiondigitsafter=15:

52104

2913048652[...154 ⅆⅈgⅈts...]702261909487616

(6)

interfacetypesetting=extended

extended

(7)

TypesettingSettingsuseprime=false

true

(8)

difffx,x

ⅆⅆxfx

(9)

After restart, the variable assignment, loaded package, interface verboseproc variable, and typesetting rules are reset.  The interface elision and typesetting variables remain.

restart

a

a

(10)

fourierx,x,t

x,x,t

(11)

proc(x)
   trunc(x):
end proc;

procxtruncxend proc

(12)

52104

2913048652[...154 ⅆⅈgⅈts...]702261909487616

(13)

difffx,x

ⅆⅆxfx

(14)

interfacetypesetting

extended

(15)

See Also

autoexecute

ditto

equation labels

external_calling

initialization

interface

kernelopts

libname

maple

Options dialog

read

unassign

unwith