Hello,


the following code defines a polynomial Ring over which I define an Ideal 
and compute its Groebner Basis within an interval of 5s:


Ri = sage_eval(((createRing),'R'));
> ideal = Ri.ideal(polynomials);
> try:
> alarm(5);
> #timeit ('ideal.groebner_basis()', preparse=None, number=1, repeat=1, 
> precision=5);
> time gb = ideal.groebner_basis('toy:buchberger2');
> cancel_alarm();
> print '\n'
> except AlarmInterrupt:
> print "abort after 5s\n";


The Problem is that since the exception caused by the alarm is raised, I am 
going to compute another Groebner Basis having defined another Ring before 
while running threw a for loop. At this point the function groebner_basis() 
raises an exception telling me a 'basering' would be undefined.


Since this only happens using the Singular algorithms I came up with this: 
http://www.gap-system.org/Manuals/pkg/singular/doc/chap1.html#X82260C8E82090E87 
(cp. 
1-7-5)


So for a short part of my output have a look below, where Cassou_1.xml runs 
as usual, Cohn_2.xml aborts after a few seconds and beginning the 
Curves.curve10_20.xml an exception raises.


Does anyone have an idea how to fix it?


Thanks for any answer.


With best regards


Fabian




1 Cassou_1.xml

Multivariate Polynomial Ring in b, c, d, e over Rational Field

Degree reverse lexicographic term order

1 loops, best of 1: 219.62 ms per loop


1 Cohn_2.xml

Multivariate Polynomial Ring in t, x, y, z over Rational Field

Degree reverse lexicographic term order

abort after 60s


1 Curves.curve10_20.xml

Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, 
x10, u, v over Rational Field

Degree reverse lexicographic term order

// ** redefining i_par **

// ** redefining # **

// ** redefining P **

Exception RuntimeError: RuntimeError('Error raised calling singular 
function',) in 'sage.libs.singular.function.LibraryCallHandler.handle_call' 
ignored

---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

/Applications/sage/local/lib/python2.7/site-packages/sage/all_cmdline.pycin 
<module>()

----> 1 load('/Users/kenneth/Desktop/example.sage')


/Applications/sage/local/lib/python2.7/site-packages/sage/structure/sage_object.soin
 sage.structure.sage_object.load 
(sage/structure/sage_object.c:9540)()


/Applications/sage/local/lib/python2.7/site-packages/sage/misc/preparser.pycin 
load(filename, globals, attach)

*   1771*             # Preparse in memory only for speed.

*   1772*             exec_file_is(fpath)

-> 1773             exec preparse_file(open(fpath).read()) + "\n" in globals

*   1774*     elif fpath.endswith('.spyx') or fpath.endswith('.pyx'):

*   1775*         exec_file_is(fpath)


/Applications/sage/local/lib/python2.7/site-packages/sage/all_cmdline.pycin 
<module>()


/Applications/sage/local/lib/python2.7/site-packages/sage/misc/sage_timeit_class.soin
 sage.misc.sage_timeit_class.SageTimeit.__call__ 
(sage/misc/sage_timeit_class.c:1177)()


/Applications/sage/local/lib/python2.7/site-packages/sage/misc/sage_timeit_class.soin
 sage.misc.sage_timeit_class.SageTimeit.eval 
(sage/misc/sage_timeit_class.c:965)()


/Applications/sage/local/lib/python2.7/site-packages/sage/misc/sage_timeit.pycin
 
sage_timeit(stmt, globals_dict, preparse, number, repeat, precision, 
seconds)

*    241*                     break

*    242* 

--> 243         series = [s/number for s in timer.repeat(repeat, number)]

*    244*         best = min(series)

*    245* 


/Applications/sage/local/lib/python/timeit.pyc in repeat(self, repeat, 
number)

*    221*         r = []

*    222*         for i in range(repeat):

--> 223             t = self.timeit(number)

*    224*             r.append(t)

*    225*         return r


/Applications/sage/local/lib/python/timeit.pyc in timeit(self, number)

*    193*         gc.disable()

*    194*         try:

--> 195             timing = self.inner(it, self.timer)

*    196*         finally:

*    197*             if gcold:


/Applications/sage/local/lib/python2.7/site-packages/sage/all_cmdline.pycin 
inner(_it, _timer)


/Applications/sage/local/lib/python2.7/site-packages/sage/misc/cachefunc.soin 
sage.misc.cachefunc.CachedMethodCaller.__call__ 
(sage/misc/cachefunc.c:9194)()


/Applications/sage/local/lib/python2.7/site-packages/sage/misc/cachefunc.soin 
sage.misc.cachefunc.CachedMethod._instance_call 
(sage/misc/cachefunc.c:11887)()


/Applications/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pycin
 
groebner_basis(self, algorithm, deg_bound, mult_bound, prot, *args, **kwds)

*   3825*         if algorithm is '':

*   3826*             try:

-> 3827                 gb = 
self._groebner_basis_libsingular("groebner",deg_bound
=deg_bound, mult_bound=mult_bound, *args, **kwds)

*   3828*             except (TypeError,NameError) as msg: # conversion to 
Singular not supported

*   3829*                 try:


/Applications/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pycin
 
wrapper(*args, **kwds)

*    503*         """

*    504*         with LibSingularDefaultContext():

--> 505             return func(*args, **kwds)

*    506*     return wrapper

*    507* 


/Applications/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pycin
 
_groebner_basis_libsingular(self, algorithm, *args, **kwds)

*    836*             S = slimgb_libsingular(self)

*    837*         elif algorithm == "groebner":

--> 838             S = groebner(self)

*    839*         else:

*    840*             try:


/Applications/sage/local/lib/python2.7/site-packages/sage/libs/singular/function.soin
 sage.libs.singular.function.SingularFunction.__call__ 
(sage/libs/singular/function.cpp:13039)()


/Applications/sage/local/lib/python2.7/site-packages/sage/libs/singular/function.soin
 sage.libs.singular.function.call_function 
(sage/libs/singular/function.cpp:14576)()


RuntimeError: Error in Singular function call 'groebner':

 `basering` is undefined

 error occurred in or before standard.lib::groebner line 887: `  def 
P=basering;`

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to