Opened 15 years ago

Closed 15 years ago

#22200 closed defect (fixed)

py26-numpy 1.3.0 - doesn't build against veclib

Reported by: macports@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: jameskyle@…, skymoo (Adam Mercer)
Port: py26-numpy

Description

I would like to be able to build numpy against veclib/accelerate framework. I understand the default is to use atlas. When I specify the variant +no_atlas, I expected to use veclib instead, but instead no external BLAS is used.

numpy.show_config() for default variant:

In [4]: numpy.show_config()
atlas_threads_info:
   libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
   library_dirs = ['/opt/local/lib']
   language = f77
   include_dirs = ['/opt/local/include']

blas_opt_info:
   libraries = ['ptf77blas', 'ptcblas', 'atlas']
   library_dirs = ['/opt/local/lib']
   define_macros = [('ATLAS_INFO', '"\\"3.8.3\\""')]
   language = c
   include_dirs = ['/opt/local/include']

atlas_blas_threads_info:
   libraries = ['ptf77blas', 'ptcblas', 'atlas']
   library_dirs = ['/opt/local/lib']
   language = c
   include_dirs = ['/opt/local/include']

lapack_opt_info:
   libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
   library_dirs = ['/opt/local/lib']
   define_macros = [('ATLAS_INFO', '"\\"3.8.3\\""')]
   language = f77
   include_dirs = ['/opt/local/include']

lapack_mkl_info:
 NOT AVAILABLE

blas_mkl_info:
 NOT AVAILABLE

mkl_info:
 NOT AVAILABLE

numpy.show_config() for +no_atlas variant:

In [2]: numpy.show_config()
blas_info:
    libraries = ['blas']
    library_dirs = ['/usr/lib']
    language = f77

lapack_info:
    libraries = ['lapack']
    library_dirs = ['/usr/lib']
    language = f77

atlas_threads_info:
  NOT AVAILABLE

blas_opt_info:
    libraries = ['blas']
    library_dirs = ['/usr/lib']
    language = f77
    define_macros = [('NO_ATLAS_INFO', 1)]

atlas_blas_threads_info:
  NOT AVAILABLE

lapack_opt_info:
    libraries = ['lapack', 'blas']
    library_dirs = ['/usr/lib']
    language = f77
    define_macros = [('NO_ATLAS_INFO', 1)]

atlas_info:
  NOT AVAILABLE

lapack_mkl_info:
  NOT AVAILABLE

blas_mkl_info:
  NOT AVAILABLE

atlas_blas_info:
  NOT AVAILABLE

mkl_info:
  NOT AVAILABLE

Expected numpy.show_config() for veclib:

>>> numpy.show_config()
lapack_opt_info:
   extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
   extra_compile_args = ['-faltivec']

   define_macros = [('NO_ATLAS_INFO', 3)]

blas_opt_info:
   extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
   extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']

   define_macros = [('NO_ATLAS_INFO', 3)]

Change History (8)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Cc: jameskyle@… added
Owner: changed from macports-tickets@… to mcalhoun@…

comment:2 Changed 15 years ago by macports@…

Since ticket #22201 has been closed and marked a duplicate of this one, I thought it was worth noting that there is an additional problem. no_atlas variant has no effect if the atlas package is installed - numpy is linked against atlas regardless. This seemed to me a different issue than the above, hence the two different tickets.

comment:3 Changed 15 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:4 Changed 15 years ago by jameskyle@…

I've just compiled py26-numpy +no_atlas +no_gcc43 and got this:

>>> numpy.show_config()
lapack_opt_info:
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
    extra_compile_args = ['-msse3']
    define_macros = [('NO_ATLAS_INFO', 3)]

blas_opt_info:
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
    extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
    define_macros = [('NO_ATLAS_INFO', 3)]

I'm going to uninstall and rebuild with +no_atlas, but leave the gcc43 and see how that goes. here's a full library link list too:

 otool -L $(port contents py26-numpy | grep .so)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/_dotblas.so:
        /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
        /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib (compatibility version 1.0.0, current version 268.0.0)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/_sort.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/multiarray.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/scalarmath.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/umath.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/umath_tests.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/distutils/fcompiler/absoft.py: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/distutils/fcompiler/absoft.pyc: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/fft/fftpack_lite.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/_compiled_base.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/_datasource.py: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/_datasource.pyc: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/tests/test__datasource.py: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/linalg/lapack_lite.so:
        /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
        /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib (compatibility version 1.0.0, current version 268.0.0)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/ma/timer_comparison.py: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/ma/timer_comparison.pyc: is not an object file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/numarray/_capi.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/random/mtrand.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)

I will also check with +no_atlas variant with atlas installed next and report back.

comment:5 Changed 15 years ago by jameskyle@…

Ok, I reproduced the issue and I think I've found the problem. Should have a fix soon.

comment:6 Changed 15 years ago by macports@…

I tried without atlas installed and with +no_atlas and +no_gcc43 (which I hadn't tried before) but still don't get the veclib linkage displayed as you do - it is as before (/usr/lib)... but I just checked, and those libraries in /usr/lib are symlinked to veclib framework - so maybe it is using veclib, just in a different way (numpy is displaying it differently). Not sure why this should be the case.

jm-g26b101:lib robince$ ls -l /usr/lib/*lapack*
lrwxr-xr-x  1 root  wheel  114 20 Oct 18:18 /usr/lib/libclapack.dylib -> ../..//System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libLAPACK.dylib
lrwxr-xr-x  1 root  wheel  114 20 Oct 18:18 /usr/lib/libf77lapack.dylib -> ../..//System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libLAPACK.dylib
lrwxr-xr-x  1 root  wheel  114 20 Oct 18:18 /usr/lib/liblapack.dylib -> ../..//System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libLAPACK.dylib
jm-g26b101:lib robince$ ls -l /usr/lib/*blas*
lrwxr-xr-x  1 root  wheel  112 20 Oct 18:18 /usr/lib/libblas.dylib -> ../..//System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib
lrwxr-xr-x  1 root  wheel  112 20 Oct 18:18 /usr/lib/libcblas.dylib -> ../..//System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib

comment:7 Changed 15 years ago by jameskyle@…

Fixed in

r59794

comment:8 Changed 15 years ago by jameskyle@…

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.