Fortran 4.7.2 / 4.8.1错误:在(1)处没有针对通用'vode'的特定子例程(Fortran 4.7.2/4.8.1 error: There is no spe

编程入门 行业动态 更新时间:2024-10-25 06:23:53
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程序。

当我在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 1

I 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.

更多推荐

本文发布于:2023-04-27 23:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329092.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:定子   例程   错误   Fortran   vode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!