On Tue, Dec 8, 2015 at 2:41 PM, William Stein <wst...@gmail.com> wrote: > On Tue, Dec 8, 2015 at 4:05 AM, Paul Leopardi <paul.leopa...@gmail.com> wrote: >> I have created a large worksheet at >> https://cloud.sagemath.com/projects/3c2a9143-d685-410f-995c-28f44056999f/files/bent-functions-duals-Cayley-graphs.sagews >> with a public copy at >> https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/bent-functions-duals-Cayley-graphs.sagews >> It contains a mix of quick and slow calculations. >> >> When I try to run the worksheet by using CTRL-A then hitting the run button, >> it does not consistently run all cells in order. Sometimes the run skips >> cells, causing errors in later cells. Sometimes the run seems to hang on a >> long calculation. Is this a known bug? > > They should definitely all run in order... but looking at the relevant code > > > https://github.com/sagemathinc/smc/blob/master/src/smc-webapp/sagews.coffee#L1603 > > I'm not 100% sure that something might go wrong (due to this being
Looking at the code again, I can't see how it wouldn't work. I made a worksheet to test the order in which things run, and I can't seem to replicate the problem you noticed: https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-12-08-171850-order.sagews Is this something you're sure is happening? It's not been reported before. > asynchronous code), but I can change the code to make it more robust, > and have created a very high priority ticket to do so: > > https://github.com/sagemathinc/smc/issues/320 > >> How do I move the function definition portion of my worksheet to a module? > > The simplest thing to do is to copy the code to a file with a name > like "foo.sage". Then type > > %load foo.sage > > in the worksheet. It'll be almost identical to running the code in > foo.sage directly in a worksheet. (However, things like %md, %r, etc > don't work.) > >> Is moving to a module the best workaround for the CTRL-A problem? > > It would definitely work, and there are other benefits to putting your > code in separate files (better modularization). > >> As an >> alternative, is there a way to chain the calculations of small worksheets? > > No -- running in order is supposed to work, and I'll make sure it > does. Thank you for your bug report. > > William > >> >> All the best. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-support+unsubscr...@googlegroups.com. >> To post to this group, send email to sage-support@googlegroups.com. >> Visit this group at http://groups.google.com/group/sage-support. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > William (http://wstein.org) -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.