Problems compiling with changes to f2py
I am trying to update my package scikits.bvp_solver (source here) and I have run into some problems with f2py generated files. The files 'bvp_solverf-f2pywrappers2.f90' and 'bvp_solverfmodule.c' which were generated in 2009 allow the package to be built in place with "python setup.py build_ext --inplace" but if I delete them and try to rebuild I get the error
scikits/bvp_solver/lib/bvp_solverf-f2pywrappers2.f90:218.48:
use guess_3_wrap__user__routines
1
Fatal Error: Can't open module file 'guess_3_wrap__user__routines.mod' 开发者_如何学JAVAfor reading at (1): No such file or directory
scikits/bvp_solver/lib/bvp_solverf-f2pywrappers2.f90:11.19:
The part the adds this use statement does not appear in the old version of the file. I am having difficulty figuring out how to fix this issue. Can anyone offer advice? What are the major changes to f2py in the last two years?
I finally fixed this problem by eliminating guess_3_wrap__user__routines
and moving the relevant code into python.
If you don't have the 'guess_3_wrap_user_routines.mod' file, you should recompile it before building the file that uses it. For the same problem that I had, in my command window, which is set to 'Intel Composer XE 2011 Intel(R) Visual Studio 2010' I typed 'gfortran', which is my Fortran compiler, and the Fortran file, so in your case 'use guess_3_wrap_user_routines.f' (or the extension is something like '.f90') and run that. That should recompile the 'use guess_3_wrap_user_routines.f' again to get the '.mod' file.
精彩评论