Ask Your Question
2

Sage kills itself after a while for inputs > 40bits

asked 2016-03-03 05:17:30 +0200

David Wong gravatar image

Hey!

I implemented Pollard Rho, the first. It takes a few seconds, I would say 30 seconds, for Sage to just get killed. No stack trace. The function works fine with small inputs, but with 40 bits input it just get killed.

if I run it from the command line:

sage application.sage /Applications/sage/src/bin/sage-python: line 2: 34694 Killed: 9 sage -python "$@"

if I run it from inside Sage:

load("application.sage") [1] 35646 killed sage

edit retag flag offensive close merge delete

Comments

I found the problem:

for i in range(40_bit_number):

weird that I didn't get a stack trace though

David Wong gravatar imageDavid Wong ( 2016-03-03 07:14:28 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-03 17:19:42 +0200

tmonteil gravatar image

With such a huge range, you should get a MemoryError.

Instead of creating the whole list, you can use the xrange() iterator that generates the numbers one after another without storing them all.

That said, i only get the MemoryError, no crash: could you please give us some informations so that someone can try to reproduce your problem:

  • which version of Sage did you use ?
  • which OS ?
  • did you install Sage from the binaries, and which ones ?
  • did you compile Sage yourself ?
  • which notebook did you use (Sage notebook or jupyter notebook) ?
  • did you use the command line ?
  • which command did you type precisely to get the error ?
  • which error message did you get ?
  • ... ?
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

1 follower

Stats

Asked: 2016-03-03 05:17:30 +0200

Seen: 246 times

Last updated: Mar 03 '16