[Numpy-discussion] Proposed fix for MKL and dynamic loading
david at silveregg.co.jp
Thu Jan 21 20:09:14 EST 2010
Dag Sverre Seljebotn wrote:
> a) Should I submit a patch?
> b) Negative consequences? Perhaps another Python module can now not load
> a different BLAS implementation? (That still seems better than not being
> able to use MKL IMO).
Besides the problem of ctypes not always being available, I am very wary
of those library-specific hacks. Worse, it is version dependent, because
it depends on the MKL.
> d) Do I need a "if hasattr" for Windows, or will Windows just ignore it,
> or does this apply to Windows too?
Windows does not have dlopen, and has totally different semantics for
dynamic loading. Besides, this is not needed on windows. So it should
not be executed at all.
>  BTW, I could not figure out how to link statically if I wanted -- is
> "search_static_first = 1" supposed to work? Perhaps MKL will insist on
> loading some parts dynamically even then *shrug*.
search_static_first is inherently fragile - using the linker to do this
is much better (with -WL,-Bshared/-Wl,-Bstatic flags).
More information about the NumPy-Discussion