Re: [sage-devel] Re: how does the res/mod in "geng" work?
On Thursday, March 21, 2019 at 10:06:26 PM UTC-7, Ai Bo wrote: > > Sorry for not being clear. > I meant I used geng —help. > Apparently, the equal divide doesn’t help in my example case. > Where is this geng.c file? If I modify geng.c, how should I build geng? > It's part of nauty. > On Thu, Mar 21, 2019 at 9:58 PM John H Palmieri > wrote: > >> >> >> On Thursday, March 21, 2019 at 9:38:03 PM UTC-7, Ai Bo wrote: >>> >>> Saw this in the document: >>> res/mod : only generate subset res out of subsets 0..mod-1 >>> >> >> It would help if you gave some context for this. I'm guessing that most >> Sage users won't know what "geng" is. I certainly didn't. I found by >> searching the source code that you found this help message in the method >> "nauty_geng" in graph_generators.py: you should have said this at the start >> instead of just "saw this in the document". This makes it look like the >> program "geng" comes from nauty. Now look at the nauty source code (there >> is a tar file in the "upstream" directory, if you have a source code >> version of Sage, also available at >> http://files.sagemath.org/spkg/upstream/nauty/index.html). The nauty >> manual says >> >> res/mod : only generate subset res out of subsets 0..mod-1 >> >> and >> >> See program text for much more information. >> >> The file geng.c says >> >> mod, res = a way to restrict the output to a subset. >> All the graphs in G(n,mine..maxe) are divided >> into >> disjoint classes C(0,mod),C(1,mod),...,C(mod-1, >> mod), >> of very approximately equal size. >> Only the class C(res,mod) is written. >> >> If the -x or -X switch is used, they must have >> the >> same value for different values of res; >> otherwise >> the partitioning may not be valid. In this case >> (-x,-X with constant value), the usual >> relationships >> between modulo classes are obeyed; for example >> C(3,4) = C(3,8) union C(7,8). This is not true >> if 3/8 and 7/8 are done with -x or -X values >> different from those used for 3/4. >> >> >> >>> >>> How is the output divided? >>> >>> I tried with : ../sage-8.6/local/bin/geng 6 -C 0/7 >>> and then I iterated from 0/7, 1/7, 2/7, 3/7 >>> Why the output is 27, 21, 7, 1, 0, 0, ... >>> >>> How is the subset generated? >>> >>> Thank you. >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "sage-devel" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/sage-devel/FJZoODSZK3Q/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> sage-devel+...@googlegroups.com . >> To post to this group, send email to sage-...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/sage-devel. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: how does the res/mod in "geng" work?
Sorry for not being clear. I meant I used geng —help. Apparently, the equal divide doesn’t help in my example case. Where is this geng.c file? If I modify geng.c, how should I build geng? On Thu, Mar 21, 2019 at 9:58 PM John H Palmieri wrote: > > > On Thursday, March 21, 2019 at 9:38:03 PM UTC-7, Ai Bo wrote: >> >> Saw this in the document: >> res/mod : only generate subset res out of subsets 0..mod-1 >> > > It would help if you gave some context for this. I'm guessing that most > Sage users won't know what "geng" is. I certainly didn't. I found by > searching the source code that you found this help message in the method > "nauty_geng" in graph_generators.py: you should have said this at the start > instead of just "saw this in the document". This makes it look like the > program "geng" comes from nauty. Now look at the nauty source code (there > is a tar file in the "upstream" directory, if you have a source code > version of Sage, also available at > http://files.sagemath.org/spkg/upstream/nauty/index.html). The nauty > manual says > > res/mod : only generate subset res out of subsets 0..mod-1 > > and > > See program text for much more information. > > The file geng.c says > > mod, res = a way to restrict the output to a subset. > All the graphs in G(n,mine..maxe) are divided into > disjoint classes C(0,mod),C(1,mod),...,C(mod-1,mod > ), > of very approximately equal size. > Only the class C(res,mod) is written. > > If the -x or -X switch is used, they must have > the > same value for different values of res; otherwise > the partitioning may not be valid. In this case > (-x,-X with constant value), the usual > relationships > between modulo classes are obeyed; for example > C(3,4) = C(3,8) union C(7,8). This is not true > if 3/8 and 7/8 are done with -x or -X values > different from those used for 3/4. > > > >> >> How is the output divided? >> >> I tried with : ../sage-8.6/local/bin/geng 6 -C 0/7 >> and then I iterated from 0/7, 1/7, 2/7, 3/7 >> Why the output is 27, 21, 7, 1, 0, 0, ... >> >> How is the subset generated? >> >> Thank you. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "sage-devel" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sage-devel/FJZoODSZK3Q/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: how does the res/mod in "geng" work?
On Thursday, March 21, 2019 at 9:38:03 PM UTC-7, Ai Bo wrote: > > Saw this in the document: > res/mod : only generate subset res out of subsets 0..mod-1 > It would help if you gave some context for this. I'm guessing that most Sage users won't know what "geng" is. I certainly didn't. I found by searching the source code that you found this help message in the method "nauty_geng" in graph_generators.py: you should have said this at the start instead of just "saw this in the document". This makes it look like the program "geng" comes from nauty. Now look at the nauty source code (there is a tar file in the "upstream" directory, if you have a source code version of Sage, also available at http://files.sagemath.org/spkg/upstream/nauty/index.html). The nauty manual says res/mod : only generate subset res out of subsets 0..mod-1 and See program text for much more information. The file geng.c says mod, res = a way to restrict the output to a subset. All the graphs in G(n,mine..maxe) are divided into disjoint classes C(0,mod),C(1,mod),...,C(mod-1,mod), of very approximately equal size. Only the class C(res,mod) is written. If the -x or -X switch is used, they must have the same value for different values of res; otherwise the partitioning may not be valid. In this case (-x,-X with constant value), the usual relationships between modulo classes are obeyed; for example C(3,4) = C(3,8) union C(7,8). This is not true if 3/8 and 7/8 are done with -x or -X values different from those used for 3/4. > > How is the output divided? > > I tried with : ../sage-8.6/local/bin/geng 6 -C 0/7 > and then I iterated from 0/7, 1/7, 2/7, 3/7 > Why the output is 27, 21, 7, 1, 0, 0, ... > > How is the subset generated? > > Thank you. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: [sage-cell] Re: Is sagecell python3-ready?
On Friday, March 22, 2019 at 12:56:58 AM UTC+9, Andrey Novoseltsev wrote: > > "languages" for SageMathCell are very different from kernels for Jupyter. > SageMathCell keeps a bunch of preforked kernels (all are the same) > And a new kernel is created for each interact cell. Right? This seems to me a very bad architectural weakness of SageMathCell. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] how does the res/mod in "geng" work?
Saw this in the document: res/mod : only generate subset res out of subsets 0..mod-1 How is the output divided? I tried with : ../sage-8.6/local/bin/geng 6 -C 0/7 and then I iterated from 0/7, 1/7, 2/7, 3/7 Why the output is 27, 21, 7, 1, 0, 0, ... How is the subset generated? Thank you. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: [sage-cell] Re: Is sagecell python3-ready?
When I was actively using SageMathCell for teaching, I indeed got quite irritated that things that used to work during preparation did not work in class because of some recent changes. My eventual solution was to run my own server, where no changes were ever unexpected and in general I had better stability. I think this is still the way to go for those who want to be certain that things will work, although I have a feeling that not very many people are doing it. Python version change is likely to be the most disruptive one, so it may make sense to do it only during the summer or around New Year, so that we don't cause major disruptions in the middle of the course. Perhaps UTMOST people may chime in with their predictions on how bad the transition would be? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: [sage-cell] Re: Is sagecell python3-ready?
On Thursday, March 21, 2019 at 8:56:58 AM UTC-7, Andrey Novoseltsev wrote: > > "languages" for SageMathCell are very different from kernels for Jupyter. > SageMathCell keeps a bunch of preforked kernels (all are the same), so that > new computations don't have to wait for startup. "language" just turns > "code" into something like "print octave.eval(code)", which is then sent to > the same kernels as Sage. Supporting Python2 and Python3 kernels > simultaneously would require substantial adjustments to how kernels and > languages are managed. > Ouch, I see. We'd need at least two pools of kernels, rather than one in that case. A big advantage would be that it allows us to switch default and still have the other method available (if people can find the language switch). For that reason, I would think it might lead to a slightly smoother transition for cases where people have developed pages with cells embedded (which is what I usually do if I use sagecell in a class demo): language switching can be done on the page itself (provided one hasn't stripped away the language selector, which I realize I have usually done :-(). Changing the server definitely requires editing the HTML page, so that is never going to happen in the class room. The one thing that might save you there is the "share" button that comes with the (at this moment probably "error") output, where repointing the URL might be an option. I think it's worth considering if investing in having a py2 pool as well as a py3 pool of kernels available will help transition sufficiently to justify the cost. For me personally: I'm now on alert that I should always check sagecell demos before taking them to class. Whatever we do, we should make sure that there's a stable way of doing something over any semester-long period (and make it easy to find how to do that!). Tripping up people between their lecture prep and their lecture performance is just evil. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Suggestion to speed up nauty_geng()?
On Thu, 21 Mar 2019 18:42 Ai Bo, wrote: > I found it. Thank you. > I also tried the command listed above. > I am confused. Where is this "I]~~w"? > This is a particular way to encode graph as a string of characters (8 bits per character). Read Sage docs on Graph for details. Is it a file? How did Graph load this? > > In my program, my code looks like this: > i=12 > for G in graphs.nauty_geng(str(i) + " -C"): > q = True > for j in range (0,i): > S = Sandpile(G,j) > if S.identity() != S.max_stable(): > q = False > break > > > > If I use geng to generate graphs, how should I load them in my for loop so > I can check with Sandpile? > Ideally one should create a fast interface from Python to geng, probably using Cython, if it is not already done. > On Thursday, March 21, 2019 at 8:46:56 AM UTC-7, Dima Pasechnik wrote: >> >> On Thu, Mar 21, 2019 at 3:03 PM Ai Bo wrote: >> >> > is this "nauty26r7/geng" a program available? >> >> geng is installed in local/bin/ sub-directory of your Sage >> installation, as a part of Sage's standard package nauty. >> >> > Also, as Python is slow, any part of the nautygen can be written in >> other language, such as C/C++? >> >> it is written in C, so it's quite fast in this sense. >> >> > >> > Thanks, >> > Laura >> > >> > On Wednesday, March 20, 2019 at 11:48:38 PM UTC-7, Jori Mäntysalo (TAU) >> wrote: >> >> >> >> On Thu, 21 Mar 2019, Ai Bo wrote: >> >> >> >> > Is there a way to "random access"? For example, access the nth >> element >> >> > in the "generator", instead of one by one? >> >> >> >> Kind of. As a most time is propably spent by creating Python data >> >> structures for SageMath, you can use nautygen directly to generate >> huge >> >> number of graphs. >> >> >> >> As an example, it takes below 5 seconds to generate all biconnected >> graphs >> >> on 10 vertices, and I took third last one: >> >> >> >> $ nauty26r7/geng 10 -C | tail -3 | head -1 >> >> >A /home/jm58660/lat-koe/nauty26r7/geng -Cd2D9 n=10 e=10-45 >> >> >Z 9743542 graphs generated in 4.59 sec >> >> I]~~w >> >> >> >> and now >> >> >> >> sage: g = Graph('I]~~w', format='graph6') >> >> sage: g.is_biconnected() >> >> True >> >> >> >> >> >> -- >> >> Jori Mäntysalo >> >> >> >> Tampereen yliopisto - Ihminen ratkaisee >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "sage-devel" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to sage-devel+...@googlegroups.com. >> > To post to this group, send email to sage-...@googlegroups.com. >> > Visit this group at https://groups.google.com/group/sage-devel. >> > For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Suggestion to speed up nauty_geng()?
I found it. Thank you. I also tried the command listed above. I am confused. Where is this "I]~~w"? Is it a file? How did Graph load this? In my program, my code looks like this: i=12 for G in graphs.nauty_geng(str(i) + " -C"): q = True for j in range (0,i): S = Sandpile(G,j) if S.identity() != S.max_stable(): q = False break If I use geng to generate graphs, how should I load them in my for loop so I can check with Sandpile? On Thursday, March 21, 2019 at 8:46:56 AM UTC-7, Dima Pasechnik wrote: > > On Thu, Mar 21, 2019 at 3:03 PM Ai Bo > > wrote: > > > is this "nauty26r7/geng" a program available? > > geng is installed in local/bin/ sub-directory of your Sage > installation, as a part of Sage's standard package nauty. > > > Also, as Python is slow, any part of the nautygen can be written in > other language, such as C/C++? > > it is written in C, so it's quite fast in this sense. > > > > > Thanks, > > Laura > > > > On Wednesday, March 20, 2019 at 11:48:38 PM UTC-7, Jori Mäntysalo (TAU) > wrote: > >> > >> On Thu, 21 Mar 2019, Ai Bo wrote: > >> > >> > Is there a way to "random access"? For example, access the nth > element > >> > in the "generator", instead of one by one? > >> > >> Kind of. As a most time is propably spent by creating Python data > >> structures for SageMath, you can use nautygen directly to generate huge > >> number of graphs. > >> > >> As an example, it takes below 5 seconds to generate all biconnected > graphs > >> on 10 vertices, and I took third last one: > >> > >> $ nauty26r7/geng 10 -C | tail -3 | head -1 > >> >A /home/jm58660/lat-koe/nauty26r7/geng -Cd2D9 n=10 e=10-45 > >> >Z 9743542 graphs generated in 4.59 sec > >> I]~~w > >> > >> and now > >> > >> sage: g = Graph('I]~~w', format='graph6') > >> sage: g.is_biconnected() > >> True > >> > >> > >> -- > >> Jori Mäntysalo > >> > >> Tampereen yliopisto - Ihminen ratkaisee > > > > -- > > You received this message because you are subscribed to the Google > Groups "sage-devel" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to sage-devel+...@googlegroups.com . > > To post to this group, send email to sage-...@googlegroups.com > . > > Visit this group at https://groups.google.com/group/sage-devel. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Suggestion to speed up nauty_geng()?
I found it. Thank you. I also tried the command listed above. I am confused. Where is this "I]~~w"? Is it a file? How did Graph load this? In my program, my code looks like this: i=12 for G in graphs.nauty_geng(str(i) + " -C"): q = True for j in range (0,i): S = Sandpile(G,j) if S.identity() != S.max_stable(): q = False break If I use geng to generate graphs, how should I load them in my for loop so I can check with Sandpile? Sorry for being new in Sagemath. Thank you all for the help. On Wednesday, March 20, 2019 at 9:33:26 PM UTC-7, Ai Bo wrote: > > I am running a program with these lines: > i =12 > for G in graphs.nauty_geng(str(i) + " -C"): > > It is very slow. I know the returned generator is very large. Is there a > way to speed this up? > > Is there a way to "random access"? For example, access the nth element in > the "generator", instead of one by one? > > Thank you! > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] The future of the Mac Application on Mojave
On Wed, 20 Mar 2019 14:08 Ivan Andrus, wrote: > On Mar 19, 2019, at 4:01 AM, dimp...@gmail.com wrote: > > > Hi Ivan, > thanks for looking into this. > On Mon, Mar 18, 2019 at 06:25:53PM -0700, Ivan Andrus wrote: > > I haven't worked on Sage for quite a while, but it was brought to my > attention (thanks Karl-Dieter), that the Mac application no longer works > on > Mojave. I believe this has to do with the fact that the application isn't > signed by a registered developer. I say this because starting it from the > command line (e.g. $ /Applications/SageMath-8.5.app/Contents/MacOS/Sage) > starts > up instantly and, as near as I can tell, perfectly. However, when I > double > click in the Finder, it gets stuck (for a very long time--maybe 10 > minutes) > in _LSResolveAllQuarantineItems(...) in [NSWorkspace > openFile:withApplication:andDeactivate:]. Ten minutes may not be forever, > but it's certainly longer than we should require people to wait, > especially > given that it's every time they launch the app. > > This explains that weird delays people mentioned which using the app, > another "clever" OSX joke... > > I can think of a few options that might be able to solve the problem: > > 1. We could start signing the code. However, I don't think signing it > will be possible since one of the first things that happens when running > sage is that it changes the paths embedded in certain executables (at > least > that's what I remember). Changing anything in the application (code or > resources [1]) would invalidate the signing, so I think that's out. > > > it's a technological problem here: as LD_LIBRARY_PATH using was no > longer possible on OSX (and it's a hassle anyway), Volker's > https://github.com/sagemath/binary-pkg > builds a distribution with paths being templates, that are replaced > with actual paths once the installation is known. > > What would be the correct way to achieve this on OSX? > Simply assume that Sage must be installed in /Applications/SageMath > and build the distibution with the whole absolute paths known in > advance -- surely this could be signed then, no? > Or there is something more clever? > > > That's an option I hadn't thought of. It seems pretty restrictive to me, > but probably most people install it there anyway. > My admittedly limited experience with Mac OS apps is that they are restricted to installing to a fixed location on a volume, at most one can choose the volume to install to. E.g. python.org python installers install on the boot volume in /Applications/. I think advanced users who need more than one copy of Sage can just use a non-app installer. > > 2. We may be able to replace our use of [NSWorkspace > openFile:withApplication:andDeactivate:] with something else, perhaps > using > system(). I haven't tried this, so I have no idea if it will work. > 3. We could move to a two-item approach in which we provide the app > *without* sage embedded inside it (so it's very small and could be > signed, or not), and then we provide the sage distribution separately > (could be in the same dmg file, just not embedded). For a long time, the > application has had the ability to use to any sage installation. > However, > it might be difficult to automatically point people to the latest > installation (i.e. they would have to go into the app preferences and > change it themselves). We could offer some sort of installer that would > copy the sage distribution and make that change for the current user. > Perhaps sysadmins could just create a symlink to the latest or > something. > I'm not sure what problems we've seen people have in this area. Also, > you > would probably lose the ability to run multiple versions of the app to > quickly switch back and forth. > 4. Create an AppleScript (or Terminal) launcher that just runs a > variation of the script below [2] rather than starting the app directly. > This seems to work fine, but is somewhat annoying to need a different > launcher. This can hopefully work as a stop-gap for those who have this > problem right now. > > In my opinion #3 is the most promising. How bad is #3 from a user > experience perspective? I used to always run it that way, so it's not a > problem for me, but I've been out of the loop for a while, and my > experience might not be typical. What problems do people foresee with > integrating any of these with the build system? Right now I'm not able to > build sage. I haven't dug into why, but I can if need be. Unfortunately, > I don't know how much time I'll be able to devote to working on this so > any > help would be appreciated. > > > Another still not completely resolved, issue is openssl. The current > Python.org' Python OSX installer papers over it in a laughable (IMHO) > way: https://bugs.python.org/issue36344 > (TLDR: they package fully functional pip, with all certs etc. as > well as openssl, broken by not having cert.pem in the right place, and > "fix" this
[sage-devel] Re: [sage-cell] Re: Is sagecell python3-ready?
"languages" for SageMathCell are very different from kernels for Jupyter. SageMathCell keeps a bunch of preforked kernels (all are the same), so that new computations don't have to wait for startup. "language" just turns "code" into something like "print octave.eval(code)", which is then sent to the same kernels as Sage. Supporting Python2 and Python3 kernels simultaneously would require substantial adjustments to how kernels and languages are managed. An alternative I mentioned at sage-cell is to have different domain names for servers running different versions. Since we currently have 2 servers, it is doable, but we will loose redundancy. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Suggestion to speed up nauty_geng()?
On Thu, Mar 21, 2019 at 3:03 PM Ai Bo wrote: > is this "nauty26r7/geng" a program available? geng is installed in local/bin/ sub-directory of your Sage installation, as a part of Sage's standard package nauty. > Also, as Python is slow, any part of the nautygen can be written in other > language, such as C/C++? it is written in C, so it's quite fast in this sense. > > Thanks, > Laura > > On Wednesday, March 20, 2019 at 11:48:38 PM UTC-7, Jori Mäntysalo (TAU) wrote: >> >> On Thu, 21 Mar 2019, Ai Bo wrote: >> >> > Is there a way to "random access"? For example, access the nth element >> > in the "generator", instead of one by one? >> >> Kind of. As a most time is propably spent by creating Python data >> structures for SageMath, you can use nautygen directly to generate huge >> number of graphs. >> >> As an example, it takes below 5 seconds to generate all biconnected graphs >> on 10 vertices, and I took third last one: >> >> $ nauty26r7/geng 10 -C | tail -3 | head -1 >> >A /home/jm58660/lat-koe/nauty26r7/geng -Cd2D9 n=10 e=10-45 >> >Z 9743542 graphs generated in 4.59 sec >> I]~~w >> >> and now >> >> sage: g = Graph('I]~~w', format='graph6') >> sage: g.is_biconnected() >> True >> >> >> -- >> Jori Mäntysalo >> >> Tampereen yliopisto - Ihminen ratkaisee > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: [sage-cell] Re: Is sagecell python3-ready?
One thing that comes to mind beyond/independent of preparser tricks (which can be hard to make robust): sagecell already has a lot of "languages". Would it be possible to have sage-py2 and sage-py3 as languages? We could then start out having "sage" as an alias to sage-py2. At some point we can change over the default. At that point, people can "fix" problems by setting the language to sage-py2. Once we've had that for a while, we can remove sage-py2. At that point we should probably keep sage and sage-py3 as aliases because changing them would cause further breakage. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Fwd: [sage-cell] Re: Is sagecell python3-ready?
On sage-cell, Py3 was brought up. I mentioned how permalinks there may cause trouble at the eventual Py3 changeover for Sage, since at the very least print statements will be gone. William brings up an interesting possibility, and I wonder how/whether this would be useful for Sage proper. A lot of broken code overnight won't make anyone happy; I don't know how easy to use the various converters Py2->Py3 are to use for non-sage-devel people who might just have some random scripts or Sage/Jupyter notebook worksheets. Anyway, hopefully people might have useful commentary on a broader email list, thanks! - kcrisman > Along these lines, it occurs to me that if/when Sage switches to Py3, > > "when", I hope! E.g., I personally always use the python3 version of > Sage, and it works well for me. > > > there will be a lot of broken permalinks - especially if people used > "print blah" instead of "print(blah)". Is there any way to avoid this? > > It could be avoided using the preparser, with a deprecation warning > printed. There's probably a trac ticket about this somewhere. > > William > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Suggestion to speed up nauty_geng()?
Another question: If I use nautygen and generate huge number of graph, how do I load into sage? Because in my for loop, I also use other functions such as Sandpile on the graph generated by nautygen. Thanks, On Wed, Mar 20, 2019 at 11:48 PM Jori Mäntysalo (TAU) < jori.mantys...@tuni.fi> wrote: > On Thu, 21 Mar 2019, Ai Bo wrote: > > > Is there a way to "random access"? For example, access the nth element > > in the "generator", instead of one by one? > > Kind of. As a most time is propably spent by creating Python data > structures for SageMath, you can use nautygen directly to generate huge > number of graphs. > > As an example, it takes below 5 seconds to generate all biconnected graphs > on 10 vertices, and I took third last one: > > $ nauty26r7/geng 10 -C | tail -3 | head -1 > >A /home/jm58660/lat-koe/nauty26r7/geng -Cd2D9 n=10 e=10-45 > >Z 9743542 graphs generated in 4.59 sec > I]~~w > > and now > > sage: g = Graph('I]~~w', format='graph6') > sage: g.is_biconnected() > True > > > -- > Jori Mäntysalo > > Tampereen yliopisto - Ihminen ratkaisee > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sage-devel" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sage-devel/QoqD5Ka6068/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Suggestion to speed up nauty_geng()?
is this "nauty26r7/geng" a program available? Also, as Python is slow, any part of the nautygen can be written in other language, such as C/C++? Thanks, Laura On Wednesday, March 20, 2019 at 11:48:38 PM UTC-7, Jori Mäntysalo (TAU) wrote: > > On Thu, 21 Mar 2019, Ai Bo wrote: > > > Is there a way to "random access"? For example, access the nth element > > in the "generator", instead of one by one? > > Kind of. As a most time is propably spent by creating Python data > structures for SageMath, you can use nautygen directly to generate huge > number of graphs. > > As an example, it takes below 5 seconds to generate all biconnected graphs > on 10 vertices, and I took third last one: > > $ nauty26r7/geng 10 -C | tail -3 | head -1 > >A /home/jm58660/lat-koe/nauty26r7/geng -Cd2D9 n=10 e=10-45 > >Z 9743542 graphs generated in 4.59 sec > I]~~w > > and now > > sage: g = Graph('I]~~w', format='graph6') > sage: g.is_biconnected() > True > > > -- > Jori Mäntysalo > > Tampereen yliopisto - Ihminen ratkaisee -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Suggestion to speed up nauty_geng()?
Hi! Does either of you plan to open a ticket and make the functionality available, that according to Jori is present in nauty but according to Ai isn't wrapped in Sage? Best regards, Simon On 2019-03-21, Jori Mäntysalo wrote: > On Thu, 21 Mar 2019, Ai Bo wrote: > >> Is there a way to "random access"? For example, access the nth element >> in the "generator", instead of one by one? > > Kind of. As a most time is propably spent by creating Python data > structures for SageMath, you can use nautygen directly to generate huge > number of graphs. > > As an example, it takes below 5 seconds to generate all biconnected graphs > on 10 vertices, and I took third last one: > > $ nauty26r7/geng 10 -C | tail -3 | head -1 >>A /home/jm58660/lat-koe/nauty26r7/geng -Cd2D9 n=10 e=10-45 >>Z 9743542 graphs generated in 4.59 sec > I]~~w > > and now > > sage: g = Graph('I]~~w', format='graph6') > sage: g.is_biconnected() > True > > > -- > Jori Mäntysalo > > Tampereen yliopisto - Ihminen ratkaisee > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.