Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163646 - eigenvalues function in LinearAlgebra hangs
Summary: eigenvalues function in LinearAlgebra hangs
Alias: None
Product: Fedora
Classification: Fedora
Component: python-numeric
Version: rawhide
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Matthew Barnes
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-07-19 20:17 UTC by Rick Muller
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: python-numeric-24.2-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-10-30 03:41:45 UTC

Attachments (Terms of Use)

Description Rick Muller 2005-07-19 20:17:49 UTC
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 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):

How reproducible:

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 17:15:13 UTC
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 17:22:18 UTC
Reassinging to Core - python-numeric is in Core in FC4.

Comment 3 greg landrum 2005-12-01 16:55:02 UTC
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:

Comment 4 Will Ware 2006-02-02 05:17:56 UTC
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-30 03:41:45 UTC
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.