[SciPy-dev] building lib.lapack without optimization

Nils Wagner nwagner at mecha.uni-stuttgart.de
Tue Nov 30 07:06:17 EST 2004


Pearu Peterson wrote:

>
>
> On Tue, 30 Nov 2004, Nils Wagner wrote:
>
>> Pearu Peterson wrote:
>>
>>> Now try
>>>
>>>   rm -rf build
>>>   python setup_lapack.py build config_fc --noarch
>>>
>>> This will use -O3 optimization but without architecture dependent 
>>> optimization flags.
>>>
>>> Does it work?
>>>
>> No, the same failures as before (with python setup_lapack.py build)
>
>
> Ok, now try to reduce optimization level:
>
> rm -rf build
> python setup_lapack.py build config_fc --noarch --opt="-O2"
>
> If that fails, then try --opt="-O", etc.
>
> If you have found working optimization level, then remove --noarch 
> flag to see if architecture dependent flags are OK.
>
> The goal is to find optimization flags for the given compiler
> (i) that can be coded into scipy_distutils/gnufcompiler.py
> (ii) and to use these optimization flags for building Fortran LAPACK 
> libraries needed for ATLAS.
>
Here are my findings...

python2.3 setup_lapack.py build config_fc --noarch --opt="-O2" yields

======================================================================
FAIL: check_heev_complex (__main__.test_clapack_complex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_lapack.py", line 51, in check_heev_complex
    assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
  File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line 
748, in assert_array_almost_equal
    assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 33.3333333333%):
        Array 1: [-1.2905481 -4.3758251e+00j -2.0410486 +1.3645462e+00j
       3.5935487 +2.8312206e-07j]
        Array 2: [-1.2905486-4.3758267j -2.041049 +1.3645459j  
3.5935484-0.j       ]


======================================================================
FAIL: check_heev_complex (__main__.test_flapack_complex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_lapack.py", line 51, in check_heev_complex
    assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
  File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line 
748, in assert_array_almost_equal
    assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 33.3333333333%):
        Array 1: [-1.2905481 -4.3758251e+00j -2.0410486 +1.3645462e+00j
       3.5935487 +2.8312206e-07j]
        Array 2: [-1.2905486-4.3758267j -2.041049 +1.3645459j  
3.5935484-0.j       ]


----------------------------------------------------------------------
Ran 108 tests in 0.248s

FAILED (failures=2)

################################################################################################

python2.3 setup_lapack.py build config_fc --noarch --opt="-O" yields

======================================================================
FAIL: check_heev_complex (__main__.test_clapack_complex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_lapack.py", line 51, in check_heev_complex
    assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
  File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line 
748, in assert_array_almost_equal
    assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 33.3333333333%):
        Array 1: [-1.2905485 -4.3758260e+00j -2.0410489 +1.3645461e+00j
       3.5935477 -4.4703484e-08j]
        Array 2: [-1.2905487-4.3758263j -2.041049 +1.364546j   
3.5935492-0.j       ]


======================================================================
FAIL: check_heev_complex (__main__.test_flapack_complex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_lapack.py", line 51, in check_heev_complex
    assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
  File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line 
748, in assert_array_almost_equal
    assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 33.3333333333%):
        Array 1: [-1.2905485 -4.3758260e+00j -2.0410489 +1.3645461e+00j
       3.5935477 -4.4703484e-08j]
        Array 2: [-1.2905487-4.3758263j -2.041049 +1.364546j   
3.5935492-0.j       ]


----------------------------------------------------------------------
Ran 108 tests in 0.246s

FAILED (failures=2)

So any optimization fails.

Nils

>>> What gcc version are you using?
>>
>
>> gcc version 3.3.3 (SuSE Linux)
>
>
> Btw, I am using gcc 3.3.5 (Debian Sid) with no problems.
>
SuSE 9.2 comes with gcc 3.3.4.
http://www.suse.de/de/private/products/suse_linux/prof/packages_professional/gcc.html
Do you have any experience with that version ?

> Pearu
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev






More information about the SciPy-Dev mailing list