[Numpy-discussion] Floating point exception with numpy and embedded python interpreter

Andrew Straw strawman at astraw.com
Wed Apr 19 11:30:10 CDT 2006

Arkaitz Bitorika wrote:

> On 19 Apr 2006, at 18:37, Andrew Straw wrote:
>>> I've been embedding Python for ages on the same program and other
>>> modules work fine, only numpy fails.
>> Most other modules don't use the SSE units, so wouldn't get hit by  such
>> a bug.
> Is there a way of not using those units from numpy, to check if 
> that's what's going on? 

I think that numpy only accesses the SSE units through ATLAS or other
external library. So, build numpy without ATLAS. But I'm not 100% sure
anymore if there aren't any optimizations that directly use SSE if it's

> Or alternatively, how would I check if my  program is messing with the
> SSE bits?

Hmm, I think that's a bit hairy. I'd suggest simply asking the C++
library's mailing list if they alter the error bits on the control
registers of the SSE unit. (Out of curiousity, what library is it?) If
you want hairy, though, I think you'd have to check from C with the
appropriate calls -- I'd start with the source code in that bug report.
It looks like they're inlining an assembly statement to query a SSE
control register.

More information about the Numpy-discussion mailing list