Fortran 4.7.2/4.8.1错误:(1)中没有通用"vode"的特定子例程 [英] Fortran 4.7.2/4.8.1 error: There is no specific subroutine for the generic 'vode' at (1)
问题描述
我尝试编译顾问给我的fortran程序.
I try to compile the fortran program which my advisor gave me.
当我在Mac OS X 10.8.4上使用gfortran 4.7.2和在Arch Linux x64上使用gfortran 4.8.1进行编译时,它不想进行编译.
It doesn't want to compile when I'm doing this with gfortran 4.7.2 on Mac OS X 10.8.4 and with gfortran 4.8.1 on Arch Linux x64.
我已经建立了最小的工作示例来重放错误.不幸的是,无论如何它还是很大的,所以我把它放在了github上: https://github.com/kabanovdmitry/vode-test
I've built the minimal working example which replays the error. Unfortunately, it's quite big anyway, so I've put it on the github: https://github.com/kabanovdmitry/vode-test
我可以在带有gfortran 4.6.3的Ubuntu 12.04下编译此代码.
I can compile this code under Ubuntu 12.04 with gfortran 4.6.3.
我检查了GCC 4.7的新闻稿,却没有发现任何线索.
I've checked press releases for GCC 4.7 and found nothing that could give me a clue.
您能否说明一下为什么gfortran不想编译此代码?
Could you please shed some light why gfortran doesn't want to compile this code?
抱歉,最初忘记将错误放在这里:
Sorry, initially forgot to put the errors here:
main.f90:8.75:
call vode(istate, lambda_fcn, dummy_jac, lambda, x_tmp, x_end, tol, pm)
1
Error: There is no specific subroutine for the generic 'vode' at (1)
make: *** [all] Error 1
推荐答案
您的问题已由我的答案及其在George引用的问题中的注释所涵盖.参数的类型,种类和等级完全匹配.要添加新内容,建议您尝试直接调用特定过程.然后,类型检查器将抱怨实际参数错误,并且您将看到更多详细信息.
Your problem is covered by my answer and its comments in the question referenced by george. The type, kind and rank of arguments match exactly. To add something new, I suggest you to try to call the specific procedure directly. The type checker will then complaint for bad actual arguments and you will see more details.
以您的情况
generic2.f90:81.24:
call d_vode(istate, lambda_fcn, dummy_jac, lambda, x_tmp, x_end, tol, pm)
1
Error: Interface mismatch in dummy procedure 'f' at (1): Shape mismatch in dimension 1 of argument 'y'
这是不解自明的.虚拟过程与您的接口不兼容.您正在混合假定大小数组,恒定大小数组和显式大小数组.您必须严格按照界面进行操作.
Which is rather self-explaining. You dummy procedures are not compatible with your interfaces. You are mixing assumed-size and constant-size and explicit size arrays. You must follow the interface exactly.
这篇关于Fortran 4.7.2/4.8.1错误:(1)中没有通用"vode"的特定子例程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!