(The list server complained about my initial reply being too long. Here in two parts)

Hi Michael, thanks for your help.

1.- The only libraries that came with my Mac (I had forgotten about them) are
$find /usr/lib/ \( -iname "*lapack*" -or -iname "*blas*" \)
/usr/lib//libblas.dylib
/usr/lib//libcblas.dylib
/usr/lib//libclapack.dylib
/usr/lib//libf77lapack.dylib
/usr/lib//liblapack.dylib

I'd assume the fortran blas lib is the first one, despite not having the f77 string.

2.-The Kwant build process doesn't seem to find them though. I removed all I had previously build/installed and started over untarring, building and installing. Here the full install output
$python setup.py install --record install.record
running install
running build
running build_tut
running build_py
running build_ext
**************** Build summary ****************
Default LAPACK and BLAS
No MUMPS support
running install_lib
copying build/lib.macosx-10.6-intel-2.7/kwant/_system.so -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant
copying build/lib.macosx-10.6-intel-2.7/kwant/graph/core.so -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant/graph
copying build/lib.macosx-10.6-intel-2.7/kwant/graph/slicer.so -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant/graph
copying build/lib.macosx-10.6-intel-2.7/kwant/graph/utils.so -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant/graph
copying build/lib.macosx-10.6-intel-2.7/kwant/linalg/lapack.so -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant/linalg
running install_egg_info
Writing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant-1.0.2-py2.7.egg-info
writing list of installed files to 'install.record'

Next I send the build step ouput.

Cheers

On Sat, Feb 7, 2015 at 12:51 PM, Michael Wimmer <wimmer@lorentz.leidenuniv.nl> wrote:
Dear Pol,

a few comments:
- in principle libf77blas should be the correct one; lapacke is the (relatively new) C interface, kwant uses the standard Fortran interface.
- the Mac also comes already with an optimized blas and Lapack, if you don't specify your own libs kwant should be linked against these. In my experience, the ones provided by Macos have a good performance
- The install script should show all the individual compile steps - I don't see this in your output. Can you send a full output from "python setup.py install" in a fresh copy of the kwant directory from the tar.gz file?

Best,

Michael



Am 7 feb. 2015 um 14:29 schrieb Pol Nasam <lsam.isnm@gmail.com>:

My system, OSX 10.6.8

I installed latest lapack/blas through fink. I also tried to write a kwant/build.conf file for specifying those libraries, but apparently it didn't work. I started with only the folowing lines in build.conf

$cat build.conf
[lapack]
libraries = liblapacke.dylib
library_dirs =  /sw/include/lapack/ /sw/lib/lapack/

which is the location of lapack stuff as installed by fink -at least what I think contains the relevant part. 


I also tried with

libraries = libclapack.dylib libf77lapack.dylib liblapack.dylib

library_dirs = /usr/lib/

extra_link_args = -dynamiclib -fPIC

However, python setup.py build ends up reporting just a default lapack & blas installation, so obviously my build.conf didn't work. That things don't work is confirmed when running

$python setup.py install
running install
running build
running build_tut
running build_py
running build_ext
**************** Build summary ****************
Default LAPACK and BLAS
No MUMPS support
running install_lib
running install_egg_info
Removing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant-1.0.2-py2.7.egg-info
Writing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kwant-1.0.2-py2.7.egg-info

$python -c 'import kwant; kwant.test()'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "kwant/__init__.py", line 14, in <module>
        exec 'from . import {0}'.format(module)
      File "<string>", line 1, in <module>
      File "kwant/system.py", line 17, in <module>
        from . import physics, _system
      File "kwant/physics/__init__.py", line 14, in <module>
        exec 'from . import {0}'.format(module)
      File "<string>", line 1, in <module>
      File "kwant/physics/leads.py", line 16, in <module>
        from .. import linalg as kla
      File "kwant/linalg/__init__.py", line 10, in <module>
        from . import lapack
    ImportError: cannot import name lapack

Can you help me in getting my lapack libraries correctly located by the build process? I will post the complete list of lapack/blas related directories populated by my fink installation if you need it.

This seems the only thing holding me back from getting kwant running, and thus, runnning the examples and simulations from the course.