[PYTHON MATRIX-SIG] LinearAlgebra.test() core dumps

Jim Hugunin hugunin@mit.edu
Fri, 21 Mar 1997 16:04:31 -0500


Carlos writes:
>
> I installed Python 1.4 and NumPy 1.0b2 yesterday including NumPyLib.
> Everything seems to work fine except the LinearAlgebra module - it core
> dumps on the test program:
>
> raboof:NumPy[0] python LinearAlgebra.py
> All numbers printed should be (almost) zero:
> Floating exception (core dumped)
> raboof:NumPy[136]
>
> This happens on an Alpha with Digital UNIX V4.0A  (Rev. 464).

You're seeing this problem because of the Alpha's interesting treatment of 
IEEE exceptions.  For cases where almost every other processor would return 
either Inf or NaN, the Alpha will generally just dump core.  I've been told 
that there are some very good reasons for this, but...

There are several solutions to this problem:

1) None of this code should be generating IEEE exceptions.  If you can 
track down the code that's causing the problem, I'd be happy to fix it 
which would make this go away for this case.

2) You can convince your alpha compiler to generate code that will honor 
ieee exceptions properly.  This is done with compile time flags (should be 
obvious from the man pages) and will produce a significant performance 
penalty, but should make all of these sorts of problems go away.

3) Somebody at LLNL was working on better handling of floating point 
exceptions within python in general.  If you can get in touch with them you 
might be able to produce a "perfect" solution with a fair bit of work.

Good luck - Jim

PS - If you didn't have this problem in the beta 1 release then the problem 
is almost certainly in the array printing code (if you want a hint on where 
to look).


_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________