[Numpy-discussion] f2py: sharing F90 module data between modules

Lisandro Dalcin dalcinl at gmail.com
Tue Feb 12 08:12:45 EST 2008


On 2/12/08, Pearu Peterson <pearu at cens.ioc.ee> wrote:
> according to which makes your goal unachivable because of how
> Python loads shared libraries *by default*, see below.

> Try to use sys.setdlopenflags(...) before importing f2py generated
> extension modules and then reset the state using sys.setdlopenflags(0).

I also had to do something similar for solving a different problem,
feel free to reuse the code here. This way, you have chances to make
it working in a many platforms. You can put this in a __init__.py, and
next import all your extensions inside the last try/finally block.

http://projects.scipy.org/mpi4py/browser/mpi4py/trunk/src/_rtld.py




-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594



More information about the NumPy-Discussion mailing list