[SciPy-Dev] Use vecLibFort instead of Accelerate?

Matthew Brett matthew.brett at gmail.com
Sat Oct 11 14:35:42 EDT 2014


Hi,

On Sat, Oct 11, 2014 at 11:13 AM, Pauli Virtanen <pav at iki.fi> wrote:
> 11.10.2014, 15:53, Sturla Molden kirjoitti:
>> There is a library called vecLibFort that re-exports all the BLAS and
>> LAPACK symbols in Accelerate with gfortran ABI:
>>
>> https://github.com/mcg1969/vecLibFort
>
> One drawback in this is that asking users to download and install
> vecLibFort properly to be able to use Scipy on OSX at all seems quite
> brittle.
>
> Bundling that set of wrappers, which unlike our own works via the much
> better (osx-specific?) dynamic library symbol overrides, might be
> possible. Not sure how well the __attribute__(()) statements required
> will work on clang and various gcc versions?

I guess they are likely to work for clang given the library is OSX specific?

> Fighting distutils to set up rpaths etc. for distributing the additional
> .so may however be the biggest job.

I can use the OSX delocate [1] machinery for that job, for our own builds.

> @Matthew: what is the problem with the current Numpy and Scipy OSX
> builds? In principle, it should just work out of the box currently?

It does work out of the numpy-atlas-binaries [2] box, but it has a few problems:

* It links against ATLAS for SSE2 as optimized for my laptop, so
probably isn't the best performance that the OSX machine could
produce;
* The builds (via ATLAS and numpy) use gcc runtimes including
libquadmath, so we have to take care of LGPL and GPLv3 runtime library
exception licensing;
* I used gcc / gfortran 4.8 rather than clang to get best performance
and least likelihood of build errors from ATLAS, so someone
replicating the build would need to install this compiler;
* The build, though automated, is complicated in that it has to
separately build 32 and 64 bit extensions then fuse them, largely
because of the gcc version.

So - I think building via clang and Accelerate using vecLibFort would
be far preferable if we can make it work.

Cheers,

Matthew

[1] https://pypi.python.org/pypi/delocate
[2] https://github.com/MacPython/numpy-atlas-binaries



More information about the SciPy-Dev mailing list