Ask Your Question
0

Sage quit while running program

asked 10 years ago

lovinmath gravatar image

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.

Preview: (hide)

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 ( 10 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 10 years ago

slelievre gravatar image

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.

Preview: (hide)
link

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: 10 years ago

Seen: 850 times

Last updated: Dec 04 '14