[Numpy-discussion] interrupting large matrix operations

David Cournapeau cournape@gmail....
Fri Sep 10 07:29:12 CDT 2010

On Fri, Sep 10, 2010 at 9:22 PM, David Cournapeau <cournape@gmail.com> wrote:
> On Fri, Sep 10, 2010 at 9:05 PM, Tom K. <tpk@kraussfamily.org> 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.



More information about the NumPy-Discussion mailing list