[Numpy-discussion] BLAS and LAPACK ABI questions (mostly OSX related)

Sturla Molden sturla.molden at gmail.com
Mon Jun 9 07:40:55 EDT 2014


Matthew Brett <matthew.brett at gmail.com> wrote:

> Is it possible this is related to:
> 
> https://github.com/numpy/numpy/issues/4007

Possibly, but it seems to be in _dotblas which uses cblas. NumPy has its
own cblas.h. Perhaps it conflicts with Apple's? 

Apple's documentation says that cblas_sdot returns float, but knowing Apple
this might not be accurate. OK, time to locate cblas.h on my MacBook...


> or even:
> 
> https://github.com/numpy/numpy/issues/4776

No. This happens because Accelerate and GCD are not designed to be
fork-safe. 

One can argue that this bug is actually in multiprocessing and not in NumPy
or Accelerate, since BLAS is not a part of POSIX. Only POSIX functions are
required to be fork safe. Python 3.4 has a fix for it by allowing spawn
(fork+exec) to be used instead of fork. It will never be fixed on Python
2.7 unless someone backports multiprocessing from Python 3.4. 

BTW: GotoBLAS2 is also affected by this problem, not just Accelerate. MKL
and Atlas are safe, and so is OpenBLAS from master at GitHub.


Sturla




More information about the NumPy-Discussion mailing list