## page was renamed from bug03 ## page was renamed from bug3 = SAGE Bug Squash Day 3 = The event will take place on '''THURSDAY September 20th, 2007''' and officially start at 10 am pacific standard time. It will go on for 12 hours (until 10pm) and some people will usually meet the day after and finish up some of the leftovers. Remember the "Twisted Rule" -- Don't work on '''anything''' unless there is a trac ticket for it. The results: http://trac.sagemath.org/sage_trac/milestone/sage-2.8.5 * [[bug3/status| STATUS]] * [[bug3/irc| IRC log]] * [[bug3/Results| Results]] * The base version of SAGE we'll start with is here: sage-2.8.4.2.1, which you can upgrade to using "sage -upgrade" * The trac server with all the bugs is here: http://trac.sagemath.org * We will focus on the bugs listed here: TBA However, people with other interests can of course help out with fixing anything they want. * Write to wstein@gmail.com for an account on the bug tracker. * We'll all be on #sage-devel at irc.freenode.net. {{{ From Linux you can chat via a text console by installing "irssi", running it, and typing /SERVER add irc.freenode.net /SERVER irc.freenode.net /join #sage-devel }}} = Participants (with area they would like to work on) = 1. Michael Abshoff: Solaris port, Memleaks 1. Martin Albrecht: memleaks & maybe libSINGULAR enhancements 1. Nick Alexander (until 3pm). 1. Robert Bradshaw: 1. Timothy Clemans (evening maybe): Notebook bugs 1. Didier Deshommes: opensolaris (x86) port 1. Burcin Erocal: memleaks 1. Mike Hansen: combinatorics stuff, python-nose, misc. bug fixes. 1. Robert Miller: reproducing dsage bug 1. Bobby Moretti (after 5pm). 1. William Stein (10am -- 10pm): Integrating all the fixes as they come in, then releasing a new Sage version. 1. Tom Boothby (10am -- 5pm; 6pm -- 10pm): AbelianGroup 1. David Harvey: yeah bugs and stuff [[attachment:bugs.jpg|{{attachment:bugs.jpg}}]] = IRC = BUG3 irc log: [10:08] pulling from /Users/ncalexan/sage/spkg/build/sage-2.8.4.2 [10:08] searching for changes [10:08] adding changesets [10:08] adding manifests [10:08] adding file changes [10:08] added 592 changesets with 1040 changes to 321 files [10:09] (run 'hg update' to get a working copy) [10:09] abort: there is nothing to merge, just use 'hg update' or look at 'hg heads' [10:09] nothing changed [10:09] remote changed .hgtags which local deleted [10:09] (k)eep or (d)elete? k [10:09] ok, so it isn't leaking. [10:09] remote changed export which local deleted [10:09] (k)eep or (d)elete? k [10:09] 288 files updated, 0 files merged, 7 files removed, 0 files unresolved [10:09] Any ideas? [10:09] (While sage -upgrade was running) [10:09] so? [10:10] sage: b = a.__copy__() [10:10] sage: get_memory_usage() - s [10:10] 1.57421875 [10:10] sage: b = a.__copy__() [10:10] sage: get_memory_usage() - s [10:10] 1.98828125 [10:10] sage: b = a.__copy__() [10:10] sage: get_memory_usage() - s [10:10] 1.83203125 [10:10] oh, so copy is ok. sorry I'm a little slow getting started here, and saying dumb things. [10:11] burcin: [10:11] sage: s = get_memory_usage(); a = M.zero_matrix(); del a; get_memory_usage() - s [10:11] 0.0 [10:11] sage: s = get_memory_usage(); a = M.zero_matrix(); del a; get_memory_usage() - s [10:11] 0.0 [10:11] So there is no leak here. Move along. [10:11] *** mabshoff_ is now known as mabshoff|Cooking. [10:11] Anyway, could people introduce themselves quickly, say where they are, etc. [10:11] I don't assign to any object.. and it keeps increasing.. [10:12] That could be IPython caching output. [10:12] * ncalexan is Nick Alexander, in Irvine, California. [10:12] * mhansen is Mike Hansen in Madison, Wisconsin, U.S. [10:12] in fact it is: [10:12] sage: M.zero_matrix() [10:12] 500 x 500 dense matrix over Integer Ring [10:12] sage: _ [10:12] 500 x 500 dense matrix over Integer Ring [10:13] The last few outputs are cached... [10:13] burcin erocal, linz, austria [10:13] can we turn that off somehow? [10:13] william_stein: actually a lot more than the last few are cached. [10:13] burcin: yes, it can be configured. [10:13] burcin -- yes -- see ipythonrc in .sage [10:13] yes.. I think all are cached.. [10:13] /me is Martin Albrecht, London, UK [10:13] I'm william stein in Seattle, WA [10:14] who is boothby? [10:14] and where is he? [10:14] I'm boothby. [10:14] Right here. [10:14] jkantor is josh kantor, usually seattle, WA but currently on vacation in buffalo, NY. [10:15] Okfine, I'm Tom Boothby, in Seattle [10:15] OK, so the rules are (1) don't work on anything that isn't a trac ticket; (2) try to prefix lines with the trac #. [10:15] The goal is to fix as many bugs in Sage as possible today. [10:15] Michael Abshoff in Dortmund, Germany. [10:16] as bugs get fixed, I'll upload the fixes to the official hg repo, and people can hg_sage.pull() them... [10:16] Could we have a trac triage page again? That was fantastic. [10:17] Well, there are a bunch of patches qued at the 2.8.4.3 milestone. [10:17] And I think it would be great if mhansen's combinatorics patch could go in early. [10:17] *** mabshoff|Cooking is now known as mabshoff_. [10:17] Last time I checked it wasn't in trac (yet) [10:17] does the upgrade work correctly for you? [10:18] I haven't finished upgrading yet. [10:18] : No module named sage.misc.preparser_ipython [10:18] WARNING: Failure executing code: 'import sage.misc.preparser_ipython; sage.misc.preparser_ipython.magma_colon_equals=True' [10:18] --> roed_ has joined this channel (n=roed@MACLAURIN-SIXTEEN-NINETY-FOUR.MIT.EDU). [10:18] (Jan Willemson, Tartu, Estonia, but I will probably mostly be rather quiet:)) [10:18] Did "sage -br" fail for you. [10:18] mabshoff: #630. I didn't have time to finish it last night, but that's what I'll work on first. [10:18] Hi Jan, I don't recognize you from the list. Welcome! [10:19] the upgrade failed for me. not good. [10:19] i rushed this release. [10:19] and made it while on the linbox call. [10:19] sorry [10:19] hold on. [10:19] Don't worry -- this will focus the bug day like nothing else. [10:19] problem is flint. [10:20] should I disable it or fix that it isn't installed correctly? [10:20] Hi ... I actually have a SAGE issue that really bothers me, but that is documented only in the devel mailing list and is not a trac ticket (yet), so probably it is out of the focus today anyway [10:21] ah, maybe it isn't in the makefile. [10:21] janwil -- put it in trac. [10:21] janwil: do you have a trac account? [10:21] no [10:21] ok, I fixed the upgrade problem almost... not quite. [10:21] janwil: if it's easy to describe, message me and I will add it to trac. William might be a few minutes adding your account. [10:22] Actually, just use mine: [10:22] Hmm... perhaps not. [10:22] well, it's not easy to describe :( [10:22] :( [10:22] janwil -- email me with your requested login and low-quality password for fun. [10:22] I think janwil's issue is in trac with a patch by malb. [10:22] ah [10:23] well, that patch did not help the main issue I had [10:23] the maxima vs. your Linux distro issue, checking for th e number. [10:23] I will be looking at #445 this bothers me quite a lot, I'm not sure how far I'll get though [10:23] The script issue? That is also in trac. [10:23] oh, with the long script? [10:24] I think #445 is more or less a pexpect and Signal delivery issue. [10:24] We might need to modify it to just send SIGKILL [10:25] But I might be completely wrong :) [10:25] janwil: can you find the issues you have in trac? [10:25] I think #507 is one of them. [10:26] mabshoff_ / #445: yes something along the line of that [10:26] Do "sage -upgrade" then "sage -br". [10:26] #507 is a simple case .. I also have a problem that is reproducible in 4 cases out of 5 [10:26] Well, in the end we need to write a proper pexpect replacemnt anyway. [10:27] ok, I will try to put it to trac [10:27] janwil: could you build a Arch Linux vmware image? That way we could test on it regulary. [10:27] and this 4 out of 5 occurs on Ubuntu [10:28] William/700 where should the doctests for cvxopt and scipy go ? [10:28] Hi everybody -- I fixed the upgrade issue. If you just do "sage -upgrade" again then "sage -br" you'll be good. [10:28] okay, post the issues, hopefully someone will be able to reproduce them. [10:28] :) [10:28] jkantor -- good question. [10:28] In a file somewhere. [10:28] william_stein: is your gmail account ok to use for trac username application? [10:28] janwil -- yes. [10:29] jkantor -- I think there should be a SAGE_ROOT/devel/sage/sage/numerical directory [10:29] while you are at it: can you change my trac password to something less obvious and send me the updated password? [10:29] I was about to say that [10:29] Inside there you could put a .py file with a big triple quoted string that has tests of numpy, scipy, cvxopt, etc. [10:30] ok [10:31] #445 -- I'll work on that too right now. [10:31] I think it will be easy to fix. [10:31] jkantor: could I suggest you define somewhat relevant method names rather than one big string? In future, the testing interface will probably provide detailed feedback about what method the test was in. [10:32] We're not testing methods. [10:32] We're just testing that two libraries were actually installed. [10:32] The thing is that cvxopt and scipy like to silently pretend to be installed, but with most of their functionality [10:32] willam_stein: ok, sent it from my gmail account, so it should be delivered quite fast [10:32] gone if something goes slightly wrong when building. [10:32] :) [10:32] #445 -- has anybody replicated it? [10:33] jkantor -- make a trac ticket for what you're doing, so we will get one more extra point when you finish it :-) [10:33] hi, i'm david harvey, cambridge MA.... ten minutes walk away from the next sage days [10:34] I replicate this on a daily basis with SINGULAR [10:34] william_stein: in that case, shouldn't the doctests be testing that the missing functionality really is there? [10:34] that was about #445 [10:34] Most of the problems are missing symbols on importing modules [10:34] So if there is no exception, the functionality is there [10:34] <-- roed_ has left this server (Read error: 110 (Connection timed out)). [10:35] i'm starting with #635, which should be straightforward I hope [10:36] robert miller just showed up (in my office) [10:36] #635 -- good [10:39] #445 -- I just replicated with this input. It's evil. [10:39] R=QQ['x'] [10:39] f = R.random_element(5000) [10:39] g = magma(f) [10:39] g.IsIrreducible() [10:40] --> millster has joined this channel (n=robert@mdhcp175.math.washington.edu). [10:40] Important not on #445 -- it *only* happens in the notebook. [10:40] #445 I calculate GBs on a daily basis, equally evil [10:40] #445 -- malb -- do you agree? [10:40] really? [10:41] let me check [10:41] Yes. The same example pasted above works fine in the console. [10:41] hang on, need to rebuild SAGE (connection to sage.math is very slow) [10:41] ok [10:43] #445 -- probably the notebook is so agressively interrupting the sage process that is running magma, [10:43] that it interrupts it in the middle of actually killing the running magma. [10:43] It's two levels of pexpect going on. [10:44] so we should send a command first (kill-your-children) and interrupt then? [10:44] definitely not. [10:44] In fact that magma process shouldn't even get killed. [10:44] It should just get interrupted. [10:45] We should probably just send 1 interrupt signal from the notebook server to the Python process. [10:45] I.e., one "control C". [10:45] Let me look at the code. [10:45] line 1328 of server/notebook/worksheet.py [10:45] right now 3 ctrl-c's are sent when you hit escape or click "interrupt" in the notebook. [10:45] I'll try changing to 1. [10:46] okay, still building [10:47] Sorry, I was gone, but should be do any upgrade from 2.8.4.2 or is there another tarball? [10:48] #445 that workec well [10:49] good, my Singular problem seems unrelated then [10:50] P = PolynomialRing(QQ,10,'x') [10:50] I = sage.rings.ideal.Katsura(P) [10:50] I.groebner_basis() # forever! [10:50] Ctrl-C [10:50] from the command line [10:51] what function handles signals? [10:52] It's just keyboardinterrupt being handled in expect.py or possible singular.py [10:52] william/709 To be doctested the file just needs to be in the source tree, i don't need an all.py to import it or anything right? [10:52] yes. [10:52] #709 -- yes [10:55] #445 -- expect.py: interupt(...) is very relevant to what happens after ctrl-c is received... [10:55] I think. [10:56] william_stein: did you get my email? [10:56] Hmm, clisp.pdf missing stops the build. [10:56] janwil -- yep. [10:56] ncalexan you've had that problem before, no? [10:56] you have a weird setup of pdf tools. check sage-devel. [10:57] Yes... oh, thanks for the reminder. [10:57] That problem is related to some missing tool [10:57] #445 I got it [10:57] janwil -- you should have a trac account. [10:57] My "fix" for #445 breaks other things, so not good. [10:57] Weird. [10:58] ncalexan: You had the same problem at http://groups.google.com/group/sage-devel/browse_thread/thread/af701e5f8d428ad2 [10:58] williamstein: thanx, I have it now ... will try to create a ticket [10:58] thankx. [10:59] you need to fix your dvipdf :) [10:59] I do, but there's actually a hairy problem in the middle (with fink and X11) that I don't want to fix :) [10:59] but maybe now is the time. [10:59] interstingly the second google hit for "clisp.pdf missing" :) [11:00] #445 I figured out my problem with Singular, Singular has a signal handler which asks what to do [11:01] One wonders what the first hit is :) [11:01] http://www.google.de/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fftp6.tw.freebsd.org%2FFreeBSD%2Fdevelopment%2FFreeBSD-CVS%2Fports%2Flang%2Fclisp%2Fpkg-plist%2Cv&ei=MrXyRv2OPI38nQP7lvnDDg&usg=AFQjCNHZRGUz_mjLv8ZnyL2s5uJAjAp66w&sig2=omEH8PW3FYRcm7xemWq7Tw :) [11:01] But I thing that varies depending on which country you google from :) [11:02] #635: not only did chris wuthrich change the precision in the doctests, he changed all the answers too. I have no idea what to make of all this. [11:02] #445 -- malb -- could you post an example that illustrates your porlbme at singular GB's? [11:02] the one I posted earlier: [11:02] P = PolynomialRing(QQ,10,'x') [11:03] I = sage.rings.ideal.Katsura(P) [11:05] I am off for the next hours or so, commuting home. [11:05] cu in a bit [11:05] cu [11:05] <-- mabshoff_ has left this server (Read error: 104 (Connection reset by peer)). [11:06] wstein: #635, it's very strange. I'm looking at a diff where chris changed the normalisation by 2p, which is what we had agreed, but I'm sure I also did the same thing! So I guess you probably never merged in my changes. [11:06] sorry. [11:08] that's okay. It's hard working on code like this where various people have different goals. Like chris probably doesn't care too much about whether the last digit is there or not; but when I'm playing with large primes, the last digit takes a lot of extra time! [11:08] #445 -- i just checked in a change that fixes the problem in the notebook. [11:08] I found another related bug while I was at it, that I'll pos. [11:10] good, I am still playing with Singular's special treatment [11:10] malb -- check out http://trac.sagemath.org/sage_trac/ticket/710 [11:11] sage: n=factor(2^997-1) # then hit control C [11:11] then do [11:11] ouch [11:11] sage: gp.eval('factor(2^997-1)') # then hit control C [11:11] and boom!! [11:11] how can those two be related? [11:11] and it happens with any interface -- not just gp. [11:12] somehow the pari signal handling if seriously foobaring something about the state of Sage. [11:13] mhh, can you Ctrl-C twice for factor(2^997-1)? [11:14] for me factor(2^997-1) with 1 control-c immediately interrupts. [11:14] #710: on os x interrupting gp.eval('factor(2^997-1)') then fails [11:14] #710: on linux 64-bit it seg faults. [11:15] I'm going to close #445, since that's now fixed. [11:15] But we need a ticket for your katsura example. I'll try to replicate it and if so, open a ticket. [11:15] okay [11:15] should I include the script as a snippet in the ticket or should I attach it as a file? [11:15] Your choice. If a snippet, use {{{ and .[11:16] yes, I did use them, thanx [11:16] malb -- replicated. [11:16] Your bug will be easy to fix, I think. [11:17] #711 -- malb, your bug is now 711. [11:17] #445 is now fixed (unless people claim differently). [11:17] brb. [11:19] ok, submitted -- #712 (the reference to the component is probably wrong -- please excuse me) [11:23] janwil -- is it possible that your problem is a bug in maxima itself? [11:24] when I try your system it fails right off. [11:27] #712 -- ok, I'm working on this now. [11:28] it's a bug in maxima. [11:28] it's outputing "CAR: 2 is not a list" and dieing. [11:29] janwil -- we should make a clean file that inputs something into Maxima (not involving sage) and [11:29] produces that error, and report it on the maxima list. [11:29] william_stein: See #713 (the Singular interface bug with patch) [11:30] that's no fix. [11:30] #713 -- rejected. [11:30] We should never ever leave a process running that a user has to kill manually. [11:30] why? [11:30] No matter what. [11:30] i.e. Ctrl-D is not an option? [11:31] No. But the print "WARNING: -- unable to kill %s. You may have to do so manually."%self [11:31] i don't like. [11:31] thats just copied from expect.py [11:31] I didn't write that [11:31] In that case, shouldn't we kill -9 the sucker or something and make sure it didn't work. [11:31] Ok, well then I reject the code I wrote :-) [11:31] better :-) [11:32] Who wrote it? [11:32] me. [11:33] well that should still be replaced by kill -9. [11:33] new ticket. [11:33] okay, will do [11:33] i'm making the ticket now. [11:34] #714 -- that kill -9 thing. [11:34] I'll apply your #713 now [11:41] #709-is done, (together with the fix for 700 so the doctests actually pass) [11:42] william_stein: where is the bug triage list? [11:42] Or the correct trac view? [11:42] ncalexan: http://trac.sagemath.org/sage_trac/milestone/sage-2.8.4.3 [11:42] Thanks. [11:43] Our goal is basically to deal everything marked for 2.8.4.3. [11:43] Also, look a lot at the 2.9 bugs. [11:43] there isn't much of a handwritten page yet though. [11:43] volunteer to make one?? [11:43] (I'm not sure it is needed.) [11:44] wstein, #714 close(force=1) already sends a SIGKILL [11:44] so this exception actually should never happen [11:45] How about in the exception check for the process first and if it is still there send more kills? [11:45] Or is this getting overly paranoid, given that when sage quits it will *definitely* kill the process. [11:45] (the zombie killed) sage-cleaner. [11:45] I just replicated janwil's bug entirely in maxima. [11:45] I would suggest: propagate the exception up and wait for bugreports [11:46] this way we have something to replicate [11:46] #712 -- It has absolutely nothing whatever to do with Sage or the pexpect interface [11:46] And for me it isn't sporadic. [11:46] malb -- good idea! [11:46] That's fine by me. [11:46] okay, will attach patch to #714 [11:46] Please add to the exception: "THIS IS A BUG -- PLEASE REPORT. This should never happen." [11:47] okay [11:50] #712 -- I'm done working on http://trac.sagemath.org/sage_trac/ticket/712 [11:50] #712 Janwil, I hope you can report this bug to the maxima list. [11:51] I think if you just provide the input file I attached there -- which should make it easy for anybody [11:51] to replicate the problem, then you'll have a chance. [11:51] william_stein: thanx for your work! yes, I can report this as a Maxima problem [11:52] * ncalexan is working on 228, a small notebook bug to do with the preparser. [11:53] ncalexan -- thanks!! [11:53] #228 -- That's a long open bug that needs to be fixed. [11:54] Ralph Greenberg just dropped by my office. He wants us to fix some bugs in his house... [11:54] #713: closed. [11:55] --> robertwb has joined this channel (n=robert@D-69-91-158-249.dhcp4.washington.edu). [11:57] malb -- I'm looking at #507 (which you fixed) [12:00] good, also I've attached a patch to #714 [12:01] --> roed_ has joined this channel (n=roed@RANDOM-FOUR-SEVENTY-FIVE.MIT.EDU). [12:02] hi david roed_ [12:03] hey [12:03] #714: closed. [12:04] cool. Did anyone have suggestions on the design? [12:04] william_stein: I do not quite understand the maxima_bug that you uploaded ... solve(sage3, sage7); refers to sage3, but that is not defined ... am I reading something wrong? [12:05] I forgot to put it in the script. [12:05] Hold on. [12:06] roed: design of what? [12:06] sage3 : [sage0,sage1,sage2] [12:07] ok, that makes sense :) and sage9 and sage10 are not actually needed? [12:07] now the bug doesn't happen for me. Drat. [12:07] what the heck. [12:08] ok, so you were able to reproduce my sometimes-bug-sometimes-not behavior? [12:08] now I am, which sucks. [12:08] well, that was really annoying when I stepped onto it, too [12:09] I was already ready to blame some race conditions or timing or something like that [12:09] dmharvey: I wrote a way to globally control default proof behavior last night [12:10] http://trac.sagemath.org/sage_trac/ticket/704 [12:12] janwil -- bug #712 -- please try loading the file j attached to #712. [12:12] (%i1) batchload("/home/was/tmp/j"); [12:12] Maxima encountered a Lisp error: [12:12] roed: also would be nice to have global spelling="british" to prevent ugliness like "behavior" :-) [12:12] every time. [12:12] :-) [12:13] #704 -- proof stuff -- I'm putting that in Sage now. [12:14] dmharvey: lol. There are plenty of other global settings that one might want to control. I'll stick to proof=True/False for now [12:14] roed_: EXAMPLES are supposed to be indented 4 spaces. [12:14] EXAMPLES: [12:14] [4 spaces]sage: input [12:15] [4 spaces]output [12:16] ok [12:17] william_stein: maxima -b j gives something different for me ... [12:18] Inconsistent equations: (2 3) [12:18] -- an error. Quitting. To debug this try debugmode(true); [12:18] Cool. [12:19] well, I did not use SAGEs maxima, but Ubuntu's ... [12:19] ah. [12:19] Try sage's: "sage -maxima". [12:19] It could be a new bug in maxima and sage's maxima is newer. [12:20] ok, now I get CAR: 2 is not a list [12:21] so this "inconsistent equations" shouldn't be happening either? [12:21] janwil -- i don't know. [12:21] dmharvey: do you know if Sage currently includes ZZ_pEX? [12:21] ok :) [12:22] But "CAR: 2 is not a list" is definitely a Maximma bug, since that's a lisp error, and maxima [12:22] should never produce a lisp error. [12:22] roed: I don't believe it does [12:22] roed_ -- did you do "make test" or "sage -testall" after making your proof patch? [12:22] ok, I will try to put together a bug report for maxima [12:22] janwil -- thanks. [12:23] grep -R "ZZ_pEX" * -- nope [12:23] william_stein: I had that remaining issue with sage/rings/morphism.py that was different between sage -t and grep "sage: [12:23] " morphism.py | sage [12:25] ok. [12:25] But I'm running a make test now [12:25] We'll see if it's still there. [12:25] I want to put robert miller's [a..b] patch in. [12:25] Any objections :-) ? [12:26] oops -- robert bradshaw. [12:26] roed -- I'll work on that morphism.py thing as I've applied your patch now. [12:27] sage -t morphism.py [12:27] works fine form me. [12:29] good [12:29] :-) [12:32] --> grout has joined this channel (n=grout@good.math.iastate.edu). [12:32] hi jason. Welcome to SAGE! [12:32] thanks! [12:33] hi jason, i'm writing an answer to your questions on google groups [12:33] the one about the mercurial error? [12:33] aye [12:33] #635: I'm basically done with this, I'm just running ./sage -t -long on sage.math now [12:36] I'm going to continue working on #528 now. This will probably be a few hours work I imagine. [12:37] --> mabshoff_ has joined this channel (n=mabshoff@p5090C126.dip.t-dialin.net). [12:37] Hey, looks pretty busy now. [12:39] does sage -t -long time out after five minutes for a whole file? [12:40] I am not sure, but I think there is a bug in the timeout code when python just "spins" [12:41] probably. [12:41] After you interrupt it (way past 180 seconds) it then tells you that it timed out after [12:41] you send the CRTL-C [12:41] I have seen that behavior with the lazy rings on Solaris 9 [12:41] because it looks like sage -t -long is giving up on ell_rational_field.py after 294.6 seconds, with *** *** Error: TIMED OUT! *** *** [12:42] dmharvey: oops. [12:42] It's probably a bug. [12:42] (there is a bug or miscompilations happening there9 [12:42] dmharvey: I'll fix that. [12:42] it is a bug. [12:42] Some of the regular doctests with elliptic curves come close to the 3 minute timeout on [12:42] on neron by the way [12:43] or a mistake in design. [12:43] mabshoff_ -- ell_rational_field.py *desparately* needs to be broken into smaller files. [12:43] I guess it is ticket time then. [12:44] I will write some summary of the LinBox teleconference first, though. [12:44] And post it to LinBox devel. [12:44] wstein: how do you break a file into pieces when it's all one class? [12:46] dmharvey -- you make it into multiple classes. [12:46] I'd like to work on ell_rational_field.py [12:46] roed: just hang on a few minutes at least..... I'm touching bits of that file now [12:46] because we need a new class for elliptic curves over number fields [12:46] E.g., instead of E.L[tab] giving all kinds of l-series crap, one should instead maybe have [12:46] a class for "L-series of an elliptic curve", then all code related to L-series goes in that file. [12:48] william_stein: your last j script was missing references to sage1 and sage2 ... when I added those from the Maxima_bug script, I got a script that worked fine for me every time both in SAGE's Maxima and in Ubuntu's one [12:49] hmm. [12:49] interesting. [12:50] well, Maxima should probably never throw a lisp bug, but this still means we have not cracked #712 ... or? [12:50] I was looking into #325 which involves NTL, it doesn't make sense to touch it now, doesn't because of the NTL break-up? [12:53] william_stein: please do that L-series refactoring, it's badly needed. [12:54] well shite. Now when I run sage -t -long on my modified ell_rational_curve.py, it segfaults. It wasn't doing that five minutes ago. [12:54] ncalexan: volunteers are needed :-) [12:54] malb_- the new ntl is I think ready to be tested and included in sage. [12:55] Check it out. [12:55] Okay, I'm almost finished this bug, so maybe I'll look at that next. [12:55] #697. [12:55] ncalexan: wait till I've put in #635, it's almost done, it touches ell_rational_field.py [12:55] #697 -- ntl -- malb, want to referee it :-) [12:55] okay, applying the NTL and trying #325 then [12:55] Okay, dmharvey, please ping me and send me the bundle/post it on sage.math. [12:57] malb: I'll be working on top of joel's NTL patch too, i.e. continuing on #528 [12:59] dmharvey -- do "sage -t --verbose --long" -- it'll tell you a lot more. [12:59] yeah I'm already doing verbose [13:00] ncalexan: what are you planning on doing with ell_rational_field.py? [13:00] wstein: do you run sage -t -long often? [13:00] dmharvey: once in a blue moon. [13:00] roed_: not much, just factor out the L-series stuff into a separate class and file. [13:00] I should run it every night. [13:00] It could wait. [13:01] Last time I ran it (about 2 weeks ago) I found a doctest by David Joyner. [13:01] It took a *long* time. [13:01] In fact, he told me it was _supposed_ to take about a day to run. [13:01] :-) [13:01] ncalexan: why don't I do that. I need to refactor other stuff as well in order to split off an ell_number_field class [13:01] It was some record-breaking calculation in Gap. [13:01] roed_: if you'd like. [13:01] roed_ -- could you make a plan first and post it for discussion? [13:01] sure [13:02] I'll make a new ticket [13:02] By the way, if people do "hg_sage.pull()" they will get Robert Bradshaw's complete-ish implementation of the [13:02] new [a..b] and (a..b) notation. [13:02] Try it out. [13:02] It's fun. [13:02] Try to break it. [13:02] william_stein: did you already create an L-series ticket? [13:03] ncalexan -- no. go for it. [13:03] there might be a "break up ell_ational_field" ticket; I don't know. [13:03] roed_: go for it, make the L-series ticket. [13:03] I want to fix the timeout stuff for doctesting. It's really weird. I'll make a trac ticket. [13:04] wstein: this is annoying.... there's a failure in the long doctests now for EllipticCurve("123a1").sha_an_padic(41). But the only changes I made should have *increased* the precision of p-adic regulators and such. Is there an easy way to tell whether the old answer was correct, or the new answer is correct? [13:05] trac #717 -- issues with the timeouts. [13:05] <-- jkantor has left this server (Read error: 110 (Connection timed out)). [13:06] Well the answer should be a unit at 41. [13:06] Actually it should be 1, right? [13:06] yeah I'm now getting 40 instead of 1 [13:06] -1. [13:07] It's listed under "exceptional cases" -- I don't know what that means [13:07] line 3226 [13:09] I think the normalization of the p-adic L-series is currently up to sign. [13:09] is that "exceptional" as in "multiplicative"? [13:11] william_stein: so I won't file a maxima bug yet? [13:11] janwil -- yes, definitely don't yet. [13:11] I'll get back to your problem in a minute. [13:11] Please wait while the SAGE Notebook server starts... [13:12] Traceback (most recent call last): [13:12] File "/Users/ncalexan/sage/local/bin/sage-notebook", line 9, in [13:12] from sage.server.notebook.all import notebook [13:12] File "/Users/ncalexan/sage-2.7.2/devel/sage-bugs/sage/server/notebook/all.py", line 13, in [13:12] from notebook_object import notebook [13:12] File "/Users/ncalexan/sage-2.7.2/devel/sage-bugs/sage/server/notebook/notebook_object.py", line 17, in [13:12] import run_notebook [13:12] File "/Users/ncalexan/sage-2.7.2/devel/sage-bugs/sage/server/notebook/run_notebook.py", line 26, in [13:12] ok, no problem ... will go make some tea ... [13:12] import notebook [13:12] File "/Users/ncalexan/sage-2.7.2/devel/sage-bugs/sage/server/notebook/notebook.py", line 21, in [13:12] from sage.structure.sage_object import SageObject, load [13:12] grout: hopefully that response will clear things up a bit [13:12] sage -ba needed? [13:13] ncalexan -- what are you doing? [13:13] Fixing 228: I changed a function in worksheet.py, added a few module level test data variables, and added doctests. [13:13] sage -notebook fails; sage -t works. [13:14] it sounds like you broke the notebook. Maybe a circular import? [13:14] Possible, I suppose. I removed nodoctest (why is that there, anyway?) so that my doctests were run. [13:15] well the NTL patch conflicts already big time [13:15] anybody familiar with number_field_element.pyx? [13:15] yes. [13:15] I just changed it a lot, with robert. [13:15] I'll try applying the ntl patch, since Robert is with me right now. [13:15] _parent_poly_c_ doesn't work anymore (doesn't compile after the merge) [13:16] wstein: if you're happy with the sha_an_padic() changing sign like that on one example, then I'm happy to post my patch for #635, otherwise I can try and investigate it further... but I probably don't know the theory well enough to figure out what's going on. [13:17] <-- robertwb has left this server. [13:17] mhh,in the original code it is raise NotImplementedError anyway [13:18] --> jkantor has joined this channel (n=jkantor@cpe-76-180-115-46.buffalo.res.rr.com). [13:18] dmharvey -- please mark the doctest clearly (with words). [13:18] The fix is to normalize modular symbols correctly. [13:19] Craig Citro or I can fix that eventually and should. [13:19] wstein: ok I'll do that and post the patch [13:22] is there anyone here who wants to talk about the graph.py code? I have a question about the order of an elif statement [13:22] Related to #716 [13:23] grout: what's your question? [13:24] millster == robert miller? [13:24] yes [13:25] ah, just the person. [13:25] I'm looking in the init function of DiGraph and Graph [13:25] Why is there a test for the more general class DiGraph before the subclass XDiGraph? [13:25] Shouldn't it be the other way around? [13:26] (i.e., if we have an XDiGraph, just set _nxg and return, otherwise there's more work to do. [13:26] malb_ -- every conflict so far involves Robert Bradshaw's code, so we're in luck. [13:27] (no bug days on Sundays!) [13:27] actually, there's something you probably don't know: networkx.Graph never gets used [13:27] nor does networkx.DiGraph [13:27] okay, it is compiling now, let's see what make test thinks about it [13:27] only .XGraph and .XDiGraph [13:27] Right, I realize that. [13:28] william_stein: I reverted my worksheet change, but I still cannot load sage -notebook. [13:28] I'm -upgrade-ing again. [13:28] millster: However, will a networkx function return a Graph or DiGraph object? [13:29] millster: then we'd need the init cases for those. [13:29] i'm not sure what the problem is [13:29] I've documented it in #716. [13:29] we have init cases for those [13:30] If I pass an XDiGraph with multiple edges, then that setting is lost because it is trapped in a more generic case. [13:30] ok, i think the problem is in the copy function [13:30] I already changed the copy function. [13:30] That's one problem, this is another. [13:30] (I think) [13:31] you [13:31] Well, I changed it in my local copy... [13:31] 're correct- half the problems are in copy, the other half in init [13:32] (and added a doctest function to check g.copy()==g [13:32] william_stein: Can you have a quick look at #718 - if you think it is as obvious a fix as I assume? [13:32] grout: hang on a sec [13:33] --> robertwb has joined this channel (n=robert@D-69-91-158-249.dhcp4.washington.edu). [13:37] millster: Actually, I think changing the order of the elif in the init fixes the copy problem as well. [13:37] And #719: also libpari related regarding the size of the internal libpari stack and its behavior [13:37] when calling pari.allocatemen() [13:38] oh of course, because in networkx, an xdigraph IS a digraph [13:38] of course of course [13:38] Right---test for the subclass before the class :) [13:38] that makes perfect sense [13:38] so switching the two in both init functions fixes everything? [13:38] I'm testing that... [13:38] ps, did you find my reply helpful? [13:39] Yes, very much so (in the few seconds that I scanned it...I think it ought to go in the developer's handbook [13:39] I'm in the process of doing that now [13:40] william_stein: I have mercurial branch on sage.math with the combinatorics stuff in it. It also has patches against other files that it breaks. I ran -testall and there were 3 errors that came up, but are unrelated to my stuff. [13:43] mhansen -- cool! [13:44] malb_ -- robert and I resolved the merge problems with the ntl bundle, hopefully. [13:44] Do you want a bundle? [13:44] mhansen -- yes. post it to trac. [13:44] O really, I didn't so far (lots of doctest failures) [13:44] good then, are you pushing it soon? [13:45] we just got it to build. haven't doctested yet! [13:45] But the build problems were mainly caused by new things Robert and I had done. [13:45] I'll push in about 10 minutes, I hope. [13:45] good, reverting my stuff then [13:46] millster: Okay, so I have two different changes (this init fix and a to_simple function). Can I commit just *one* of them? [13:46] william_stein: http://sagemath.org:9002/sage_trac/ticket/630 [13:46] Does mercurial allow me to pick a hunk to commit, or do I have to commit all the changes in a file? [13:46] all the changes in a file. sorry. [13:47] But you can commit individual files. [13:47] william_stein, ncalexan, dmharvey: I just skimmed through ell_rational_field. Just extracting the Lseries functions won't do all that much to shorten it. If we actually want to split it up, there are a bunch of classes of functions that we could split off: padic_height, padic_sigma, etc; functions related to the Tate-Shafarevich group and the BSD conjecture; functions related to various reduction properties (kodaira_type, etc); function [13:47] it's ok to commit both though, in this case, since they're both things that need to go in... [13:48] grr...oh well, I suppose that feature will come in time. That's one thing I like about git, svk, darcs, etc. [13:48] roed_: I don't think it's important to shorten it. I do think it is important to make it more object oriented. I want SAGE to have a concept of an L-series, and that means an object. Do you agree? [13:49] I do [13:49] For l-series [13:49] But not necessarily for some of the other ones [13:50] And I do think that shortening it is a valid goal, if only so that it's easier to find and modify code there. [13:50] Well, should the Tate-Sha group be an associated object, like the formal group? [13:50] I think I like that idea [13:51] malb_ -- do hg_sage.pull() [13:51] grout: awesome idea on ticket 698 [13:51] Well, it certainly provides enough work to do... [13:51] grout: you should take a look at the new Maple, too [13:51] there's a lot of new stuff there [13:52] millster: I've been meaning to install it for a long time. I heard there were quite a few graph functions in there now. [13:52] also, i'm working on a graph generator to be included soon [13:52] I'm just really comfortable with Mathematica. [13:52] #635: done, kind of. I've posted a patch. It passes all regular doctests, but for -long doctests a few weird things happen. I'm getting spurious segfaults, glibc realloc invalid size errors, sometimes. I'm only touching pretty high level python code so I have no idea why that is happening. [13:52] millster: graph generator? what do you mean? [13:52] do you mind sending me a patch with the to_simple and init fixes? [13:53] i mean an algorithm to quickly generate non-isomorphic graphs subject to some constraints [13:53] Yes, that's my next question: what should I do with it? post it to #716? [13:53] roed_, wstein, ncalexan: the patch I just posted for #635 touches ell_rational_field.py, so please take it into account before doing anything else with that file. [13:53] millster: Nice...up to this point I've used nauty [13:53] for graph stuff, probably the best idea is to send it to me [13:53] what did you do? [13:53] millster: I changed some stuff related to cyclic_permutations_ [13:54] mhansen - did something break? [13:54] roed: some slight changes to padic_height related stuff, fixed some precision losses that had occurred with either chris wuthrich's changes or some padic changes [13:54] ok [13:55] millster: No, I changed it to use the new CombinatorialClass interface that I wrote. It also handles the cases where there are duplicate elements in the list correctly. [13:56] just make sure that the graph classes pass doctests- there is some genus code that depends on that [13:56] Yeah, I changed those files and they pass the tests. [13:57] #697: what's the status with the NTL rewrite? [13:57] sweet [13:58] ok, it's midnight for me and I need to get up early tomorrow ... have a nice BD ... and maybe I will still meet some of you in the morning :) [13:58] Good night. [13:58] william_stein: could you merge #680? I need that one for Solaris 9. [13:58] <-- janwil has left this channel. [13:58] It isn't needed any more for Solaris 10, so I need to implement some workaround on the SCons level. [13:59] --> jaap has joined this channel (n=jaap@cc73571-a.emmen1.dr.home.nl). [13:59] But on Solaris 10 it ought to only print some warning.- [14:01] When you do hg_sage.bundle('blah'), does it take the last thing that was committed and bundle that? [14:01] not quite [14:01] it compares your version against the official version at sage.math [14:01] Aah, so you get _all_ my changes, then, right? [14:01] and bundles everything necessary to bring a copy of the official version up to speed with yours [14:01] --> malb has joined this channel (n=malb@host86-141-245-221.range86-141.btcentralplus.com). [14:02] correct, all your changes to the branch you've been working on [14:02] Okay, well, it's just these two changes, so that should be fine. [14:03] How do you want me to send this to you? [14:03] Okay, I am out. I have to leave for the airport in about 5 hours so it wouldn't be bad to catch [14:03] a little sleep. [14:03] If anybody could comment on #470, #718 & #719 which are all libpari related to memory [14:03] consumption. [14:04] I will read the logs in a couple hours, so see you. [14:04] cu. have a great trip to italy or wherever. [14:04] you can just e-mail it to me [14:04] Sorry I couldn't close any significant ticket tonight. [14:04] *** mabshoff_ is now known as mabshoff|away. [14:05] millster: I also changed to_(un)directed to be pass name, pos, and boundary, just like copy did. [14:06] awesome [14:06] william_stein: I've attached a patch for 228, added a note, added [with patch], and changed it to 2.8.4.3. [14:06] awesome [14:06] I assume that that is correct behavior. [14:06] yeah [14:08] hmmm...how long is sage -t graph.py supposed to take? [14:09] millster: How come the digraph class uses "arc" instead of "edge"? I'm always forgetting that and getting mixed up. [14:10] testing graph.py should take about a minute [14:10] Especially since networkX uses "edge", so the initial option is "multiedges=True", but ever after it's "arc" [14:10] it's actually taken some work to enforce that too [14:10] enforce "arc" instead of "edge"? [14:11] yeah [14:11] It seems like it'd be more friendly and consistent to call everything an edge. [14:11] the original motivation was actually my first teacher for graph theory [14:11] ahh. [14:11] he was dogmatic about the distinction, so by default so was i [14:12] Well, it sure is confusing for me. They look the same (an ordered list in Python). [14:12] Can I add "edge" functions to DiGraph to either supplement the "arc" functions? [14:14] <-- malb_ has left this server (Read error: 110 (Connection timed out)). [14:15] Is there any way to run the doctests in verbose mode? I think something's not quite right and it's taking a long time for sage -t graph.py [14:15] sage -t --verbose graph.py [14:17] #228 -- ncalexan -- I'm importing that nnow. [14:19] by the way, if a doctest fails it will print to screen, so doctesting proceeding silently is good [14:19] also, if something is wrong, typically it is much faster [14:20] <-- ncalexan has left this server (Read error: 104 (Connection reset by peer)). [14:21] grout: you should do one thing at a time, but i'm not really opposed changing every "arc" to "edge" [14:21] don't write *more* functions that do the same thing, though [14:22] yes, I know...I won't do it today. I also don't want to step on someone's toes if they love the arc functions. [14:22] nobody has defended them to date [14:22] anyway, let's have that patch, yes? [14:23] Sure, I'll post it. The doctest is having a problem, though. [14:23] is_circular_planar isn't returning the right result. [14:24] one sec [14:24] i think that might be an unrelated failure [14:24] hmmm, all the doctests were passing before. [14:25] I figured it had something to do with "boundary" not being passed somewhere. [14:25] send me the patch and i'll take a look [14:25] wstein, I just dotested the NTL stuff it is all good, however: [14:26] devel/sage-ntl/sage/monoids/string_monoid_element.py [14:26] devel/sage-ntl/sage/interfaces/tachyon.py [14:26] devel/sage-ntl/sage/rings/number_field/order.py [14:26] failed [14:26] erm william_stein [14:26] malb -- do hg_scripts.pull() [14:28] millster: I posted the patch to #716 [14:28] william_stein: good, only number_field/order.py still fails [14:28] I won't bother for now, will put some work in LLL [14:28] #325 [14:28] malb: REAL programmers have THREE trailing underscores [14:28] number_field/order.py fails for me as well [14:29] dmharvey yeah because they run Linux on a Macbook Pro == crappy drivers [14:29] malb do hg_sage.pull() [14:32] all good now [14:33] millster: sage -t graph_genus1.py fails for the nice_copy function now. [14:33] grout: i'm still building a 'pull' so i can take a look, hang on a sec [14:34] +1 (to robertwb) [14:34] I think everything should be an edge and node (or vertex) [14:34] +1 to boothby for whatever he says next [14:34] are you reading my mind??? [14:35] * boothby agrees with robert. [14:35] irc is so much fun when you're all in the same room... [14:35] yeah...and in Iowa too. [14:35] boothby how did you do that IRC thing [14:36] grout: Iowa? [14:36] wha? [14:36] OH! /me blablabla [14:36] * boothby blablabla [14:36] ah [14:36] * dmharvey gets it [14:36] mhansen: yeah [14:36] [Error] boothby: Unknown command. [14:37] * boothby says hi [14:37] * dmharvey wonders whether one can reflexively /me [14:37] grout: Where in Iowa? [14:37] nope [14:37] * william_stein picks up sword. [14:37] Iowa State U. [14:37] * dmharvey is already bored with this new toy [14:38] /me tries it too [14:38] grout: I'm originally from Waterloo, and have a brother who is a freshman at ISU. [14:38] mhh, my client doesn't do it [14:38] huh? [14:38] escaped or something [14:38] i thought you had figured out string escaping or something [14:38] mhansen: huh...is he taking calc? (like calc 2?) [14:39] grout: Nah, he's only in Calc I. He's not as fond of math as his older brother. I think he'll be taking that next semester though. [14:40] * millster verbs profusely [14:40] mhansen: that's great. Maybe I'll teach calc 2 next semester too. [14:42] grout: still waiting for stuff to build... [14:42] millster: I think the problem is that nice_copy in graph_genus1 depends on the copy function to forget the boundary. [14:42] I made a change so that copies of a graph keep the boundary. [14:42] i know, i can fix the problem once i'm done building [14:42] What's a boundary anyway? :) [14:42] a privileged subset of the vertices ;) [14:42] How is the lambda series of an elliptic curve related to the l-series? [14:43] ahh...I figured that _every_ property ought to be preserved when making a copy, but apparently nice_copy doesn't think so. [14:43] nice copy was a quick fix to avoid exactly what you fixed [14:44] but yes, everything about the graph should be copied over, and g == h should check everything [14:45] william_stein: How is the lambda series of an elliptic curve related to the l-series? [14:45] so does that mean that nice_copy is no longer needed? [14:45] millster: since nice_copy also changes the vertices to be consecutive integers, maybe a new function that relabels the vertices to some list is in order. Don't we already have that? [14:46] that can be factored out, yeah [14:46] just give me a moment [14:46] okay, sorry. [14:47] _hi_ [14:47] mhansen: what's your brother's name, in case I see him? [14:48] grout: Andrew Hansen [14:48] I'll keep my eyes open. [14:48] william_stein: Did you want someone to look over my combinatorics patch? [14:48] sure! [14:48] any volunteers? [14:48] me me me [14:49] I'm finishing up fixing some issues with Robert Bradshaw's patch and will look at yours some next. [14:49] But I'd love somebody else to look first. [14:50] I put a bundle on the trac server, but it's also at /home/mhansen/sage/ on sage.math [14:50] mhansen: #630? [14:50] millster: Yep -- that's the one. [14:50] what's the issue with "c interface to symmetrica"? [14:50] cool [14:51] What is symmetrica? [14:51] Do we need to make an spkg? [14:51] There's already one (but its optional at the moment). [14:51] It needs to be installed first. It's a software package for package for doing things related to the symmetric group. [14:52] of course. thanks. [14:52] Should we make symmetrica a standard spkg? [14:53] hmm, copy is still losing multiple edges [14:53] Yeah, I would like to. It is the backend for symmetric functions and Schubert polynomials. [14:53] sorry, hang on a sec [14:54] ok. it takes 30 seconds to build on sagemath.org [14:54] mhansen - anything about kazhdan lutztig poly's? [14:55] millster: For the symmetric group? [14:55] what does symmetrica depend on? [14:55] yeah, just out of curiosity [14:56] william_stein: I think just gcc. [14:56] on a scale of 1 to 10, how do you rank the quality of symmetrica? [14:56] millster: copy seems fine here. The code in the comment of #716 works great. [14:57] no, i was stupid [14:57] millster: I don't think it has that, but I believe I have some routines around for calculating them. [14:57] --> dfdeshom has joined this channel (n=dfdeshom@adsl-068-153-240-182.sip.int.bellsouth.net). [14:57] hey guys [14:57] grout: i see what you mean about graph.py taking forever to test [14:58] mhansen -- what is the license? [14:58] ah, public domain. [14:58] william_stein: 8. The last released version was a little while ago, but I just talked with the author in June, and he has his own CVS version that he's been working on. It is public domain. [14:58] it was 27secs before the patch, but now it seems to be taking forever [14:59] william_stein: He was interested in the SAGE interface for it since it is just a C library. [14:59] cool. [14:59] william_stein: Magma uses it for its symmetric functions. [14:59] ok, it's in. [15:00] millster: sage -t --verbose graph_genus1.py tells where the problem is, I think. [15:00] I like how william approves whatever is in Magma ;) [15:01] so all i have to do is wrap my code in molten rock? [15:02] could a few people type "sage -i symmetrica-0.2" and let me know if it builds for them? [15:02] grout: did you ever get testing graph.py to finish? [15:02] It just worked for me. [15:02] (symmetrica did) [15:02] hey william -- I hear Magma is going to switch to a perl-like language. Can we do the same? [15:02] um, I vote for lua or ruby :) [15:02] millster: no, I killed it. [15:03] oy [15:03] adding graph.set_boundary([]) after graph.copy() in nice_copy doesn't seem to fix the problem. [15:03] what a mess [15:04] * grout bangs head against stone floor, in dobby-like fashion [15:04] sorry [15:04] mhansen -- how can Symmetrica be version "0.2" after 15 years?! [15:05] Or is the 0.2 something you made up? [15:05] It was my second version of the spkg. [15:05] I don't know if there is an official versioning scheme ;-] [15:06] Is there a way to examine the changes in a bundle? I'd like to see what I just applied from the combinat bundle. [15:06] hg_sage.incoming('foo.hg'), but this only works if done from a repo that doesn't have those changes [15:06] already applied. [15:06] oops. [15:08] millster: Here is an example of what the new combinatorics interface looks like. It's heavily inspired by MuPAD-Combinat. [15:08] mhansen, i've now officially included symmetric for the next release of Sage. [15:08] millster: http://wiki.sagemath.org/Combinatorics [15:08] Excellent [15:09] grout: why did you remove loops from the copy command? [15:10] I don't think we need them (and the doctests back that up). [15:10] ok [15:10] If a XDiGraph is passed, then the structure is set and we never look at the loops parameter. [15:10] nx takes care of it? [15:11] Everything except for boundary and pos is stored in _nxg, to my understanding. [15:11] We had to have them before because we were calling the superclass constructor, which defaulted to no loops. [15:12] (so we had to pass in the current status) [15:12] But please double-check everything in case I missed something. [15:12] (this is my first patch, after all :) [15:12] i'm getting very funny copy behavior [15:12] like what? [15:13] shallow copying [15:13] an example? [15:14] one sec [15:15] got it [15:16] an example or a fix? [15:16] both [15:16] yeah! [15:16] care to elaborate? [15:17] * millster begs for patience [15:18] sorry, sorry :) [15:19] sorry to keep you in suspense, i'm cleaning up the rest of the doctests - apparently, we were constructing two sage graph objects that pointed to the same networkx object [15:21] oops, I guess we should call "copy" in the copy functions...duh. [15:22] it's amazing how many doctests can break when you make such a small change [15:22] #228 -- excellent work ncalexan [15:23] millster: are you calling the networkx copy function in our copy function or our init function? [15:31] ncalexan, william_stein: track 721 outlines a plan for splitting ell_rational_field [15:34] millster: I guess all of the tests that depended on to_directed or to_undirected to not pass the name fail, plus one with an extra space. Is that what you got? [15:35] roed_ -- i'll check it out shortly. [15:35] ok [15:38] roed_ looks good to me. Robert Bradshaw is also looking the plan over. [15:39] mhansen -- gees that's a big patch! [15:39] grout: essentially, yeah [15:40] william_stein: Yeah, it feels a little weird calling it a 'patch' [15:40] millster: do you want to send me back a new patch (or please tell me somehow how to get it?) [15:40] still ironing out the kinks, but i'm almost done [15:41] mhansen: that's giganormous...I'd call it a quit at least :) [15:41] I man, quilt [15:41] I mean, quilt [15:41] grout: All tests passed! [15:41] Yay! [15:41] yeah! I presume that they're correct too :)... [15:42] that's another matter entirely [15:42] I really like the "new" feature that sage: H = G.subgraph([0,1,2]); H returns Subgraph of (Complete graph): Graph on 3 vertices [15:42] (the name indicates how you got the graph) [15:42] it was supposed to do that all along, and i couldn't figure out why it wasn't [15:43] mhansen -- you'll want to do some work to get the relevant autogenerated docs from your code into the reference manual, ok? [15:43] that can wait a little until things stabilize, though. [15:43] this means editing SAGE_ROOT/devel/doc/ref/ [15:43] mhansen -- all tests pass in combinat/ [15:43] millster: If you'd send me the patch, I'd love to do one more---the changing arcs to edges, if we're all unanimous on that :) [15:44] Of course, such a huge change probably requires approval from our supervisors... [15:44] william_stein: Great! [15:47] grout: check ticket 716 again [15:47] --> malb_ has joined this channel (n=malb@host86-141-245-221.range86-141.btcentralplus.com). [15:48] grout: if you're doing the arc to edge change, the only file you'll need to touch is graph.py itself [15:48] it should be as simple as a find/replace where you make sure you're not catching words like search [15:49] ps - consider it approved [15:50] grout: have you used hg_sage.browse() yet? [15:50] hmmm...I'm not sure. I don't think so. [15:50] it's great [15:51] you apply the bundle i posted, then do that, and your web browser will open up and you can see only what was changed [15:51] oh yeah, I've seen it, but not used it. [15:51] william_stein: I also have a patch for tut.tex. [15:52] I attached it to #630 [15:55] millster: um, I think we should call the copy in the init function, like networkX does. [15:55] so if g is a graph, calling Graph(g) makes a copy of g. [15:56] instead of calling the copy in the "copy" function. [15:57] that's not how it happens [15:57] I must be confused. [15:57] networkx_graph() returns a copy. [15:57] sage: G = Graph() [15:57] sage: G == Graph(G) [15:57] True [15:57] sage: G is Graph(G) [15:57] False [15:58] you mean we should use ._nxg.copy() instead of .networkx_graph()? [15:59] Yeah, but what if G is a _nxg? Then it's not copied in Graph(g) [15:59] mhansen -- interestingly the *old* partitions function is way faster than your new one...?? [15:59] old: [15:59] sage: time v=list(partitions(30)) [15:59] CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s [15:59] aha [15:59] new: [15:59] sage: time v=Partitions(30).list() [15:59] CPU times: user 0.46 s, sys: 0.02 s, total: 0.48 s [15:59] grout: now i get it [15:59] <-- malb has left this server (Read error: 110 (Connection timed out)). [16:00] so replace "self._nxg = data" with "self._nxg = data.copy()" twice? [16:01] hang on a sec, I got a phone call... [16:01] william_stein: I've added some code to #325 [16:01] I'll take a look. [16:01] It doesn't integrate pari yet but the pari function is callable from SAGE [16:02] Yeah, I haven't done any real optimization yet. It'll get there though. But, the new one provides an actual iterator so that you don't need to store all of them in memory at once. [16:02] the old one was an iterator. [16:02] I posted the code on trac. [16:02] millster: Yes, that was what I was thinking. [16:02] Maybe have both functions... [16:03] millster: and remove the .copy from the copy function. [16:03] sounds fair [16:04] #325 -- malb, looking at it now. [16:04] mhansen -- I think just including your code in the next Sage is a good idea. [16:04] It will be very helpful to get a lot of feedback. [16:04] millster: Of course, it's slower, though. For example, to_directed then makes a copy of a copy. [16:04] But I think you should send me a patch that puts the old partitions function back in too (as an alternative to Partitions(n).list()), [16:04] and similarly for other things you might have deprecated. ??? [16:05] millster: hmm...It might be better to have it the way you have it, even if it's not consistent with networkX [16:06] malb -- your patch is weird. [16:06] consistency with networkx is not one of my concerns- they do some things very silly [16:06] If g is a Sage Graph, then Graph(g) is a copy. [16:06] #325 -- It implements pari lll, but then implements lll over ZZ using ntl. [16:06] millster: If g is a networkX graph, then Graph(g) is a wrapper around that exact graph. [16:06] yes [16:06] exactly [16:07] Did you do timings and NTL always crushes PARI? [16:07] millster: That's how it works now with your patch, if I understand things right. [16:07] no not at all [16:07] william_stein: I just see the partitions wrapping GAP (not an iterator). I can add back the old functions in combinat.py that I replaced. A lot of them are still there -- just wrapped in CombinatorialClass objects. [16:07] I went for NTL first because I understood better what needs to be done [16:07] yes, the way it is now [16:07] so shouldn't the lll for mat over ZZ always have an option "algorithm = " that can also call PARI? [16:07] mhansen -- see trac #630. [16:07] The partitions function doesn't have anything to do with Gap. [16:07] william_stein: I just found the partitions generator. [16:07] yes it should, but I might have to do that later [16:08] it is not finished yet [16:08] It's from the cookbook. [16:08] ok, good. [16:08] but the ticket could change to improve LLL [16:08] millster: I guess that makes sense, since people shouldn't deal with the underlying networkX object, so they won't have surprises, and we'll just be careful to make copies when we mean to make copies. [16:08] malb -- #325 -- good, i understand. [16:08] got it. [16:08] malb -- new ticket. [16:08] i'll apply and post #325 now. [16:08] the only reason someone is going to start playing aroung with networkx graphs is if they're pretty advanced [16:08] okay, I gotta bail out for tonight that's why I am posting it already [16:09] I'm also posting mhansen's code, so peoplke will have to install symmetrica to do hg_sage.pull(). [16:09] ah, malb_ cu [16:09] cu [16:09] grout: can you add something to the documentation about all this? specifying that the behavior is on purpose, why, and a docstring exemplifying it? [16:09] it's a pretty subtle point [16:09] millster: okay, let's do it the way the patch is now. Are we sure that there are no more problems with not copying when we mean to. [16:09] <-- malb_ has left this server (Read error: 104 (Connection reset by peer)). [16:10] all doctests pass, that's the best thing [16:10] millster: hmmm, then again, every other way of constructing the graph makes a copy. [16:11] i think we're fine [16:11] okay. [16:12] grout: can you document this decision? [16:12] I'm doing it now. [16:12] awesome [16:13] All of sudden I'm getting errors when doing sage -br. I just did a hg_sage.pull(). The errors come from "building 'sage.libs.flint.fmpz_poly' extension" [16:14] gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/home/grout/sage/sage-2.8.3/local/include/FLINT/ -I/home/grout/sage/sage-2.8.3/local//include -I/home/grout/sage/sage-2.8.3/local//include/python -I/home/grout/sage/sage-2.8.3/devel//sage/sage/ext -I/home/grout/sage/sage-2.8.3/local/include/python2.5 -c sage/libs/flint/fmpz_poly.c -o build/temp.linux-i686-2.5/sage/libs/flint/fmpz_poly.o -std=c99 -w [16:14] do sage -i flint-0.2.p2 [16:14] sage/libs/flint/fmpz_poly.c:30:19: error: flint.h: No such file or directory [16:14] grout -- you have to install flint. [16:14] And symmetrica in a few minutes. [16:15] okay, working better now. Thanks. [16:16] --> tornaria has joined this channel (n=tornaria@r190-0-137-63.dialup.adsl.anteldata.net.uy). [16:16] millster: Are you sure it's okay to completely break backward compatibility and change "arc" functions to "edge" functions? Shouldn't we at least include them for one more release, in a deprecated state? [16:17] Is there a way to mark a function as deprecated, so that it maybe prints out a warning each time it's used, but it still works? Seems like some scripting language does this (python?), and it's handy for the transition. [16:17] nobody will miss it [16:18] okay, okay. [16:18] i think it's a bit early to worry about backwards compatibility yet [16:18] hmmm...I should remember that---I already put SAGE code in my dissertation and a few papers... [16:19] just say what version you were using [16:19] I did. I'm glad william archives the versions. [16:20] Part of the reason for including the code was to give people a taste for SAGE---some examples of code. [16:21] the archives also on all of the mirror sites. [16:21] seriously though, stability of the interface to Sage will be a very important goal for Sage once there [16:21] are more users. [16:21] There are still probably < 1000 users. [16:22] william_stein: I made it so that Partitions(n).list() uses (a modifed version of) partitions. I'll include that with a patch restoring the old functions in combinat.py once the new stuff is ready to pull(). [16:23] it's ready to pull [16:23] sage: time v = Partitions(30).list() [16:23] CPU times: user 0.04 s, sys: 0.01 s, total: 0.04 s [16:23] Wall time: 0.04 [16:23] sweet! [16:25] #528 progress report: things are starting to work. Already multiplying (2*x+4) by 3 is about 4x faster, just from improved overhead. Still a factor of 3 or 4 behind magma, to the extent that the comparison makes sense. [16:26] millster: Am I not understanding something? How come I'm getting false with the following? [16:26] sage: g = networkx.Graph({0:[1,2,3], 2:[5]}) [16:26] sage: G = Graph(g) [16:26] sage: H = Graph(g) [16:26] sage: G._nxg is H._nxg [16:26] False [16:27] what about G._nxg == H._nxg? [16:27] still false. [16:28] sage: G._nxg [16:28] [16:28] sage: H._nxg [16:28] [16:28] They appear to be two different networkx objects. [16:30] They *are* two differnet objects. [16:30] yeah, but they shouldn't be [16:30] I found it. I should do g=networkx.XGraph... [16:30] oh i see [16:31] sage: G._nxg is G._nxg [16:31] True [16:31] sage: G._nxg is H._nxg [16:31] True [16:31] subtlety on subtlety [16:32] dmharvey -- excellent. [16:33] grout: try True + Ture [16:33] error...Ture is not defined [16:34] ?? [16:34] sage: True + True [16:34] True+True==True [16:34] (two truths make a lie?) [16:35] mhansen -- is this right? [16:35] sage: a = Partitions(6) [16:35] sage: a.rank() [16:35] right, stop that, the lot of you! this has gotten entirely too silly! [16:35] : rank_from_iterator() takes exactly 2 arguments (1 given) [16:35] a.rank? [16:35] nothing [16:35] <-- jkantor has left this server (Read error: 110 (Connection timed out)). [16:36] rank takes in a partition, and returns its position in the list. [16:36] i see. [16:37] sage: a = Partitions(6) [16:37] sage: a.rank([6]) [16:37] 0 [16:38] I still need to add documentation to CombinatorialClass. It provides default implementations for subclasses which don't provide a more specialized method. [16:38] mhansen -- why do you do: [16:38] sage: a = Partitions(6) [16:38] [16:37] sage: a.rank([6]) [16:38] [16:37] 0 [16:38] rank = rank_from_iterator [16:38] I mean, why do you do? "rank = rank_from_iterator"? [16:39] That's the default implementation. [16:39] Subclasses should override rank if there's a better algorithm for computing the rank of an object. [16:39] Yes, but why do you do "rank = rank_from_iterator"? [16:39] What does that accomplish? [16:39] Why not just define rank? [16:41] To detect when the method has been overwritten. [16:42] ah, I see. Interesting. [16:42] Wow, there's a lot of new code you've written. Over 20000 lines. Gees. [16:42] A lot is doctests though. [16:42] def iterator(self): [16:42] good. [16:42] if ( self.first != self.first_from_iterator and [16:42] self.next != self.next_from_iterator ): [16:42] return self.iterator_from_next() [16:42] elif ( self.last != self.last_from_iterator and [16:42] self.previous != self.previous_from_iterator): [16:42] return self.iterator_from_previous() [16:42] elif self.unrank != self.unrank_from_iterator: [16:42] return self.iterator_from_unrank() [16:42] elif self.list != self.list_from_iterator: [16:43] return self.iterator_from_list() [16:43] else: [16:43] raise NotImplementedError, "iterator called but not implemented" [16:43] ahhh [16:43] ok. [16:49] millster: is there a way to send you just the changes I just made? [16:49] (the doc changes_) [16:49] bundle [16:49] put it on trac, or e-mail it to me [16:52] okay, it's on trac. Do you want to take a look? [16:52] doctests pass for me. [16:52] looking now [16:53] fyi: If you do "sage -upgrade" right now, you'll get updated symmetrica and linbox. [16:53] *** mabshoff|away is now known as mabshoff_. [16:53] Hi, I am back. [16:53] This will be needed for hg_sage.pull() in a moment. [16:53] mabshoff_: are you about to go to the airport? [16:54] grout: looks good [16:54] william_stein: I gotta get ready in about 75 minutes [16:54] i'm trying out sparse mod p linear algebra from Linbox in Sage now, via Martin's patch. [16:54] I just released gmp 4.2.2 and mpfr 2.3 on Windows binaries. [16:54] I promised to do that and I woke up after 3 hours of sleep. [16:55] Now I will try to do the IML spkg and finish the LinBox teleconference summary. [16:57] mabshoff_: I had always assumed you just never slept at all! How disappointing. [16:57] Well, maybe I have a team of gnomes work in shifts to pretend it is me :) [16:57] But I am just as suprised as you that I woke up that early, I had hope I would sleep 2 more hours. [16:57] mabshoffbot. [16:58] :) [16:58] Initially I wasn't sure if I had ignored my alarm and that it was way too late to catch the plane. [16:58] But that wasn't the case. [16:58] william_stein: #629 (DSage fixes) is ready to go int. [16:58] in [16:59] I also tested it on PPC 32 and it works fine. [16:59] excellent. [16:59] All doctests for 2.8.4.2 passed on PPC 32, but that was yesterday :) [16:59] And I talked to the admin at the univeritsy today. I might soon get a 1.8GHz G5 to play with. [17:00] i.e. 64 bit PPC Linux with 100 mbit hookup and me as root :) [17:00] --> jkantor has joined this channel (n=jkantor@cpe-76-180-115-46.buffalo.res.rr.com). [17:01] nice. [17:03] william_stein: I added patches to #630. [17:06] #629 -- applying now. [17:06] Coo, how about #680? [17:08] done. [17:08] grout: i just changed all arcs to edges [17:08] grr, I'm only half-way through. [17:08] ok, that needs a little work for Solaris 10 down the road, but I can fix that, too. [17:08] don't worry about it [17:08] But I'm also deleting redundant code and redundant docs [17:08] did you do that too? [17:08] aha [17:09] wait a sec [17:09] :) [17:09] i'll send you a bundle [17:09] i did arc -> edge but not redundant code [17:09] so you can do that part [17:09] I figured it was much easier to spot the redundant code while changing arcs to edges, so I didn't do the fast search/replace first. [17:09] basically a lot of the product functions are half the size now. [17:10] <-- dfdeshom has left this server (Read error: 113 (No route to host)). [17:10] mhansen -- i've applied the rest of #630 [17:10] grout: okay, go for it [17:10] mabshoff -- new iml spkg? [17:10] #656 [17:11] Working on it. Ran out of space on /home. fixing that right now. [17:11] thank goodness for emacs recursive editing while searching and replacing, as well as the block indenting/unindenting :) [17:12] grout: once you finish eliminating the redundancies, i think we should close ticket 716 [17:19] yeah, we've kind of gone beyond 716 now. [17:19] Which reminds me...I'll open up another ticket, but I ran into something a while ago. [17:19] I was reading in a graph6 string that had a backslash. [17:20] oh god [17:20] apparently Python intepreted the backslash to be an escape character. [17:20] Yeah, it was ugly. [17:20] ok - open a ticket, i'll deal with it later [17:20] I know now to use r" " [17:20] i know about this issue, but... [17:20] I think the graph6 code ought to generate an error when the string is too short. [17:20] you should be able to detect that. [17:21] (Brendan does, anyway, and my Mathematica code does) [17:21] or when the string is too long. [17:21] ? [17:21] MemoryError: too much memory [17:21] You know exactly how many bits you need from the first character of the graph6 string. [17:22] this is definitely a ticket for the future [17:22] Is that what the ? refers to? [17:22] there isn't much checking in the to/from graph6 stuff [17:22] Yeah, I noticed. [17:22] I didn't realize the backslash was an escape character until much later, when I realized my graphs were corrupt. [17:23] Well, they were still valid graphs, but they weren't the graphs I had put in. [17:23] (I thought didn't interpret escape characters, like in bash) [17:24] mhansen -- i'm looking at #691 now. [17:25] good. [17:25] I hope these changes from arc to edge don't affect a huge amount of stuff elsewhere in SAGE [17:26] i wouldn't worry about that [17:26] Try search_src('\.arc') [17:27] Heh, I used it in a couple of places ;-] [17:27] combinat/skew_partition.py: sage: dag.arcs() [17:27] Thanks, that's exactly what I needed! [17:27] (the search_src) [17:27] search_src and search_doc are your friends. [17:27] rather, i would worry about that [17:27] mhansen -- did you use it only in skew_partition? [17:28] Yup, I had a doctest failing, somewhere, something was using arc. Using search_src, easy as cake to find! [17:28] grout: do you still have my e-mail address? [17:28] I also use it in permutation.py. [17:29] william_stein: iml 1.0.1 vs 1.0.1.p6.spkg diff is about 420 lines. [17:29] I plan to send that to Arne & Clement, so hopefully they will do a 1.0.3 release with the added featurs. [17:29] cool. [17:29] You'll also want to search for "add_arc". [17:29] porvided you and malb release the changes officially which I assume will happen :) [17:30] "_arc" and "\.arc" should cover everything [17:30] what you do *not* want to search for is "search"...I can't believe how many times we used "search"! [17:30] I will just patch in the bits from 1.0.1->1.0.2 diff expect the new configure crap [17:30] because the used autoconf 2.61 vs. 2.59, so the diff is huge. [17:30] If it breaks I will fix it down the road :) [17:31] (and we will skip the update for now) [17:31] millster: I think I have your email from your email to the newsgroup. [17:32] i thought we had had correspondence before, but i can't find any messages [17:32] ? [17:32] oh yeah, something about a bug in the graph drawing code. [17:32] (the colors dictionary or something) [17:33] okay, all doctests pass with the arc->edge functions for the graph.py [17:33] Do you want me to posts patches for my stuff? [17:33] all doctests in graph.py, or all doctests everywhere? [17:34] no, just sage -t graph.py [17:34] because i already tested graph.py [17:34] (which required also changing the isomorphism file) [17:34] does this include removing redundancies? [17:34] yes. [17:34] sweet [17:34] I'll post a bundle right away. [17:34] mike h's code too? [17:34] uh, no, just graph.py and the NICE file. [17:35] ok [17:35] okay, it's up on #716. [17:35] Do we wait to close #716 until it's been officially integrated into the main SAGE? [17:35] --> tclemans has joined this channel (n=Miranda@68.178.77.126). [17:36] I'm Timothy Clemans Seattle, WA Currently in Vancouver, Washington [17:36] grout: yes. [17:36] hi tclemans. [17:37] working on #643 [17:38] okay, I'll leave it to others to close 716 whenever is proper. [17:39] We should really spend some time on all the open notebook issues. [17:39] I've got to run, but thanks everyone for being so friendly and helpful. This has been a great experience---so good that I put off everything else that I should have done today! [17:39] #643: my example pages do not use table at top but divs is it best to rewrite top that way or use current table? i know that current table has nested tables and when i made an id for it js did not find true height of it [17:40] grout: See ya! :) [17:40] by [17:40] quit [17:40] by [17:40] grrr...need to figure out how to quite irss [17:40] <-- grout has left this server ("leaving"). [17:41] I added at patch on #716 for my code. [17:42] grout: one comment [17:42] the distinction between vertex and node [17:42] he is gone :( [17:42] i think of vertices as the points of graphs [17:42] oh [17:42] right [17:42] * millster grins sheepishly [17:43] for those of you listening, i think of nodes as parts of the search tree in isomorphism testing... [17:43] Well, he might read the log at some point :) [17:43] millster: http://math.univ-lyon1.fr/~ducloux/coxeter/coxeter3/english/coxeter3_e.html does KL polynomials for arbitrary Coxeter groups. [17:44] i was aware of this program, but thanks [17:45] mhansen -- can you do me a favor? [17:45] I have code to do it for S_n, I just need to track it down. [17:45] Sure. [17:47] i'm about to pull all the new stuff together [17:47] #643: my current example page is http://tclemans.nonlogic.org/snb/notebook-top-091407-0310.html [17:47] there will be a few issues with arc -> edge stuff [17:47] but i am now waiting for a 15 minute build... [17:48] <-- robertwb has left this server. [17:50] <-- jkantor has left this server ("leaving"). [17:53] Be right back. [17:53] <-- mhansen has left this server ("Leaving"). [17:56] #643: it would be nice if the notebook css was tidied http://floele.flyspray.org/csstidy/css_optimiser.php [17:57] I'm looking at #710 [17:57] --> mhansen has joined this channel (n=mikehans@adsl-76-204-100-64.dsl.mdsnwi.sbcglobal.net). [17:58] still building [18:02] <-- tclemans has left this server ("Miranda IM! Smaller, Faster, Easier. http://miranda-im.org"). [18:09] william_stein: new IML spkg attached to #656 [18:09] passes sage -ba, still waiting on .testall [18:09] -testall obviously. [18:10] But it is a hack, once your's and malb's changes are merged back in we should rebase against 1.0.3 [18:10] #656: awesmoe [18:10] I am sending an email about the diff 1.0.1.p6 vs. vanilla 1.0.1 now. [18:11] The diff is at http://sage.math.washington.edu/home/mabshoff/iml-1.0.1-1.0.1_sage-diff [18:11] mhansen -- i'll run a sage -t on the combinat module, is there anything else i should check? [18:11] about 420 lines, so it isn't too bad to merge back in manually. [18:12] millster: Nope -- that should be enough. [18:12] easy enough [18:13] on #710 [18:13] seems a bit nasty, not sure how to fix it. [18:14] yep. [18:14] it's been there for a long time. [18:14] but nobody reported it. [18:14] at least it is easy to replicate. [18:15] thing is [18:15] Okay, IML email is out. [18:15] I wrote replacements for _sig_on and _sig_off [18:15] mhansen -- your symmetric package won't build on osx :-( [18:16] They are called "_pari_sig_on" and "_pari_sig_off" [18:16] I made a new version of it, by the way vesion 0.3. So use that instead of whatever you have... [18:16] But they are supposed to be run in pairs. [18:17] william_stein: Your package fixes the error on OSX? [18:17] However, functions in gen.pyx call _sig_on (which is somehow rewritten as _pari_sig_on) but don't call _sig_off [18:17] Somewhere it is called implicitly. [18:18] not yet. [18:18] I just discovered the error. [18:18] I'm working on fixing it. [18:18] I hope symmetrica works on os x! [18:18] P.new(...) calls _sig_off. [18:18] P.new_gen [18:18] Maybe it's not being rewritten as _pari_sig_off [18:18] Will check... [18:19] Yep. it calls _sig_off! [18:20] but that shouldn't matter, since you make _pari_sig_off and _sig_off the same in pari_err.pxi [18:20] It's line 5595, by the way... [18:22] yes.. the gen.c is correct.. :( [18:23] misc.h defines _pari_sig_on and _pari_sig_off [18:24] it's roughly _sig_on and _sig_off with an extra pair of _pari_catch and _pari_endcatch [18:24] the latter should set the signal handler and reset it resp. [18:24] defined in pari_err.h [18:24] (I believe stolen from gp code) [18:24] idea: let's just try it with the classical _sig_on / _sig_off and see if the error still happens. [18:25] It'll be a good test. [18:25] ... trying now. [18:25] mhansen -- i got it to build on os x. [18:25] s/signal handler/pari error handler/ [18:25] william_stein: Excellent -- what was the issue? [18:26] ok, I'll do that. [18:26] http://sagemath.org/packages/standard/symmetrica-0.3.1.spkg [18:26] malloc.h isn't in /usr/include or the standard include path on osx. had to add a -I to the makefile. [18:28] tornaria that didn't work :-( [18:28] malloc should be defined in , isn't it? [18:29] william_stein: symmetrica-0.3.1.spkg builds fine for me. [18:29] Are you sure it did recompile? I have to touch lots of files (still compiling) [18:29] (I probably touched some .pxd files that forced too much to be recompiled) [18:29] there are a lot of mallocs on os x (and my machine): [18:29] bsd:~ was$ locate "/malloc.h" | wc -l [18:29] 16 [18:30] I guess gen.pyx should be recompiled at least. [18:30] All I did was replace the line that includes pari_err.pxi with including interrupt.pxi in gen.pyx. [18:30] So only gen.pyx must be recompiled. [18:30] yep... [18:31] I changed misc.h and recompiled lots of stuff, but still SEGV [18:32] at least I'm not to be blamed... :) [18:32] william_stein: -testall passes with the new IMP spkg on sage.math [18:32] (for the pari_catch stuff, I mean) [18:33] there were some failures in one of the tex files, but those were related to algebra [18:33] In const.tex [18:33] i've tested it some too. [18:33] it's in. [18:33] But I haven't updated since the initial build about 8 hours or so ago. [18:34] cool [18:34] close it. [18:34] will do [18:34] I ticket a day ... [18:35] mabshoff: are you on a plane now? [18:35] not yet, about to leave in 10 minutes. [18:35] And I am going by train first, then two short hops Düsseldorf->Zürich, Zürich->Milano. [18:35] heh..... so soon we get to see you simultaneously fly, code, and sleep [18:36] Maybe, I have to work on the simultaneous. [18:36] well I can press two keys on my keyboard at the same time [18:36] :) [18:37] #656 is closed. [18:38] I would like to hear William's opinion on #718 and maybe #719 [18:38] I got 10 more minutes :) [18:39] #672 and #673 should also be easy to fix, it seems Solaris prints NaN instead of nan and inf vs. Infinity [18:39] I totally agree with #718. [18:39] Though one has to be very careful with state and precision. [18:39] okay, I assume you just have to import the right instance [18:39] and use that. [18:40] In other places of the code they do use the same pari instance. [18:40] no on #719. [18:40] ok [18:40] Lots of pari is unusable with < 100MB stack. [18:40] And it's a *serious* pain to have to do it randomly in the middle of computations. [18:40] really? That sucks. [18:40] PARI doesn't automatically double the stack. [18:40] The pari memory system is absolutely terrible. [18:40] Well, but the doubling of the stack past 512MB seems crazy [18:41] I can second that, I actually looked at some of the code and oooooooooooooooooooh [18:41] Usually when asked about PARI and memory, the response on the mailing list is "just allocate a 2GB stack" [18:41] lol [18:41] Maybe it is time for pari 3 with a sane memory model. [18:41] yeah but it saves valuable cycles at very low levels [18:41] Well, but that mode is so '60s [18:41] actually maybe that's not true [18:42] hmmmmmm [18:42] stack allocation sucks. [18:42] slab allocators are much better and I believe their garbage collection might hmm, [18:42] let's say can be improved. [18:42] Valgrind croaks on if it busts its heap, so I am sure there are some gremlins in there. [18:43] Well, gotta go. [18:43] Should be online at some point on Friday, but only dial up, so that will suck [18:43] cu [18:43] <-- mabshoff_ has left this server (Remote closed the connection). [18:43] cu [18:45] changing the pari memory model is nearly impossible. Seriously. [18:45] I wouldn't dare. [18:45] It means rewriting essentially every function in the entire library. [18:49] on pari stack: [18:50] if you allocate a very large stack, but don't use it, it won't actually use real memory [18:50] (hopefully you are 64bits where virtual memory space is big) [18:51] however, pari functions don't know about using the stack conservatively. [18:52] I.e. pari functions will use plenty of memory in the stack (tipically half of the available space when they are invoked) [18:53] So, memory will be trashed, and then all the stack becomes real memory (well... or trash in the disc) [18:54] The way GP addreses this is: the stack is reallocated every input [18:55] I.e. when eval an expression, pari stack is allocated, expression is eval'ed using the stack, result is copied to heap, the stack is freed. [18:55] (or so I believe) [18:56] mhansen -- are you around? [18:59] Yeah [18:59] did you doctest partition.py ? [19:00] I still have some stuff left to do in it. [19:00] didn't think so :-) [19:00] <-- mhansen has left this channel ("Leaving"). [19:00] --> mhansen has joined this channel (n=mikehans@adsl-76-204-100-64.dsl.mdsnwi.sbcglobal.net). [19:00] come back [19:01] Wait, are you talking about after a patch? [19:01] Yes. [19:01] it broke some things. [19:01] we just fixed them. [19:01] the problems were all in interator(...) [19:03] That's weird. [19:03] --> tclemans has joined this channel (n=Miranda@68.178.77.126). [19:03] maybe you checked in before finishing and sent us a broken patch. [19:03] ok i'm back from dinner [19:04] any news on notebook bugs I know that #228 was fixed thanks to Nick [19:04] Hmm... possibly. I remember doctesting after that and testing it interactively. Is it taken care of now or do you want me to make some changes? [19:05] it's taken care of. [19:05] nothing new on the notebook [19:05] Sorry about that. [19:06] np -- it took 1 minute to fix. [19:07] ok, bye everyone [19:07] bye [19:07] do you want to fix #643 with the current table and nested tables at top? [19:07] <-- millster has left this server. [19:12] --> mhansen_ has joined this channel (n=mikehans@adsl-76-204-100-64.dsl.mdsnwi.sbcglobal.net). [19:12] <-- mhansen has left this server (Read error: 104 (Connection reset by peer)). [19:13] why is slide_controls in html? I don't think it is enabled in the twisted notebook [19:16] You can cut that out. [19:16] <-- mhansen_ has left this server (Read error: 104 (Connection reset by peer)). [19:16] --> mhansen has joined this channel (n=mikehans@adsl-76-204-100-64.dsl.mdsnwi.sbcglobal.net). [19:19] apparently in the notebook css there is a bunch of stuff that isn't used in the notebook anymore like "top_control_bar" [19:24] --> mhansen_ has joined this channel (n=mikehans@adsl-76-204-100-64.dsl.mdsnwi.sbcglobal.net). [19:24] <-- mhansen has left this server (Read error: 104 (Connection reset by peer)). [19:29] #528: patch uploaded [19:29] cool. [19:29] #528: still pretty ugly, and I'm not convinced it passes all doctests yet, but it's a start [19:29] I should go [19:29] I was just getting that in before I went off to bed [19:29] ok. [19:29] --> ncalexan has joined this channel (n=ncalexan@pv109051.reshsg.uci.edu). [19:30] Is this something I should put into SAGE now? [19:30] Is it safe? [19:30] Should I wait? [19:30] It sounds like it. [19:30] I don't know [19:30] basically, I got all doctest passing, except for the ones currently failing in the repository :-) [19:30] but I didn't check too carefully which were which [19:30] ah, ok. [19:31] so i could maybe do that, or wait a day for you to? [19:31] either way [19:31] cool. [19:31] I'll post a remark to trac if I merge yur patch in now. [19:32] ok [19:32] bye [19:32] <-- dmharvey has left this channel. [19:32] 660: has a patch, which looks fine (it's trivial) but applier should add doctests. [19:33] i'll take a look [19:34] #660 -- no doctests... [19:34] but it's right iff original is. [19:34] want to add a few doctests too it? [19:35] i'll do it. [19:36] #666 -- i'm looking at it now. [19:37] tornaria -- any ideas about that very nasty pari c-library bug issue? [19:37] I'm looking at it... had to sort out some issues at home (kids...) [19:38] :-) [19:38] I think that is the most interesting serious bug of the day. [19:38] ncalexan did you see it? http://trac.sagemath.org/sage_trac/ticket/710 [19:38] Very unprofessional. [19:39] Maybe one should try an old version of sage to see if it's still there... Has someone tried? [19:39] I tried 2.7 and it was there. [19:39] #643: I'm putting a div right around the main tables at the top [19:39] It would be wise to try 2.0 or so. [19:39] 710: urgh. [19:39] I don't have any ancient sage's around... [19:40] But they are easy to find on sage.math.washington.edu in people's home directories :-) [19:40] #725 -- burcin, I'm looking at your patch... [19:40] it's very simple.. [19:41] nice. great work! [19:42] I can't figure out where the big one in #621 comes from.. [19:43] 710: It does it on 2.5.3 (which I think is the oldest I have around) [19:43] there's another simple memleak fix in 559.. but that doesn't close any bugs.. [19:44] #621 is nasty. [19:44] #710 -- i want to fix that damn thing. [19:45] It is now the one open ticket in http://trac.sagemath.org/sage_trac/milestone/sage-2.8.4.3 [19:45] And it is nasty. [19:45] #710 -- I'm going to work on it right now. If anybody has any ideas, let me know. [19:45] One thing I did figure out is that if one does pari('factor(2^997-1)'), then press control c, [19:45] then import the lines about getting signals from sage/all.py, then SAGE does *not* segfault. [19:46] I'm compiling 1.0 and 2.0 [19:46] when the following control-c is pressed. Instead it ignored it. [19:46] The one thing that happens to me is this: [19:46] sage: gp.eval('factor(2^997-1)') [19:46] Interrupting GP/PARI interpreter... [19:46] Interrupting GP/PARI interpreter... [19:47] I.e. if I try gp.eval(...) thing (without doing the factor(..) first) [19:47] I press CTRL-C (ONCE) and I get that message twice [19:47] but nothing stops [19:47] For me it stops fine. [19:47] now if I press CTRL-C again (even after some time) then it stops with KeyboardInterrupt [19:47] All it does is send the control-c on to pari. [19:48] For me it stops right off. [19:48] I'm using 64-bit linux. [19:48] I'm 64-bit debian [19:48] #710 -- it is *not* present in sage-1.4 [19:48] I found a working version in /home/aklemm/sage-1.4 on sage.math [19:49] good.. [19:49] so hmmm. [19:49] that was a long long time ago though. [19:49] I wonder whether we should try to bisect the bug, or try to fix it by pure thought... :-) [19:49] But that is a definite hint. [19:49] I'm compiling 2.0 [19:49] (will abort 1.0) [19:50] (I'm abusing sage.math, anyway) [19:52] 1.4 used your pari_err code. [19:52] but I think martin albrecht totally rewrote interrupt.pxi to be vastly faster after sage-1.4. [19:52] So that's probably where the problem comes from. [19:53] I'll try using the old interrupt.pxi in sage-2.8* [19:53] (actually interrupt.h) [20:00] tornaria -- do you get the segfault with the newest version of Sage? [20:00] I just tried reverting all the interrupt stuff *just* for the pari c library. [20:00] #643: after I resolve the conflict with my example page js and the js from the notebook I should be able to easily fix this and make a patch [20:01] Interestingly everything *now* works -- i.e., this "fixes" #710 -- but I do have to hit control-c twice to interrupt [20:01] the gp.eval(...) line. [20:01] mmm... [20:01] But only the *first* time. [20:02] The _sig_on // _sig_off don't seem to be reentrant... are we sure they are not used nested? [20:02] then the first interrupt works. [20:02] there is a comment in the new interrupt.h.. [20:02] (I mean, they use a global _signal ) [20:02] they *should* never ever be used re-entrant. [20:02] But that could be a problem. [20:02] which says that if these _sig_{on,off} are not in pair, the program will segfault. [20:03] (actually, the pari_sig_on are also NOT reentrant, so...) [20:03] They are always in pairs surrounding pure C code that should never raise exceptions, etc. [20:03] #643 http://tclemans.nonlogic.org/snb/092007.html just div around head tables little change to css and some js [20:03] note that reverting to the older implementation of interrupt.* does fix the problem. [20:03] This must tell us something. [20:03] but one can always interrupt the c code.. as in this case.. [20:04] tclemans: I get a horizontal scroll bar on that HTML file. [20:05] hmm.. where do I get an old version of that file? [20:05] <-- boothby has left this server (Read error: 110 (Connection timed out)). [20:06] tclemans: Right, but there is a horizontal scrollbar for the worksheet area for me. [20:06] tclemans: I didn't know if that's supposed to be there. [20:09] tclemans: Weird, I guess I just never noticed it in the current notebook before. [20:12] #726 [20:15] It depends whether or not the file you were working on since the last upgrade changed. [20:15] hg_sage.pull() [20:15] regarding #710, I think I will just revert the interrupt handler to the old version and [20:15] get martin to try to fix the problem. [20:15] He was the one to totally rewrite the handler, so he might best be able to fix the problem.. [20:15] But, for the current code you get with hg_sage.pull(), you may need to install some extra packages ( flint and symmetrica ?) [20:16] Do "sage -upgrade". [20:19] william: ok on #710 [20:21] functionally the old and new interrupt code are supposed to be the same. The difference is that [20:21] the old code is faster. [20:21] I mean -- the new code is faster. [20:21] I know. The old code sets the signal handler each time. [20:21] that is slow. [20:21] --> boothby has joined this channel (n=boothby@D-69-91-159-227.dhcp4.washington.edu). [20:21] but maybe pari is playing with the signals somehow? [20:22] it shouldn't, but it's definitely possible. [20:22] that could cause a problem like we see. [20:22] It would be good to isolate things, etc. [20:22] I wonder if it's just control-c or other things that trigger the problem? [20:23] also, is it really related to expect? [20:24] pari('1/0') [20:24] then everything is messed up or seg faults. [20:24] uh... [20:25] even in sage-1.4 after pari('1/0') the gp.eval('factor(2^997-1)') afterwards would hang. [20:26] Yeah, email them to me at mhansen@gmail.com [20:27] mmmm.. [20:27] Is it an option that CTRL-C in gp.eval('factor(2^997-1)') is messing things and maybe longjmp'ing to the setjmp in pari('1/0') ? [20:27] or something like that... [20:28] gp.eval should have absolutely nothing at all to do with gen.pyx. It's pexpect interface to a separate process. [20:28] But -- what your suggesting is probably exactly what is actually happening. [20:28] I.e., that is what would happen if _sig_on were called twice say. [20:29] yep [20:29] or the signal handler is called before _sig_on (somehow) [20:29] Or after the last _sig_on has run out of scope. [20:30] (so its process stack is invalid) [20:30] if you do pari('factor(2^997-1)') repeatedly you can interrupt it over and over and it works fine. [20:30] Which suggests the signal handler has been set to the one for gen.pyx and not changed. [20:31] what I don't understand is why the problem only appears when using expect. [20:32] gonzalo -- try this. [20:32] tornaria -- try this. [20:32] Do pari('factor(2^997-1)'), then control-c [20:32] Then type "get_sigs()" [20:32] Then things work fine again. [20:32] william_stein: you could alter the _sig_on, _sig_off code to tell if you it is being called twice, just for testing. [20:32] good idea. how? [20:33] A global variable that counts up and down? [20:33] I wasn't thinking anything fancy, just a quick hack. [20:33] It's just a few lines of cython, if I recall. [20:33] good idea. [20:33] Can we print from _sig_on / _sig_off ? [20:34] where are they defined these days? [20:34] For debugging, no reason not to. [20:35] the function that handles sigint seems to be the same, before and after pari('factor(...)') [20:35] c_lib/interrupt.h [20:35] Another idea: have a sigsetjmp somewhere as close to main as possible, copy that jmp_buf to _signals.env in _sig_off [20:35] burcin -- that can't be. [20:36] I'm missing something.. [20:36] (so, siglongjmp'ing from outside _sig_on/_sig_off pair will jump to a predictable place. [20:36] signal.getsignal(2) should give you the handler.. no? [20:36] it might only be Python's view of the signal. [20:37] I.e., I'm not sure that it is necessarily right. [20:37] by the way, typing this is enough, since this just calls pari immediately: [20:37] sage: factor(2^997-1) [20:38] tclemans: Yeah, I'm doing the patches now. [20:40] For the record: there seems to be a potential race condition in interrupt.h (although I don't think it is causing the problem) [20:40] If I understand correctly, the _signals.mpio = 1+2 assignment tells the signal handler to use longjmp. [20:41] however, the sigsetmp is issued *after* that... It should be the other way around, I thin. [20:41] why? [20:41] william_stein: I get this now with symmetrica-0.3.1 /usr/bin/ld: /opt/sage-2.8.3.rc3/local//lib/libsymmetrica.a(boe.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC [20:41] Because if a signal is triggered between _signals.mpio = 1+2 and sigsetmp(_signals.env,1) [20:41] tornaria -- i get it. [20:41] That could definitely happen. [20:42] etc [20:42] i see. [20:42] (very unlikely, and #710 is too deterministic) [20:42] But on the other had, if you did it the other way around, wouldn't it be possible that a signal would cause a jump to the wrong place? [20:43] No -- since _sig_on/_sig_off can't be nested. [20:43] exactly. [20:43] and sigint would use the Python signal handler. [20:43] The assumption is that _signals.mpio = 0 at time of _sig_on [20:44] It's tie to do nick's suggestion. [20:44] william_stein: -fPIC is missing from make.unix for symmetrica-0.3.1 [20:44] is it needed? [20:45] Yeah, I get this error without it: [20:45] I get this now with symmetrica-0.3.1 /usr/bin/ld: /opt/sage-2.8.3.rc3/local//lib/libsymmetrica.a(boe.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC [20:45] ok, i'll add it in. [20:45] Did you remove it for the OS X issue? [20:46] sage -i symmetrica-0.3.2 [20:46] I didn't realize it got removed. I think I modifed make.unix in src/ then copied that to the patches directory, [20:46] hence overwriting your patched version of it. [20:47] Oh, I see. [20:47] What else did you do to it? [20:47] Just that. [20:47] I'm testing the build right now. [20:48] I guess I also added -O3 [20:48] 0.3.2 worked for me. [20:49] I've added -O3 for 0.3.3. [20:49] (_sig_on)(_sig_off)(_sig_str)(_sig_off)(_sig_on)(_sig_off)(_sig_off)(_sig_str)(_sig_off)(_sig_on)(_sig_off)(_sig_off)(_sig_str)(_sig_off)(_sig_on)(_sig_off)(_sig_off)(_sig_str)(_sig_off)(_sig_on)(_sig_off)(_sig_off)(_sig_on)(_sig_on)(_sig_off)(_sig_off)(_sig_on)(_sig_on)(_sig_off)(_sig_off)(_sig_str)(_sig_off)(_sig_on)(_sig_off)(_sig_off)(_sig_on)(_sig_on)(_sig_off)(_sig_off)(_sig_on)(_sig_on)(_sig_off)(_sig_off)(_sig_on) [20:49] This is JUST starting up sage... [20:50] what does that factor thing do!?!?!! i can't wait. [20:50] you can already see a nested _sig_on/_sig_off right before the prompt. [20:50] sh87)(*&t! [20:50] tclemans: What's the bug number? [20:50] there are at least a couple more. [20:50] mhansen_: 643 [20:51] Do you know how to obtain the current instruction pointer from C? [20:51] (i.e. I want to fprintf(stderr,"_sig_on(%p)", current_position) ) [20:52] Patch is up for #643. [20:52] no clue. [20:54] are those the sig things just from pari?! [20:54] I think so [20:55] It depends on whether you rebuilt just gen.pyx. [20:55] because I changed interrupt.h and touched libs/pari/*.py* [20:55] I'm trying now to see if I get similar results. [20:55] yep, replicated. [20:55] In fact, gp.eval(...) doesn't print the sig stuff... dunno what I have to rebuild [20:56] gp.eval doesn't involve _sig_on _sig_off in any way. [20:56] More curious is that pari('1/0') calls sig_str but no sig_off [20:56] Ah, I see there are a ton of _sig_on _sig_on repeats. [20:56] ah... [20:56] yep. [20:56] so parierror isn't calling sig_off. [20:57] yep... [20:57] that's the thing... [20:57] Then signal handler is trying to longjmp [20:57] I mean pari trap doesn't call _sig_off. [20:57] oops. [20:57] back to some place which has been invalidated. [20:57] yep. [20:57] I'm trying with _sig_off at the top of the errorhandler. [20:58] I guess that didn't show up before since the signal handlers where different or something. [20:58] i bet it didn't show up *as much*. [20:58] since there were so many handlers, maybe. [20:58] pari('1/0') is now ballanded for me, but pari('factor(...)') is *NOT*. [21:02] ok [21:02] inside the "sigsetmp(...)" [21:02] *anywhere* with the new sig handling code, if you hit control-c it doesn't call _sig_off. [21:03] just before return(0), you have to of course _sig_off [21:03] sage: m = random_matrix(ZZ,500,501) [21:03] sage: m.echelonize() [21:03] (I mean _signals.mpio = 0 ) [21:03] that fixes it. [21:03] because the signal handler does that. [21:03] or... doesn't like it should. [21:03] yep. [21:04] I bet that was in my old code... but martin messed it up. [21:04] tom: could you referee the 643 patch? http://sagetrac.org/sage_trac/attachment/ticket/643/643.patch [21:04] actually, it was not in my old code. [21:05] now, I'm still having to interrupt twice the "gp.eval('factor(2^997-1)') [21:05] yeah, I'll look at it. [21:05] OTOH, it doesn't happen like that on sage.math, so it's either [21:06] a) a problem with my build [21:06] b) just something I broke with all the debugging crap I added. [21:06] looks good to me. [21:08] 643 is now resolved as fixed [21:08] No. [21:08] Don't close bugs -- let William do that. [21:08] ok [21:08] reopened [21:08] Also -- what happens when you resize the window? [21:09] or change font size. [21:09] but your patch is still an improvement [21:09] I say apply the patch anyway... but work on the resize / font size change issues. [21:09] sounds good. [21:09] opps i forgot to change that to set_main_top() [21:10] there is a window.onresize i added [21:10] i just have setMain(); instead of set_main_top(); [21:11] tornaria -- can you replicate the following? [21:11] Do factor(2^997-1) and hit controlc [21:11] then do gp.eval('factor(2^997-1)') and hit controlc [21:11] then Do factor(2^997-1) and hit controlc ... it hangs. [21:12] william: yes, it hangs on me... [21:12] i bet it has to do with us calling _sig_on twice in a row by accident a few ties. [21:12] we've still a problem, since _pari_catch traps and returns without _sig_off [21:13] yep. [21:13] yep, since it called that code in the if before return(0); in interrupt.h [21:14] <-- roed_ has left this server. [21:14] tornaria -- I'm changing interrupt.h so additional calls to sig_on are ignored to see what happens... [21:15] ok, so the jmp_buf is always the "outer" one. [21:15] yep. [21:15] I'm changing pari_catch so it _sig_offs when it traps something. [21:15] not needed? [21:16] that didn't fix the hang. [21:16] i think it isn't needed. [21:16] 643: do i need to attach a new patch with the change from setMain() to set_main_top() ? [21:16] mine didn't fix the hang either. but it seems like a good idea (making it only the outer one). [21:16] but otherwise we miss one _sig_off, don't we? [21:17] hmm. [21:17] you're right. [21:17] Maybe Sage should just die if they aren't matched. [21:17] :-) [21:17] i.e., call PyErr as in interrupt.c [21:17] That's a good idea actually. [21:19] tclemans: yeah [21:19] put a note about it. [21:24] tornaria -- i'm writing code to detect unbalanced _sig_on off and raise an error when it happens. [21:25] good [21:25] done, I think. want it? [21:26] [Error] home/was/tmp/interrupt.h: Unknown command. [21:26] It's in /home/was/tmp/interrupt.h on sage.mat [21:27] will have a look. I actually have a few changes in interrupt.h myself. [21:27] yep. [21:28] check it out: [21:28] --> 526 self.poly = pari([]).Polrev() [21:28] 527 [21:28] 528 if x is None: [21:28] /home/was/s/local/bin/gen.pyx in gen.PariInstance.call() [21:28] : Unbalanced _sig_on/_sig_off [21:28] cool, eh! [21:28] uh... very good... :-) [21:29] cool!!! [21:29] check this out: [21:29] was@ubuntu:~$ sage -python [21:29] Python 2.5.1 (r251:54863, Sep 13 2007, 11:50:35) [21:29] [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 [21:29] Type "help", "copyright", "credits" or "license" for more information. [21:29] >>> import sage.libs.pari.gen [21:29] >>> sage.libs.pari.gen.pari('[]') [21:29] ok [21:30] >>> sage.libs.pari.gen.pari([]) [21:30] RuntimeError: Unbalanced _sig_on/_sig_off [21:30] gotcha! [21:30] good... hope this catches the factor(...) culprit... [21:30] >>> sage.libs.pari.gen.pari.vector(5) [21:31] goes boom! [21:31] that culprit doesn't have a chance against us. [21:34] <-- boothby has left this server (niven.freenode.net irc.freenode.net). [21:34] <-- tornaria has left this server (niven.freenode.net irc.freenode.net). [21:34] <-- jaap has left this server (niven.freenode.net irc.freenode.net). [21:35] --> boothby has joined this channel (n=boothby@D-69-91-159-227.dhcp4.washington.edu). [21:35] --> tornaria has joined this channel (n=tornaria@r190-0-137-63.dialup.adsl.anteldata.net.uy). [21:35] --> jaap has joined this channel (n=jaap@cc73571-a.emmen1.dr.home.nl). [21:35] wtf [21:35] <-- burcin has left this server (niven.freenode.net irc.freenode.net). [21:35] --> burcin has joined this channel (n=burcin@heim-032-216.raab-heim.uni-linz.ac.at). [21:35] wtf [21:37] tornaria. i got it. [21:37] Check out _new_gen. [21:37] It starts by calling _sig_on! [21:37] Damn it. [21:37] But it is called immediately by self.new_gen(...) [21:37] and there are very often _sig_on's right before self.new_gen(...) [21:38] (ok, I maybe got it) [21:40] tornaria -- if you delete the _sig_on in _new_gen, then all the unbalanced _sig_on/_sig_off's in startup go away. [21:42] Unfortunately, factor(2^997-1) can still be made to lock by hitting control-c during gp.eval('...') [21:42] <-- boothby has left this server ("leaving"). [21:45] when i do hg_sage.import_patch('643.patch') i get abort: no diffs found it is the patch that mhansen_ made [21:51] So.... I think the sage_signal_handler is being hijacked by pari... [21:51] I put a printf at the very top of sage_signal_handler [21:52] After the gp.eval(..) + CTRL-C, it shows as running the signal_handler, but only the first time! [21:52] i was just testing that too! [21:52] Try this -- put this line in interfaces/get_sigs.py in my_sigint: [21:52] import sage.ext.sig [21:52] sage.ext.sig.get_bad_sigs() [21:52] Then all known problems go away. [21:53] it's perfect now. [21:53] WOW. [21:54] weird -- get_bad_sigs calls init_csage... [21:55] which eventually calls setup_signal_handler(). [21:55] so I'm basically hacking around what you're really finding. [21:56] setup_signal_handler steals signal handlers back. [21:56] it works for me... [21:56] Nice work you two on tracking down the issue(s). Pretty impressive. [21:56] cool. [21:56] I'm excited. [21:56] This has been a major bug for a long time. [21:56] bah, I still need two CTRL-C in my box. [21:57] what is your box exactly? [21:57] your laptop? [21:57] (for interrupting gp.eval(...) ) [21:57] yes, my laptop, core 2 duo 64 bits. [21:57] for gp.eval I need that too. [21:57] That's completely reasonable. [21:57] well, not reasonable... but it's an unrelated problem, probably. [21:57] ok [21:57] I don't need two CTRL-C on sage.math. [21:57] does factor(2^997-1) always require one control-c [21:57] it's a timing sort of issue, I think. [21:57] yes, definitely only one control-C [21:58] great. we did it! [21:58] And just before the 10pm "deadline" :) [21:59] I bet make test will uncover lots of bugs with mismatched _sig_on/_sig_off!! [21:59] Yep found one already. [21:59] sage -t devel/sage-ranges/sage/rings/complex_double.pyx [21:59] do you guys want to help fix them? [21:59] actually, so far only 1. [21:59] so maybe not so exciting. [21:59] now that I come to think about it: aren't we supposed to reset signals when they are issued? [22:00] Yeah, sure, I'll help. But, I'll need a brief intro course on what exactly needs to be done to fix them. [22:01] I just pushed out the change to the official repo. [22:01] there are several segfaults too. [22:01] I mean, " Upon arrival of a signal with number signum the following happens. ... Finally, if the handler is [22:01] set to a function sighandler then first either the handler is reset to SIG_DFL or an implemen‐tation-dependent blocking of the signal..." [22:02] from signal(2) [22:02] This didn't use to be a problem since _sig_on would set all the signals anyway. [22:02] ah [22:04] --> roed_ has joined this channel (n=roed@RANDOM-FOUR-SEVENTY-FIVE.MIT.EDU). [22:05] --> tclemans951 has joined this channel (n=Miranda@68.178.77.126). [22:05] with my current fix for signals, this now seg faults: sage: k. = FiniteField(9); charpoly(a,'y') [22:05] IOW, one "simpler" fix could be to put "signal(sage_signal_handler, sig)" at some point in sage_signal_handler. [22:05] try it and see if it works. [22:11] sage: pari([2r,2r,1r]) [22:11] doesn't seem to work :-( [22:11] segfault [22:12] The "2r" means "raw integers", i.e., not preparsed. [22:12] this also fails: pari([2,2,1]) [22:12] does it fail for you? [22:12] It works. [22:12] ah, v=pari([1,2,3]) works. [22:12] so something in printing is broken. [22:12] But I have your hack disabled [22:13] (changed by my hack, which doesn't fix the problem) [22:13] ah, ok. [22:13] even with no change to get_sigs.py, I still have my problem. [22:13] I think it might be detecting mismatches sig_on/sig_off -- which causes a boom. [22:13] I don't have a problem, even reinstating your change to get_sigs.py [22:14] it's unrelated. [22:14] I don't have your code for detecting mismatches. [22:14] I wrote code to print out a traceback with _sig_on/_sig_off mismatches. [22:14] But of course printing a traceback in the middle of some weird code might just cause a problem and segfault. [22:14] yes, you told me to get it, but I didn't... :) [22:15] [Error] home/was/tmp/interrupt.h: Unknown command. [22:15] it's /home/was/tmp/interrupt.h on sage.math [22:15] i'm going to change it to also fprintf to stderr. [22:16] yep, the segfault is caused by a balance problem. [22:16] i posted a new version. [22:17] you have to be sure to touch gen.pyx [22:17] <-- wstein has left this server (Read error: 110 (Connection timed out)). [22:17] there is an extra _sig_on in GEN_to_str... [22:18] getting rid of that fixes the problem. [22:19] but I want a _sig_on there, so users can control-c out of str(pari(big thing)) [22:19] <-- tclemans has left this server (Read error: 110 (Connection timed out)). [22:21] you know, it doesn't matter if there are two _sig_on's in a row. [22:21] <-- roed_ has left this server (Read error: 110 (Connection timed out)). [22:21] --> wstein has joined this channel (n=was@c66-235-37-221.sea2.cablespeed.com). [22:21] The key thing is just that there is a _sig_off. [22:22] right? [22:22] mmm... [22:22] It *used* to matter with my old signal handler, since that just used "the last one". [22:22] <-- tclemans951 has left this server (Read error: 104 (Connection reset by peer)). [22:22] So, current _sig_on only remembers the outer call. [22:23] I'm still fuzzy. [22:23] But I don't think they have to be exactly ballanced. [22:23] Maybe it remembers only the innermost call? [22:23] well... sig_off is idempotent, so... [22:23] oh -- you're right, because of the if I added. [22:24] However, this will still be problematic, i.e.: [22:24] (1) _sig_on [22:24] (2) _sig_on [22:24] (2) _sig_off [22:24] why/ [22:24] (3) _sig_on [22:24] (3) _sig_off [22:24] (1) _sig_off [22:25] This is a perfectly balanced example. The numbers are the stack context. [22:25] It's meant that (2) is below (1) and (3) is also below (1), but (2) and (3) are "parallel" [22:25] (so stack context 2 is invalid while executing (3) [22:26] When you call _sig_off in (2), you are setting _signals.mpio = 0, then when you call _sig_on from (3), you think "there's no handler active, lets install one" [22:26] But then it would be as if there were no _sig_on/_sig_off code for part of (1). [22:26] actually, it's fine... when you (3) _sig_off you disable. [22:27] Yes, the problem is that after the first _sig_off you are not catching anymore. [22:27] yep. [22:27] Now, the other thing is to have a nest counter. [22:27] If I have a block of C code and I do _sig_on ... _sig_on ... _sig_on and at the end _sig_off, [22:27] only _sig_on at 0 [22:27] that is fine. [22:27] only _sig_off at 0. [22:28] Code with _sig* currently never calls into other functions that are *python* and involve _sig_, and expect [22:28] them to not call _sig. [22:29] --> roed_ has joined this channel (n=roed@c-24-128-48-246.hsd1.ma.comcast.net). [22:35] tornaria -- shall we declare partial victory. [22:35] yep :-) [22:35] then I declare SAGE Bug Day 3 over and a success :-) [22:36] I tried signal(sig, sage_signal_handler) in sage_signal_handler again [22:36] (w/o your hack in my_sigint) [22:36] what happened? [22:36] and it works... [22:36] which hack? [22:36] oh, i know. [22:36] that's better. [22:36] the one of calling get_bad_sigs [22:36] where precisely did you put it? [22:36] two places: [22:37] one right before comment "//where to go next?" [22:38] the second right before the second-to-last closing brace [22:38] (i.e. as late as possible, in each branch of the if(_signals.mpio && 1) ) [22:38] i just accidently clicked "snapshot" in my vmware image and i can't work for a minute... [22:38] :) [22:38] ok, back. [22:38] ? [22:40] //notify 'calling' function [22:40] [22:40] _signals.mpio |= 4; [22:40] [22:40] + signal(sig, sage_signal_handler); [22:40] + [22:40] //where to go next? [22:40] testing. [22:40] - if ( _signals.mpio && 2 ) { [22:40] + if ( _signals.mpio & 2 ) { [22:40] This is a piece of the patch... (first case) [22:40] && versus &? [22:40] Note also the && 2 , should be & 2 [22:40] interesting. [22:40] (it means to test bit 1) [22:40] yep [22:41] @@ -85,6 +92,8 @@ void sage_signal_handler(int sig) { [22:41] _signals.python_handler(sig); [22:41] break; [22:41] }; [22:41] + [22:41] + signal(sig, sage_signal_handler); [22:41] } [22:41] } [22:41] that's the other part... [22:41] worksforme [22:41] if(_signals.mpio && 2) is effectively the same as if(_signals.mpio) [22:42] however, the only places where _signals.mpio are set the values are either 1+2 or 0 [22:42] so it is really the same. :-) [22:42] AFAICT [22:43] i've closed #710 [22:43] good :-) [22:43] now I can release sage-2.8.4.3. [22:44] congrats... [22:44] at least after testing, etc. [22:44] It should really be 2.8.5, actually. [22:44] since there is so much that is new (e.g., 20,000 lines of combinatorics code). [22:44] several new packages, ec. [22:44] at least symmetrica. [22:45] I'm making an alpha0 tarball right now, to start building and testing on a bunch of machines, then going home. [22:46] good... [22:46] Is there a way to upgrade rather than starting over with the 150Mb download? [22:47] (I have 3Gb / month quota here...) [22:47] yes. [22:47] Just do "sage -upgrade" followed by "hg_sage.pull()" and "hg_scripts.pull()" and hg_doc.pull()". [22:47] Should be close enough. [22:48] but wait a second. [22:48] ok. [22:48] ok. [22:48] try now. [22:48] What about the having to hit CTRL-C twice in gp.eval(...) ? Is that reported? [22:48] make that a new ticket. [22:49] This is scary: [22:49] WARNING WARNING [22:49] WARNING WARNING [22:49] WARNING WARNING [22:49] WARNING WARNING [22:49] using frickin' slow GSL C-blas [22:49] WARNING WARNING [22:49] WARNING WARNING [22:49] WARNING WARNING [22:49] WARNING WARNING [22:49] you don't have atlas devel libraries? [22:49] WARNING WARNING [22:49] :-) [22:49] --> janwil has joined this channel (n=janwil@tartu.cyber.ee). [22:49] nope, didn't need them for anything. [22:49] gsl works fine; it's just slow for numerical linear algebra. [22:49] good morning [22:50] hi [22:51] apt-get atlas3-base-dev wants to install gcc-3.4 [22:51] how has the BD progressed this far? [22:51] (I have gcc 4.1.2 / etch) [22:51] we have an atlas spkg, but it takes a while (=30 minutes or so) to build. [22:52] it's in the optionall packages, I think. [22:52] don't need that for anything... :-) [22:52] janwil -- bd is now over. [22:52] I'll post the log in a moment. [22:52] See http://trac.sagemath.org/sage_trac/milestone/sage-2.8.5 }}}