for_write_seq_lis 做什么?

发布于 2024-10-07 12:40:01 字数 595 浏览 3 评论 0原文

我正在使用 valgrind 调试 Fortran 90 程序。我在跟踪中遇到了这个错误

==93929== Use of uninitialised value of size 4
==93929==    at 0x7C3D4B: for__add_to_lf_table 
==93929==    by 0x8014A8: for__open_proc.
==93929==    by 0x7C7B0F: for__open_default 
==93929==    by 0x7F3648: for_write_seq_lis 
<rest of my application backtrace>

,我不明白这是我的错误还是仅仅是内部库的一个怪癖。我想知道这些功能的作用以及任何其他相关信息。

我正在 macosx 上使用 ifort (IFORT) 11.1 20100806、valgrind 3.6.0 进行编译。

编辑:当使用 linked(ptr) 内在函数或使用 print * 时,我能够发现 valgrind 错误的发生。无论如何,我只是想知道这些例程负责什么。什么是 lf 表?

I am debugging a Fortran 90 program with valgrind. I get errors having this in the trace

==93929== Use of uninitialised value of size 4
==93929==    at 0x7C3D4B: for__add_to_lf_table 
==93929==    by 0x8014A8: for__open_proc.
==93929==    by 0x7C7B0F: for__open_default 
==93929==    by 0x7F3648: for_write_seq_lis 
<rest of my application backtrace>

And I don't understand if it's my mistake or simply a quirk of the internal library. I'd like to know what these functions do, and any other relevant information.

I am compiling with ifort (IFORT) 11.1 20100806, valgrind 3.6.0 on macosx.

Edit: I was able to spot occurrences of valgrind errors when the associated(ptr) intrinsic is used, or when print * is used. In any case, I am just curious to know what those routines are responsible for. What's an lf table ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羞稚 2024-10-14 12:40:01

我的猜测是,名称以 for_ 开头的符号是在程序使用的运行时库中定义的,可能是英特尔编译器提供的库。我希望你自己已经弄清楚了,斯特凡诺。除了显而易见的事情之外,他们所做的事情是晦涩难懂的:实现 Fortran 的各种操作。

你做了什么来追踪错误的根源,导致 valgrind 抱怨你使用了未初始化的值?您是否尝试使用选项 -check uninit 进行编译?您是否在代码上尝试过英特尔源代码检查器?

编辑:啊哈。 Fortran 的特点之一是,从声明它的时间到它第一次与目标关联的时间之间,指针不具有关联状态。它既不关联也不不关联,调用 ASSOCIATED 可能会产生奇怪的结果;例如,根据标准,它们不应返回 .true..false.。这可能是您问题的根源,尽管您报告的其他症状并不表明这一点。

My guess would be that the symbols with names beginning for_ are defined in the run-time libraries that the program uses, probably ones provided with the Intel compiler. I expect you figured that out for yourself Stefano. What they do is obscure, other than the obvious: implement various operations of Fortran.

What have you done to track down the origins of the error which makes valgrind complain that you have used an uninitialised value ? Did you try compiling with the option -check uninit ? Have you tried the Intel source checker on the code ?

EDIT: Aha. One of the peculiarities of Fortran is that between the time it is declared and the time it is first associated with a target, a pointer does not have an association status. It is neither associated nor not associated, and calls to ASSOCIATED may produce odd results; according to the standard they should not, for example, return either .true. or .false.. This may be the source of your problem, though the other symptoms you report do not point this way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文