Bug 163646 - eigenvalues function in LinearAlgebra hangs
eigenvalues function in LinearAlgebra hangs
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: python-numeric (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matthew Barnes
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-19 16:17 EDT by Rick Muller
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: python-numeric-24.2-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-29 22:41:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Rick Muller 2005-07-19 16:17:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
The eigenvalues routine in the LinearAlgebra module of the python-numeric package hangs.

The solution to this is to compile without optimization. That is, in the setup.py file, set:
extra_compile_args = ["-O0"]  

This slows down the routines, but at least the programs won't hang.


Version-Release number of selected component (if applicable):
python-numeric-23.7-2

How reproducible:
Always

Steps to Reproduce:
Start python
% python
>>> from Numeric import identity,Float
>>> from LinearAlgebra import eigenvalues
>>> eigenvalues(identity(3,Float))


Actual Results:  The program hangs, continuing to burn CPU time indefinitely.


Expected Results:  array([ 1.,  1.,  1.])


Additional info:
Comment 1 Rick Muller 2005-07-21 13:15:13 EDT
One workaround the FedoraExtrasPowersThatBe might want to consider is to upgrade
to Numeric-24.0b2, which is available on the sourceforge site. It appears that
this release fixes that bug.
Comment 2 Bill Nottingham 2005-07-21 13:22:18 EDT
Reassinging to Core - python-numeric is in Core in FC4.
Comment 3 greg landrum 2005-12-01 11:55:02 EST
This problem still exists with version 24.2 of Numeric. 

A solution that's a bit less painful than using -O0 is to add -ffloat-store to
extra_compile_args. (I just tested this with Numeric 24.2 on an FC4 machine)

Note that this problem has existed in one form or another for a while:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=138447
Comment 4 Will Ware 2006-02-02 00:17:56 EST
There is another way to fix this, involving a change to the Numeric source code,
which was (in one instance) incorrectly translated from Fortran to C. Edit the
Src/dlamch.c source file as follows. Find the dlamc3_() function. Notice that it
has a variable definition like this:
    doublereal ret_val;
Change that to this:
    volatile doublereal ret_val;
I am not sure if this was a flaw in f2c or f77, or if it was a mistake in a
manual translation from Fortran to C. But the function comments make it clear
that this is the correct thing to do. When I test LinearAlgebra.eigenvalues(),
it no longer hangs.
Comment 5 Matthew Barnes 2006-10-29 22:41:45 EST
Patched python-numeric per Will's suggestion in comment #4 and verified that the
hang no longer occurs.  Thanks, Will!

Fixed in python-numeric-24.2-2.

Note You need to log in before you can comment on or make changes to this bug.