New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #19966 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

ATLAS variant for py25-numpy 1.3.0

Reported by: max@… Owned by: jameskyle@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: numpy ATLAS Cc: mcalhoun@…, ram@…
Port: py25-numpy py26-numpy

Description

Since the latest ATLAS port fixes the 64bit compilation issue, numpy can be compiled with ATLAS support.

A simple patch for py25-numpy is attached. It should also work for py26-numpy, didn't test it tho...

Attachments

py25-numpy-atlas.diff Download (0.8 KB) - added by max@… 3 years ago.

Change History

Changed 3 years ago by max@…

  Changed 3 years ago by macsforever2000@…

  • cc mcalhoun@… added
  • owner changed from macports-tickets@… to ram@…
  • port changed from py25-numpy to py25-numpy py26-numpy

  Changed 3 years ago by ram@…

Currently SciPy, which has NumPy as a dependency, has multiple variants to support different Fortran compilers. As ATLAS has a hard dependency on gcc43 these multiple variants will have to be removed.

follow-up: ↓ 4   Changed 3 years ago by ram@…

What exactly does linking against atlas do, as the installed contents with and without the atlas variant enabled are identical?

in reply to: ↑ 3 ; follow-up: ↓ 5   Changed 3 years ago by max@…

Replying to ram@…:

What exactly does linking against atlas do, as the installed contents with and without the atlas variant enabled are identical?

At least for my use-case linking against ATLAS instead of vecLib speeds up the computation. It's hard to find any recent data on how vecLib's performance is compared ATLAS, but i guess having the option to use ATLAS doesnt hurt.

Replying to ram@…:

Currently SciPy, which has NumPy as a dependency, has multiple variants to support different Fortran compilers. As ATLAS has a hard dependency on gcc43 these multiple variants will have to be removed.

I created an enhancement for ATLAS to use gcc variants like SciPy does (see ticket  #20106). If/When it get's accepted i guess this patch could be applied too?

in reply to: ↑ 4   Changed 3 years ago by ram@…

Replying to max@…:

At least for my use-case linking against ATLAS instead of vecLib speeds up the computation. It's hard to find any recent data on how vecLib's performance is compared ATLAS, but i guess having the option to use ATLAS doesnt hurt.

I notice you don't specify the fortran compiler in the build process, doesn't atlas need to know which fortran compiler to use? I'll look at what happens if a fortran compiler is specified...

I created an enhancement for ATLAS to use gcc variants like SciPy does (see ticket #20106). If/When it get's accepted i guess this patch could be applied too?

There's currently a proposal, see #20103, to use the same gcc version for all scientific ports to make things a lot easier...

  Changed 3 years ago by jameskyle@…

  • cc jameskyle@… added

Cc Me!

  Changed 3 years ago by ram@…

OK I've looked at this in more detail and it appears that no fortran compiler needs to specified, and I can confirm that numpy is using atlas. However when I try to build scipy it fails with the following error:

DEBUG: Executing org.macports.build (py25-scipy)
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' CCFLAGS='-I/opt/local/include -L/opt/local/lib'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_ram_opt_macports_python_py25-scipy/work/scipy-0.7.1" && /opt/local/bin/python2.5 setup.py --no-user-cfg config_fc --fcompiler gnu95 --f77exec /opt/local/bin/gfortran-mp-4.3 --f90exec /opt/local/bin/gfortran-mp-4.3 build'
Traceback (most recent call last):
  File "setup.py", line 160, in <module>
    setup_package()
  File "setup.py", line 127, in setup_package
    from numpy.distutils.core import setup
  File "/opt/local/lib/python2.5/site-packages/numpy/__init__.py", line 130, in <module>
    import add_newdocs
  File "/opt/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, in <module>
    from lib import add_newdoc
  File "/opt/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 13, in <module>
    from polynomial import *
  File "/opt/local/lib/python2.5/site-packages/numpy/lib/polynomial.py", line 18, in <module>
    from numpy.linalg import eigvals, lstsq
  File "/opt/local/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 47, in <module>
    from linalg import *
  File "/opt/local/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 22, in <module>
    from numpy.linalg import lapack_lite
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so, 2): Library not loaded: libptf77blas.dylib
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so
  Reason: image not found

libptff77blas.dylib is provided by atlas and seems fine:

$ port provides /opt/local/lib/libptf77blas.dylib
/opt/local/lib/libptf77blas.dylib is provided by: atlas
$ file /opt/local/lib/libptf77blas.dylib
/opt/local/lib/libptf77blas.dylib: Mach-O dynamically linked shared library i386
$ ls -l /opt/local/lib/libptf77blas.dylib
-rw-r--r-- 2 ram admin 107272 2009-06-18 19:47 /opt/local/lib/libptf77blas.dylib
$

Do you not get this error?

  Changed 2 years ago by ram@…

  • owner changed from ram@… to jameskyle@…

James has patches

  Changed 2 years ago by ram@…

  • cc ram@… added; jameskyle@… removed

  Changed 2 years ago by ram@…

  • status changed from new to closed
  • resolution set to fixed

py25-numpy in r60072, py25-scipy in r60073, py26-numpy in r59608, py26-scipy in r59609

Note: See TracTickets for help on using tickets.