[f2py] shareable shared object
Carolyn Ownby
cownby at uvb.nrel.colostate.edu
Mon Jul 30 19:42:20 EEST 2012
Hello,
I am relatively new to f2py and just found this list. What a relief to find
other folks using this tool! I've been struggling with f2py for a few
weeks, and have finally located & loaded all the compilers required and am
successfully executing Fortran methods from my python scripts.
Now for the question: Is there a way to create the shared object such that
all required libraries/methods are contained within? This may not be an
f2py specific question, but I don't see a flag that forces the compiler to
do this.
I am developing a set of python scripts which will be distributed for
outside use. Much of what we need to do is already written in Fortran;
hence the desire to use f2py. However, my collaborators cannot use the
shared objects I create, apparently because of missing DLLs. (My
development and target platform is windows.) I took my .pyd file to a test
machine and copied in missing DLLs until it ran, but each environment is
different, and my collaborators still cannot execute with my shared object
file. They can recompile with my signature file and run successfully.
These are the commands I'm using:
f2py -m mask_water -h mask_water.pyf mask_water.f90
f2py --compiler=mingw32 -c mask_water.pyf mask_water.f90
On my machine, I must explicitly specify the C compiler. I'm sure there's a
way to define this somewhere, but it works.
In case it helps, here is what I've installed:
python-2.6.msi
numpy-1.6.1-win32-superpack-python2.6.exe
mingw-get-inst-20120426.exe
(only installed compiler suite: fortran, c, c++,
objective)
My platform is 64 bit Windows 7. I am tied to python 2.6 because this is an
ArcGIS application, and ArcGIS isn't up to 2.7 yet. I installed the 32 bit
versions because ArcGIS is only 32 bit, and this set happened to be an
iteration that worked.
Thank you; I appreciate any insight you can offer!
______________________________________________________________________
Carolyn Ownby
Research Associate | Colorado State University | 970-491-3606 |
<http://uvb.nrel.colostate.edu/> http://uvb.nrel.colostate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cens.ioc.ee/pipermail/f2py-users/attachments/20120730/4f601544/attachment.htm
More information about the f2py-users
mailing list