Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-24 Thread David Cournapeau
Matthieu Brucher wrote: > > How do you write the site.cfg accordingly? I don't think you can do that through site.cfg, David ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-22 Thread Matthieu Brucher
>> [1] 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 (wi

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-22 Thread Dag Sverre Seljebotn
David Cournapeau wrote: > Dag Sverre Seljebotn wrote: > > >> Questions: >> >> 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). >> > >

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread David Cournapeau
Dag Sverre Seljebotn wrote: > Questions: > > 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

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Dag Sverre Seljebotn
Matthieu Brucher wrote: > 2010/1/21 Dag Sverre Seljebotn : > >> Matthieu Brucher wrote: >> try: import sys import ctypes _old_rtld = sys.getdlopenflags() sys.setdlopenflags(_old_rtld|ctypes.RTLD_GLOBAL) from numpy.linalg import lapack_lite f

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Matthieu Brucher
2010/1/21 Dag Sverre Seljebotn : > Matthieu Brucher wrote: >>> try: >>>    import sys >>>    import ctypes >>>    _old_rtld = sys.getdlopenflags() >>>    sys.setdlopenflags(_old_rtld|ctypes.RTLD_GLOBAL) >>>    from numpy.linalg import lapack_lite >>> finally: >>>    sys.setdlopenflags(_old_rtld) >>

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Dag Sverre Seljebotn
Matthieu Brucher wrote: >> try: >>import sys >>import ctypes >>_old_rtld = sys.getdlopenflags() >>sys.setdlopenflags(_old_rtld|ctypes.RTLD_GLOBAL) >>from numpy.linalg import lapack_lite >> finally: >>sys.setdlopenflags(_old_rtld) >>del sys; del ctypes; del _old_rtld >>

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Matthieu Brucher
> try: >    import sys >    import ctypes >    _old_rtld = sys.getdlopenflags() >    sys.setdlopenflags(_old_rtld|ctypes.RTLD_GLOBAL) >    from numpy.linalg import lapack_lite > finally: >    sys.setdlopenflags(_old_rtld) >    del sys; del ctypes; del _old_rtld This also applies to scipy code that

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: > (Apologies if this has been fixed in trunk; I base this on 1.4.0 and no > related comments of MKL on the mailing list) > > I finally got the latest version of MKL working. What appears to have > changed is that the MKL shared libraries will themselves dynamically >

[Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Dag Sverre Seljebotn
(Apologies if this has been fixed in trunk; I base this on 1.4.0 and no related comments of MKL on the mailing list) I finally got the latest version of MKL working. What appears to have changed is that the MKL shared libraries will themselves dynamically load different other libraries, dependi