Ask Your Question
0

Sage quit while running program

asked 2014-12-03 19:33:00 -0500

So for some reason my program quit while it was running something. I was able to open it back up but obviously my program quit in the middle of it being ran. It has been running for a long time and I want my output from it but it truncated it and I can't find how to get the full output since it didn't complete it doesn't have the link for me to click.

edit retag flag offensive close merge delete

Comments

This is pretty vague, so it's hard for us to help you. Was this in the Sage math cloud, the notebook on your machine, on a public server, in the command line? What version? Usually Sage just doesn't stop, except for timeouts on public servers of sagenb.

kcrisman gravatar imagekcrisman ( 2014-12-03 20:35:05 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-12-04 06:27:42 -0500

From your question I'm guessing you have installed Sage on your computer and you are running it in notebook mode.

It seems you program takes a long time to run, and outputs a lot of data. In such a case it is a good idea to output to a file rather than outputting to the screen, for two reasons:

  • printing to the screen takes time! Your program will run faster if it prints nothing to the screen.

  • in the program crashes, you at least get whatever was written to a file until then.

Writing to a file is simple in Python. See the following selection of links: lecture notes, ask-sage, stackoverflow.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-12-03 19:33:00 -0500

Seen: 82 times

Last updated: Dec 04 '14