OK, I know it's my problem if I try to form a 15000x15000 array and take the cosine of each element, but the result is that my python session completely hangs - that is, the operation is not interruptible. t=np.arange(15360)/15.36e6 t.shape=(-1,1) X=np.cos(2*np.pi*750*(t-t.T)) <hangs indefinitely> I'd like to hit "control-c" and get out of this hung state. What would it take to support this? (I'm running ancient numpy and python at work, so if this is already supported in later versions, my apologies) - Tom K. -- View this message in context: http://old.nabble.com/interrupting-large-matrix-operations-tp29676118p296761... Sent from the Numpy-discussion mailing list archive at Nabble.com.
On Fri, Sep 10, 2010 at 9:05 PM, Tom K.
OK, I know it's my problem if I try to form a 15000x15000 array and take the cosine of each element, but the result is that my python session completely hangs - that is, the operation is not interruptible.
t=np.arange(15360)/15.36e6 t.shape=(-1,1) X=np.cos(2*np.pi*750*(t-t.T)) <hangs indefinitely>
I'd like to hit "control-c" and get out of this hung state.
What would it take to support this?
It is difficult to support this in every case. The basic way to handle ctr+c is to regularly check whether the corresponding signal has been sent during computation. The problem is when to check this - too often, and it can significantly slow down the processing. For ufuncs, I am a bit surprised it is not done until the end of the processing, though. What happens exactly when you do Ctrl+C ? It may take a long time, but it should raise a keyboard interrupt at the end (or after the intermediate computation t-t.T which may take quite some time too).
(I'm running ancient numpy and python at work, so if this is already supported in later versions, my apologies)
What does ancient mean ? Could you give us the version (numpy.__version__) cheers, David
On Fri, Sep 10, 2010 at 9:22 PM, David Cournapeau
On Fri, Sep 10, 2010 at 9:05 PM, Tom K.
wrote: OK, I know it's my problem if I try to form a 15000x15000 array and take the cosine of each element, but the result is that my python session completely hangs - that is, the operation is not interruptible.
t=np.arange(15360)/15.36e6 t.shape=(-1,1) X=np.cos(2*np.pi*750*(t-t.T)) <hangs indefinitely>
I'd like to hit "control-c" and get out of this hung state.
What would it take to support this?
One more question: are you hitting the swap significantly when doing the uninterruptible operation ? It may be blocked during allocation if the disk is used, in which case I am not sure there is anything we can do (if it is blocked inside malloc for example) - but my knowledge of signals is rather limited. cheers, David
David Cournapeau wrote:
(I'm running ancient numpy and python at work, so if this is already supported in later versions, my apologies)
What does ancient mean ? Could you give us the version (numpy.__version__)
1.0.4 Python 2.4.2 IPython 0.9.1 -- View this message in context: http://old.nabble.com/interrupting-large-matrix-operations-tp29676118p296763... Sent from the Numpy-discussion mailing list archive at Nabble.com.
participants (2)
-
David Cournapeau
-
Tom K.