[SciPy-Dev] flapack and the GIL

Sturla Molden sturla@molden...
Mon Feb 4 12:43:47 CST 2013

On 04.02.2013 19:28, Pauli Virtanen wrote:

>> I'd assume the whole of BLAS/LAPACK would be reeantrant or not. And this
>> would possibly depend on the libraries itself, e.g. if they are compiled
>> to assume all local variables are 'STATIC' by default.
>> Which means that the right place to determine threadsafety of flapack
>> routines would be in the build process.
> I think those have been added randomly, so there's no logic behind it

Yes, that is what it looks like :)

> AFAIK, *all* of Lapack is threadsafe --- there are no SAVE or COMMON
> statements. The same is probably true for any modified LAPACK routines
> in MKL, Accelerate and the ilk.

But SAVE can be implicit too. AFAIK, it even used to be (or still is?) 
the default compiler setting in many f77 compilers. Which means we have 
to know how LAPACK was built to avoid the problem.

I don't think there is an implicit SAVE in MKL or Accelerate though ;-)

It's mainly an issue for those who build their own BLAS or LAPACK.


More information about the SciPy-Dev mailing list