内部函数出错信息解释
[sourcefile(line)]run-time error M62××MATH
错误号 函数级数学错误信息
M6201 functionnames:DOMAIN error
函数的自变量超出了约定的取值域,例如sqrt(-1)
M6202 functionname:SING error
无意义的变量。例如log10(0)
M6203 functionname:OVERFLOW error
函数的结果值或其中一个既时计算值太大以致不能表示,例如EXP(250000.0)
M6204 functionname:UNDERFLOW error
函数的结果值或其中一个既时计算值太小以致不能表示。
M6205 functionname:TLOSS error
完全丢失精度,例如COS(1E30)
M6206 functionname:PLOSS error
fortran debug模式设置和技巧CVF中有两种编译(连接、执行)模式:release模式和debug模式。调试程序时,宜用debug模式;调好后再用release模式,得到高效的执行程序。设定debug模式:点击菜单Build/Set Active Project Configuration,选 *- Win32 Debug,OK,即设定为debug模式。以debug模式执行:点击“Go (F5)”按钮,或直接按F5键,则执行程序,并在第一个出错语句处停止,在该语句前有一个小黄色箭头。若程序没错,则一直执行完毕,自动关闭dos窗口。此时,宜用“!”按钮或“Ctrl+F5”键,执行完成后,dos窗口等待用户关闭。设置断点:若希望执行时在某一语句处暂停,可将光标置于该语句,点击“手”形状的按钮,或按F9键,则程序执行到该语句时停在该语句处。单步执行:F10(不进入子过程程序段)或者F11(遇到子过程进入子过程程序段继续单步执行)。在工具栏上都有相应的按钮。查看变量值:小黄箭头停在某语句时,按下Variable按钮,显示当前程序段的变量值;对于简单变量,将光标放在该变量上,则即时显示该变量值。先简单说这么多。
如何用Debug模式获得更多的提示信息
依次选择/打开:Project => Settings => Fortran => Compilation Diagnostics
建议选中以下各项:
Argument Mismatch (类型不一致)
Data Alignment (数据排列错位)
Uncalled Routines (从无调用的子过程)
Undeclared Symbols (未声明变量、过程等)
Uninitialized Variables (未赋初始值的变量)
Unused Variables (从未用到的变量)
Usage (用法)
用了这些选项,可以对很多潜在的问题给予警告,使代码更为规范安全。注意:Uninitialized Variables只对简单变量有效,对数组无效。如果简单变量a未给初值,而用于 b=3.0*a,则编译时将报错,但是如果a是个数组变量,则不报错。(不知后来的Intel VF版本有没有改进?)
另外也建议以下设置:Fortran Standard Checking: Fortran 90/95这样,非标准的、厂家扩充的语法功能就会给出警告。
评论 想第一时间抢沙发么?