Top
Back: sum
Forward: which
FastBack: all_lib
FastForward: inout_lib
Up: general_lib
Top: Singular 2-0-6 Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.2.16 watchdog

Procedure from library general.lib (see general_lib).

Return:
Result of cmd, if the result can be computed in i seconds. Otherwise the computation is interrupted after i seconds, the string "Killed" is returned and the global variable 'watchdog_interrupt' is defined.

Note:
* the MP package must be enabled
* the current basering should not be watchdog_rneu, since watchdog_rneu will be killed
* if there are variable names of the structure x(i) all polynomials have to be put into eval(...) in order to be interpreted correctly
* a second Singular process is started by this procedure

Example:
 
LIB "general.lib";
ring r=0,(x,y,z),dp;
poly f=x^100+y^100;
watchdog(1,"factorize(eval("+string(f)+"))");
==> Killed
watchdog(100,"factorize(eval("+string(f)+"))");
==> [1]:
==>    _[1]=1
==>    _[2]=x80-x60y20+x40y40-x20y60+y80
==>    _[3]=x16-x12y4+x8y8-x4y12+y16
==>    _[4]=x4+y4
==> [2]:
==>    1,1,1,1


Top Back: sum Forward: which FastBack: all_lib FastForward: inout_lib Up: general_lib Top: Singular 2-0-6 Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 2-0-6, November 2004, generated by texi2html.