Python f2py。多行上的fortran子程序参数&引用;未知“U子程序”;

Python f2py。多行上的fortran子程序参数&引用;未知“U子程序”;,python,interface,fortran,subroutine,f2py,Python,Interface,Fortran,Subroutine,F2py,我正在使用f2py开发python/fortran接口。 我的fortran代码有一些子例程,其参数列表超过一行,因此我使用标准fortran规则中断一行,即: SUBROUTINE mutation(it,pop,pm,pmg,typem,xmin,xmax,newfx,nbvar, $popsize,tip,nouvpop,nbnew) 当我尝试使用f2py构建python模块时,使用以下命令: f2py3 -c forFunct.f -m mga 我明白了: ... Block

我正在使用f2py开发python/fortran接口。 我的fortran代码有一些子例程,其参数列表超过一行,因此我使用标准fortran规则中断一行,即:

  SUBROUTINE mutation(it,pop,pm,pmg,typem,xmin,xmax,newfx,nbvar,
  $popsize,tip,nouvpop,nbnew)
当我尝试使用f2py构建python模块时,使用以下命令:

f2py3 -c forFunct.f -m mga
我明白了:

...
Block: unknown_subroutine
...
Constructing wrapper function "unknown_subroutine"...
      unknown_subroutine()
最终

error: Command "gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -fPIC -I/tmp/tmp1tw75l/src.linux-x86_64-3.3 
-I/Produits/publics/x86_64.Linux.RH6/python/3.3.3/lib/python3.3/site-
packages/numpy/core/include -
I/Produits/publics/x86_64.Linux.RH6/python/3.3.3/include/python3.3m -c 
/tmp/tmp1tw75l/src.linux-x86_64-3.3/mgamodule.c -o 
/tmp/tmp1tw75l/tmp/tmp1tw75l/src.linux-x86_64-3.3/mgamodule.o" 
failed with exit status 1
你知道这个问题的解决办法吗?我确信它来自多行参数,f2py支持它吗

多谢各位


弗朗西斯科

你到底是如何打破界限的?从你的代码片段中看不清楚,但看起来好像是错的。如果我用真正的标准方式,在第6列中定位任何字符,它都可以工作

1234567
      SUBROUTINE mutation(it,pop,pm,pmg,typem,xmin,xmax,newfx,nbvar,
     $    popsize,tip,nouvpop,nbnew)
      END