我尝试编译我的顾问给我的fortran程序。
当我在Mac OS X 10.8.4上使用gfortran 4.7.2并在Arch Linux x64上使用gfortran 4.8.1时,它不想编译。
我已经构建了重放错误的最小工作示例。 不幸的是,无论如何它都很大,所以我把它放在了github上: https : //github.com/kabanovdmitry/vode-test
我可以使用gfortran 4.6.3在Ubuntu 12.04下编译此代码。
我查看了GCC 4.7的新闻稿,发现没有什么可以给我一个线索。
你能否解释为什么gfortran不想编译这段代码?
对不起,最初忘了把错误放在这里:
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 1I try to compile the fortran program which my advisor gave me.
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.
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
I can compile this code under Ubuntu 12.04 with gfortran 4.6.3.
I've checked press releases for GCC 4.7 and found nothing that could give me a clue.
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最满意答案
我的回答及其在乔治引用的问题中的评论涵盖了您的问题。 参数的类型,种类和等级完全匹配。 要添加新内容,我建议您尝试直接调用特定的过程。 然后,类型检查器将针对不良的实际参数进行投诉,您将看到更多详细信息。
在你的情况下
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'这是相当自我解释的。 您的虚拟过程与您的接口不兼容。 您正在混合假定大小和常量大小和显式大小的数组。 您必须完全遵循界面。
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.
In your case
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.
更多推荐
发布评论