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:
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.
Reassinging to Core - python-numeric is in Core in FC4.
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
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.
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.