Sage: Ticket #11431: Conversion from Singular to Sage
https://trac.sagemath.org/ticket/11431
<p>
On <a class="ext-link" href="http://groups.google.com/group/sage-support/browse_thread/thread/f35e6064434dacdc"><span class="icon"></span>sage-devel</a>, Francisco Botana complained about some shortcomings of the conversion from Singular (pexpect interface) to Sage.
</p>
<p>
I think the conversions provided by this patch are quite thorough.
</p>
<p>
First of all, the patch provides a conversion of base rings, even with minpoly, with complicated block, matrix and weighted orders (note that one needs <a class="closed ticket" href="https://trac.sagemath.org/ticket/11316" title="enhancement: Weighted degree term orders added (closed: fixed)">#11316</a>) and even quotient rings:
</p>
<pre class="wiki">sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
'ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp);'
sage: R = singular('r1').sage_basering()
sage: R
Multivariate Polynomial Ring in a, b, c, d, e, f over Finite Field in x of size 3^2
sage: R.term_order()
Block term order with blocks:
(Matrix term order with matrix
[1 2]
[3 0],
Weighted degree reverse lexicographic term order with weights (2, 3),
Lexicographic term order of length 2)
sage: singular.eval('ring r3 = (3,z),(a,b,c),dp')
'ring r3 = (3,z),(a,b,c),dp;'
sage: singular.eval('minpoly = 1+z+z2+z3+z4')
'minpoly = 1+z+z2+z3+z4;'
sage: singular('r3').sage_basering()
Multivariate Polynomial Ring in a, b, c over Univariate Quotient Polynomial Ring in z over Finite Field of size 3 with modulus z^4 + z^3 + z^2 + z + 1
sage: singular.eval('ring r5 = (9,a), (x,y,z),lp')
'ring r5 = (9,a), (x,y,z),lp;'
sage: Q = singular('std(ideal(x^2,x+y^2+z^3))', type='qring')
sage: Q.sage_basering()
Quotient of Multivariate Polynomial Ring in x, y, z over Finite Field in a of size 3^2 by the ideal (y^4 - y^2*z^3 + z^6, x + y^2 + z^3)
</pre><p>
By consequence, it is now straight forward to convert polynomials or ideals to sage:
</p>
<pre class="wiki">sage: singular.eval('ring R = integer, (x,y,z),lp')
'// ** You are using coefficient rings which are not fields...'
sage: I = singular.ideal(['x^2','y*z','z+x'])
sage: I.sage() # indirect doctest
Ideal (x^2, y*z, x + z) of Multivariate Polynomial Ring in x, y, z over Integer Ring
# Note that conversion of a Singular string to a Sage string was missing
sage: singular('ringlist(basering)').sage()
[['integer'], ['x', 'y', 'z'], [['lp', (1, 1, 1)], ['C', (0)]], Ideal (0) of Multivariate Polynomial Ring in x, y, z over Integer Ring]
sage: singular.eval('ring r10 = (9,a), (x,y,z),lp')
'ring r10 = (9,a), (x,y,z),lp;'
sage: Q = singular('std(ideal(x^2,x+y^2+z^3))', type='qring')
sage: Q.sage()
Quotient of Multivariate Polynomial Ring in x, y, z over Finite Field in a of size 3^2 by the ideal (y^4 - y^2*z^3 + z^6, x + y^2 + z^3)
sage: singular('x^2+y').sage()
x^2 + y
sage: singular('x^2+y').sage().parent()
Quotient of Multivariate Polynomial Ring in x, y, z over Finite Field in a of size 3^2 by the ideal (y^4 - y^2*z^3 + z^6, x + y^2 + z^3)
</pre><hr />
<p>
Apply
</p>
<ol><li><a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_singular_sage_conversion.patch" title="Attachment 'trac11431_singular_sage_conversion.patch' in Ticket #11431">trac11431_singular_sage_conversion.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_singular_sage_conversion.patch" title="Download"></a>
</li><li><a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_singular_sage_documentation.patch" title="Attachment 'trac11431_singular_sage_documentation.patch' in Ticket #11431">trac11431_singular_sage_documentation.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_singular_sage_documentation.patch" title="Download"></a>
</li></ol><p>
to the Sage library.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/11431
Trac 1.1.6SimonKingMon, 06 Jun 2011 09:42:14 GMTstatus changed
https://trac.sagemath.org/ticket/11431#comment:1
https://trac.sagemath.org/ticket/11431#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
</ul>
<p>
Note to the reviewer: I did not check whether the doc strings look nice in html.
</p>
TicketSimonKingMon, 06 Jun 2011 11:22:35 GMTattachment set
https://trac.sagemath.org/ticket/11431
https://trac.sagemath.org/ticket/11431
<ul>
<li><strong>attachment</strong>
set to <em>trac11431_singular_sage_conversion.patch</em>
</li>
</ul>
<p>
Conversion Singular -> Sage
</p>
TicketSimonKingMon, 06 Jun 2011 11:40:34 GMT
https://trac.sagemath.org/ticket/11431#comment:2
https://trac.sagemath.org/ticket/11431#comment:2
<p>
So far, the method <code>sage()</code> has not been mentioned at all in the documentation of <code>sage.interfaces.singular</code>! Therefore I added a second patch, providing some use cases of <code>.sage()</code> in the short tutorial of <code>sage.interfaces.singular</code>.
</p>
<p>
The examples that are visible in the html version of the documentation still do not cover all features (quotient rings etc.), but I guess if a user knows about the existence of <code>sage()</code> (s)he will guess its correct usage.
</p>
TicketmalbTue, 07 Jun 2011 14:16:02 GMTstatus changed; reviewer set
https://trac.sagemath.org/ticket/11431#comment:3
https://trac.sagemath.org/ticket/11431#comment:3
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
<li><strong>reviewer</strong>
set to <em>Martin Albrecht</em>
</li>
</ul>
<ul><li>can we rename <code>sage_basering</code> to <code>sage_global_ring</code>. In Sage <code>base_ring</code> has a special meaning which is not meant in your patch. I think global ring captures it.
</li><li>don't real fields also have a precision in Singular?
</li><li>Previously, we enforced and assumed <code>not short</code>, but it's good you're taking it into account.
</li><li>Can you also fix "If it is provided, then you *must* take care OFF it."?
</li><li>shouldn't <code>TermOrder_from_Singular</code> be lower-case since it's a function? Or were you aiming for upper-case because it's a constructor?
</li><li>In "Invalid termorder in Singular" shouldn't it be term order, i.e. with a space?
</li></ul>
TicketSimonKingTue, 07 Jun 2011 18:37:35 GMT
https://trac.sagemath.org/ticket/11431#comment:4
https://trac.sagemath.org/ticket/11431#comment:4
<p>
Hi Martin!
</p>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:3" title="Comment 3">malb</a>:
</p>
<blockquote class="citation">
<ul><li>can we rename <code>sage_basering</code> to <code>sage_global_ring</code>. In Sage <code>base_ring</code> has a special meaning which is not meant in your patch. I think global ring captures it.
</li></ul></blockquote>
<p>
Sounds fine to me. Obviously I took the name <code>sage_basering</code> from Singular, but you are right that it might be confusing for people who know the notion <code>base ring</code> only from Sage.
</p>
<blockquote class="citation">
<ul><li>don't real fields also have a precision in Singular?
</li></ul></blockquote>
<p>
Right, that should be taken care of as well.
</p>
<blockquote class="citation">
<ul><li>Can you also fix "If it is provided, then you *must* take care OFF it."?
</li></ul></blockquote>
<p>
Why "off"? With two f?
</p>
<p>
Wouldn't it be correct English to say "If it is provided, then you must take care that it matches the current ring in Singular"? (i.e., I forgot the "that" in my patch)
</p>
<blockquote class="citation">
<ul><li>shouldn't <code>TermOrder_from_Singular</code> be lower-case since it's a function? Or were you aiming for upper-case because it's a constructor?
</li></ul></blockquote>
<p>
I made it upper case because it returns a <code>TermOrder</code> (that is how the class is called). But actually I was ignorant to the convention that functions are lower-case. So I'll change it.
</p>
<blockquote class="citation">
<ul><li>In "Invalid termorder in Singular" shouldn't it be term order, i.e. with a space?
</li></ul></blockquote>
<p>
Yep!
</p>
TicketSimonKingTue, 07 Jun 2011 18:40:14 GMT
https://trac.sagemath.org/ticket/11431#comment:5
https://trac.sagemath.org/ticket/11431#comment:5
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:4" title="Comment 4">SimonKing</a>:
</p>
<blockquote class="citation">
<p>
...
</p>
<blockquote class="citation">
<ul><li>Can you also fix "If it is provided, then you *must* take care OFF it."?
</li></ul></blockquote>
<p>
Why "off"? With two f?
</p>
<p>
Wouldn't it be correct English to say "If it is provided, then you must take care that it matches the current ring in Singular"? (i.e., I forgot the "that" in my patch)
</p>
</blockquote>
<p>
Perhaps not. But "If it is provided, then you have to make sure that it matches..." is fine, isn't it?
</p>
<blockquote class="citation">
<blockquote class="citation">
<ul><li>shouldn't <code>TermOrder_from_Singular</code> be lower-case since it's a function? Or were you aiming for upper-case because it's a constructor?
</li></ul></blockquote>
<p>
I made it upper case because it returns a <code>TermOrder</code> (that is how the class is called). But actually I was ignorant to the convention that functions are lower-case. So I'll change it.
</p>
<blockquote class="citation">
<ul><li>In "Invalid termorder in Singular" shouldn't it be term order, i.e. with a space?
</li></ul></blockquote>
<p>
Yep!
</p>
</blockquote>
TicketSimonKingWed, 08 Jun 2011 06:17:39 GMTattachment set
https://trac.sagemath.org/ticket/11431
https://trac.sagemath.org/ticket/11431
<ul>
<li><strong>attachment</strong>
set to <em>trac11431_singular_sage_documentation.patch</em>
</li>
</ul>
<p>
Show examples of .sage() to the singular interface tutorial. Fix some details of the previous patch.
</p>
TicketSimonKingWed, 08 Jun 2011 06:20:52 GMTstatus changed
https://trac.sagemath.org/ticket/11431#comment:6
https://trac.sagemath.org/ticket/11431#comment:6
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
<p>
I've put my changes into the second patch, so, please replace that when you test it.
</p>
<p>
<em>Names</em>: I changed <code>sage_basering</code> into <code>sage_global_ring</code> and <code>TermOrder_from_Singular</code> into <code>termorder_from_singular</code>.
</p>
<p>
<em>Precision</em>: Singular does not tell the precision of a real field in <code>charstr()</code>, it does so only for complex fields. But the precision both of real and complex fields is part of <code>ringlist()</code>. So, both in the real and the complex case, I take the precision from there, not from <code>charstr()</code>.
</p>
<p>
<em>Grammar</em>: It is now "Invalid term order" (not "termorder") and "If it is provided, then you have to make sure that it matches..." (not "If it is provided, then you *must* take care it matches...")
</p>
<p>
<em>Tests</em>: Of course I added a test showing that the precision of real fields is taken care of. And it turned out that one doctest needed a fix, because when I created it I used a different term order (so that the same polynomial was printed in a different way).
</p>
TicketmalbWed, 08 Jun 2011 09:32:03 GMTstatus changed
https://trac.sagemath.org/ticket/11431#comment:7
https://trac.sagemath.org/ticket/11431#comment:7
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<p>
I'll give this a positive review: I agree with Simon's fixes (and the patchbot can take care of any doctest failures etc.)
</p>
TicketSimonKingWed, 08 Jun 2011 10:16:53 GMT
https://trac.sagemath.org/ticket/11431#comment:8
https://trac.sagemath.org/ticket/11431#comment:8
<p>
Thank you! And the patchbot actually says that the doctests pass...
</p>
TicketjdemeyerThu, 09 Jun 2011 07:43:00 GMTstatus changed; resolution, merged set
https://trac.sagemath.org/ticket/11431#comment:9
https://trac.sagemath.org/ticket/11431#comment:9
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.7.1.alpha3</em>
</li>
</ul>
TicketjdemeyerTue, 14 Jun 2011 19:33:12 GMTstatus changed; resolution, merged deleted
https://trac.sagemath.org/ticket/11431#comment:10
https://trac.sagemath.org/ticket/11431#comment:10
<ul>
<li><strong>status</strong>
changed from <em>closed</em> to <em>new</em>
</li>
<li><strong>resolution</strong>
<em>fixed</em> deleted
</li>
<li><strong>merged</strong>
<em>sage-4.7.1.alpha3</em> deleted
</li>
</ul>
<p>
There are some issues on Solaris. On the "marks" and "t2" buildbots, I get the following error (identical on both systems):
</p>
<pre class="wiki">sage -t -long -force_lib devel/sage/sage/rings/polynomial/term_order.py
**********************************************************************
File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.1.alpha3/devel/sage-main/sage/rings/polynomial/term_order.py", line 1878:
sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
Exception raised:
Traceback (most recent call last):
File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.1.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.1.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.1.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_64[2]>", line 1, in <module>
singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')###line 1878:
sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.1.alpha3/local/lib/python/site-packages/sage/interfaces/singular.py", line 567, in eval
raise RuntimeError, 'Singular error:\n%s'%s
RuntimeError: Singular error:
? cannot open `gftables/9`
? cannot make ring
? error occurred in or before STDIN line 33: `ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp);`
? expected ring-expression. type 'help ring;'
**********************************************************************
File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.1.alpha3/devel/sage-main/sage/rings/polynomial/term_order.py", line 1881:
sage: termorder_from_singular(singular)
Expected:
Block term order with blocks:
(Matrix term order with matrix
[1 2]
[3 0],
Weighted degree reverse lexicographic term order with weights (2, 3),
Lexicographic term order of length 2)
Got:
Block term order with blocks:
(Lexicographic term order of length 3,
Degree lexicographic term order of length 5,
Lexicographic term order of length 2)
**********************************************************************
</pre>
TicketSimonKingWed, 15 Jun 2011 06:28:38 GMT
https://trac.sagemath.org/ticket/11431#comment:11
https://trac.sagemath.org/ticket/11431#comment:11
<p>
Hi Jeroen,
</p>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:10" title="Comment 10">jdemeyer</a>:
</p>
<blockquote class="citation">
<blockquote>
<p>
sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
</p>
</blockquote>
<p>
...
</p>
<blockquote>
<p>
<a class="missing wiki">RuntimeError?</a>: Singular error:
</p>
<blockquote>
<p>
? cannot open <code>gftables/9</code>
? cannot make ring
? error occurred in or before STDIN line 33: <code>ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp);</code>
? expected ring-expression. type 'help ring;'
</strong></p>
</blockquote>
</blockquote>
<p>
<strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong>
</p>
</blockquote>
<p>
That is very strange. I can not imagine that my patch introduced that bug: It changes the conversion from Singular to Sage, but it should not change Singular itself (and what you get in your example is an error from Singular, not from the interface).
</p>
<p>
Hence, I wonder whether my patch has <em>introduced</em> or <em>uncovered</em> that bug.
</p>
<p>
Can you test on marks and t2 with unpatched Sage whether the line
</p>
<pre class="wiki">sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
</pre><p>
fails?
</p>
TicketjdemeyerWed, 27 Jul 2011 13:55:17 GMTstatus changed
https://trac.sagemath.org/ticket/11431#comment:12
https://trac.sagemath.org/ticket/11431#comment:12
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_info</em>
</li>
</ul>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:11" title="Comment 11">SimonKing</a>:
</p>
<blockquote class="citation">
<p>
Can you test on marks and t2 with unpatched Sage whether the line
</p>
<pre class="wiki">sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
</pre><p>
fails?
</p>
</blockquote>
<p>
Unfortunately, I cannot. I am not able to compile Sage on marks and I do not have an account on t2.
</p>
TicketSimonKingWed, 03 Aug 2011 18:36:31 GMT
https://trac.sagemath.org/ticket/11431#comment:13
https://trac.sagemath.org/ticket/11431#comment:13
<p>
I was able to build sage-4.7.1.rc1 on mark (which is supposed to be identical with mark2). It turns out that the bug was not <em>introduced</em> but <em>revealed</em> by my patch.
</p>
<p>
With the freshly built Sage-on-mark, I get
</p>
<pre class="wiki">sage: singular.eval('ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp)')
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/home/simonking/SAGE/sage-4.7.1.rc1mark/<ipython console> in <module>()
/home/simonking/SAGE/sage-4.7.1.rc1mark/local/lib/python2.6/site-packages/sage/interfaces/singular.pyc in eval(self, x, allow_semicolon, strip, **kwds)
548
549 if s.find("error") != -1 or s.find("Segment fault") != -1:
--> 550 raise RuntimeError, 'Singular error:\n%s'%s
551
552 if get_verbose() > 0:
RuntimeError: Singular error:
? cannot open `gftables/9`
? cannot make ring
? error occurred in or before STDIN line 25: `ring r1 = (9,x),(a,b,c,d,e,f),(M((1,2,3,0)),wp(2,3),lp);`
? expected ring-expression. type 'help ring;'
</pre><p>
The question is: How shall we proceed? Removing that particular test would be a shame, since it shows that my patch can manage to parse pretty complicated stuff. Perhaps it is possible to simplify it, so that it is still complicated, but works on mark and t2.
</p>
<p>
In either case, I will report on sage-solaris, and probably will file a bug report to the Singular team as well.
</p>
TicketSimonKingWed, 03 Aug 2011 18:50:28 GMTupstream changed
https://trac.sagemath.org/ticket/11431#comment:14
https://trac.sagemath.org/ticket/11431#comment:14
<ul>
<li><strong>upstream</strong>
changed from <em>N/A</em> to <em>Reported upstream. Little or no feedback.</em>
</li>
</ul>
<p>
For the record: I reported the problem on the <a class="ext-link" href="http://www.singular.uni-kl.de:8002/trac/ticket/352"><span class="icon"></span>singular trac</a>.
</p>
TicketSimonKingWed, 03 Aug 2011 19:29:20 GMT
https://trac.sagemath.org/ticket/11431#comment:15
https://trac.sagemath.org/ticket/11431#comment:15
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:14" title="Comment 14">SimonKing</a>:
</p>
<blockquote class="citation">
<p>
For the record: I reported the problem on the <a class="ext-link" href="http://www.singular.uni-kl.de:8002/trac/ticket/352"><span class="icon"></span>singular trac</a>.
</p>
</blockquote>
<p>
... and I opened <a class="closed ticket" href="https://trac.sagemath.org/ticket/11645" title="defect: Singular does not find "gftables/9" on Solaris (closed: fixed)">#11645</a>.
</p>
TicketSimonKingSat, 06 Aug 2011 09:38:46 GMTwork_issues set
https://trac.sagemath.org/ticket/11431#comment:16
https://trac.sagemath.org/ticket/11431#comment:16
<ul>
<li><strong>work_issues</strong>
set to <em>Singular trouble on Solaris</em>
</li>
</ul>
<p>
As I have indicated on <a class="closed ticket" href="https://trac.sagemath.org/ticket/11645" title="defect: Singular does not find "gftables/9" on Solaris (closed: fixed)">#11645</a>, there is a potential work around for the missing gftables: If one has a polynomial ring over a finite non-prime field in Sage and converts it into Singular, then the missing gftable is created. Hence, one could ensure that the problematic doc test passes by repending that test with another one that converts a ring from Sage into Singular.
</p>
<p>
That would be a nasty work-around, but at least it would mean that my patch could be used.
</p>
TicketSimonKingSat, 06 Aug 2011 12:25:44 GMTattachment set
https://trac.sagemath.org/ticket/11431
https://trac.sagemath.org/ticket/11431
<ul>
<li><strong>attachment</strong>
set to <em>trac11431_solaris_workaround.patch</em>
</li>
</ul>
<p>
Work around a bug on Solaris revealed by the first patch
</p>
TicketSimonKingSat, 06 Aug 2011 12:30:07 GMTstatus, description, upstream changed; work_issues deleted
https://trac.sagemath.org/ticket/11431#comment:17
https://trac.sagemath.org/ticket/11431#comment:17
<ul>
<li><strong>status</strong>
changed from <em>needs_info</em> to <em>needs_review</em>
</li>
<li><strong>work_issues</strong>
<em>Singular trouble on Solaris</em> deleted
</li>
<li><strong>description</strong>
modified (<a href="/ticket/11431?action=diff&version=17">diff</a>)
</li>
<li><strong>upstream</strong>
changed from <em>Reported upstream. Little or no feedback.</em> to <em>None of the above - read trac for reasoning.</em>
</li>
</ul>
<p>
I provided a third patch that uses - as a workaround - the fact that libsingular is able to create missing gftables files.
</p>
<p>
On Singular trac, Hannes said "No, gftables are parts of the sources and will be copied during installation, but usually not computed (the program for that, a part of factory, will not be build during a standard compilation and installation).
</p>
<p>
So, I wonder why the files aren't copied on Solaris and how libsingular is able to create them. But I think the third patch (that isn't tested, yet) should suffice to make the doc tests of the first two patches work on solaris.
</p>
<p>
Back to "needs review" - I hope that someone can doctest on Solaris.
</p>
TicketSimonKingWed, 10 Aug 2011 16:54:25 GMT
https://trac.sagemath.org/ticket/11431#comment:18
https://trac.sagemath.org/ticket/11431#comment:18
<p>
Note that <a class="closed ticket" href="https://trac.sagemath.org/ticket/11645" title="defect: Singular does not find "gftables/9" on Solaris (closed: fixed)">#11645</a> also fixes the problem with the new doc test.
</p>
<p>
So, if someone would like to review my patches, I see two ways to make things work:
</p>
<p>
Either
</p>
<ol><li>get <a class="closed ticket" href="https://trac.sagemath.org/ticket/11645" title="defect: Singular does not find "gftables/9" on Solaris (closed: fixed)">#11645</a> and <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_singular_sage_conversion.patch" title="Attachment 'trac11431_singular_sage_conversion.patch' in Ticket #11431">trac11431_singular_sage_conversion.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_singular_sage_conversion.patch" title="Download"></a> and <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_singular_sage_documentation.patch" title="Attachment 'trac11431_singular_sage_documentation.patch' in Ticket #11431">trac11431_singular_sage_documentation.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_singular_sage_documentation.patch" title="Download"></a>
</li></ol><p>
or
</p>
<ol start="2"><li>get <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_singular_sage_conversion.patch" title="Attachment 'trac11431_singular_sage_conversion.patch' in Ticket #11431">trac11431_singular_sage_conversion.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_singular_sage_conversion.patch" title="Download"></a>, <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_singular_sage_documentation.patch" title="Attachment 'trac11431_singular_sage_documentation.patch' in Ticket #11431">trac11431_singular_sage_documentation.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_singular_sage_documentation.patch" title="Download"></a> and <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/11431/trac11431_solaris_workaround.patch" title="Attachment 'trac11431_solaris_workaround.patch' in Ticket #11431">trac11431_solaris_workaround.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/11431/trac11431_solaris_workaround.patch" title="Download"></a>.
</li></ol>
TicketjdemeyerMon, 22 Aug 2011 09:59:16 GMTdependencies changed
https://trac.sagemath.org/ticket/11431#comment:19
https://trac.sagemath.org/ticket/11431#comment:19
<ul>
<li><strong>dependencies</strong>
changed from <em>#11316</em> to <em>#11316, #11645</em>
</li>
</ul>
<p>
What's the status of this ticket now? Since <a class="closed ticket" href="https://trac.sagemath.org/ticket/11645" title="defect: Singular does not find "gftables/9" on Solaris (closed: fixed)">#11645</a> has been merged in sage-4.7.1, we can assume that as prerequisite. Which patches should be applied then?
</p>
<p>
If somebody can give these patches a "tentative positive review" (without testing on Solaris), I can test them on the buildbot machines, including Solaris.
</p>
TicketjdemeyerMon, 22 Aug 2011 10:05:46 GMT
https://trac.sagemath.org/ticket/11431#comment:20
https://trac.sagemath.org/ticket/11431#comment:20
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:19" title="Comment 19">jdemeyer</a>:
</p>
<blockquote class="citation">
<p>
If somebody can give these patches a "tentative positive review" (without testing on Solaris), I can test them on the buildbot machines, including Solaris.
</p>
</blockquote>
<p>
To the reviewer: if you do give such a "tentative positive review", you can set the status to "positive review" (even if it has not been tested properly).
</p>
TicketmalbMon, 22 Aug 2011 18:12:06 GMT
https://trac.sagemath.org/ticket/11431#comment:21
https://trac.sagemath.org/ticket/11431#comment:21
<p>
Simon, can you rebase your patches to 4.7.1?
</p>
TicketSimonKingTue, 23 Aug 2011 18:48:01 GMT
https://trac.sagemath.org/ticket/11431#comment:22
https://trac.sagemath.org/ticket/11431#comment:22
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:21" title="Comment 21">malb</a>:
</p>
<blockquote class="citation">
<p>
Simon, can you rebase your patches to 4.7.1?
</p>
</blockquote>
<p>
Since <a class="closed ticket" href="https://trac.sagemath.org/ticket/11645" title="defect: Singular does not find "gftables/9" on Solaris (closed: fixed)">#11645</a> got fixed, I have only applied the first two patches, to sage-4.7.2.alpha1. They applied without fuzz. Why is it needed to rebase them?
</p>
TicketmalbTue, 23 Aug 2011 19:01:49 GMT
https://trac.sagemath.org/ticket/11431#comment:23
https://trac.sagemath.org/ticket/11431#comment:23
<p>
Hi, I get this:
</p>
<pre class="wiki">SAGE_ROOT=/mnt/usb1/scratch/malb/sage-4.7.2.alpha0
(sage subshell) sage:sage malb$ hg qimport http://trac.sagemath.org/sage_trac/raw-attachment/ticket/11431/trac11431_singular_sage_conversion.patch && hg qpush
adding trac11431_singular_sage_conversion.patch to series file
applying trac11431_singular_sage_conversion.patch
patching file sage/rings/polynomial/term_order.py
Hunk #1 FAILED at 1857
1 out of 1 hunks FAILED -- saving rejects to file sage/rings/polynomial/term_order.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh trac11431_singular_sage_conversion.patch
SAGE_ROOT=/mnt/usb1/scratch/malb/sage-4.7.2.alpha0
</pre>
TicketSimonKingTue, 23 Aug 2011 19:12:52 GMT
https://trac.sagemath.org/ticket/11431#comment:24
https://trac.sagemath.org/ticket/11431#comment:24
<p>
Hi Martin,
</p>
<p>
you forgot the other dependency: <a class="closed ticket" href="https://trac.sagemath.org/ticket/11316" title="enhancement: Weighted degree term orders added (closed: fixed)">#11316</a> was only merged in sage-4.7.2.alpha1, but you started with alpha0.
</p>
TicketmalbTue, 23 Aug 2011 19:56:35 GMT
https://trac.sagemath.org/ticket/11431#comment:25
https://trac.sagemath.org/ticket/11431#comment:25
<p>
Right, now it applies!
</p>
TicketmalbTue, 23 Aug 2011 21:01:24 GMTstatus changed
https://trac.sagemath.org/ticket/11431#comment:26
https://trac.sagemath.org/ticket/11431#comment:26
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<p>
applies & doctests pass. I read the patch a while ago so positive review it is.
</p>
TicketleifThu, 08 Sep 2011 15:32:13 GMTdescription changed
https://trac.sagemath.org/ticket/11431#comment:27
https://trac.sagemath.org/ticket/11431#comment:27
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/11431?action=diff&version=27">diff</a>)
</li>
</ul>
<p>
Simon, are you ok with dropping the (IMHO obsolete) Solaris patch?
</p>
TicketSimonKingThu, 08 Sep 2011 17:19:10 GMT
https://trac.sagemath.org/ticket/11431#comment:28
https://trac.sagemath.org/ticket/11431#comment:28
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11431#comment:27" title="Comment 27">leif</a>:
</p>
<blockquote class="citation">
<p>
Simon, are you ok with dropping the (IMHO obsolete) Solaris patch?
</p>
</blockquote>
<p>
Yes, it can be dropped, since that problem has been successfully dealt with on a different ticket.
</p>
TicketleifMon, 12 Sep 2011 12:48:02 GMTdependencies changed
https://trac.sagemath.org/ticket/11431#comment:29
https://trac.sagemath.org/ticket/11431#comment:29
<ul>
<li><strong>dependencies</strong>
changed from <em>#11316, #11645</em> to <em>#11316 #11645</em>
</li>
</ul>
TicketleifMon, 12 Sep 2011 19:27:57 GMTstatus changed; resolution, merged set
https://trac.sagemath.org/ticket/11431#comment:30
https://trac.sagemath.org/ticket/11431#comment:30
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.7.2.alpha3</em>
</li>
</ul>
Ticket