Fortran常见错误

合集下载

Fortran FAQ

Fortran FAQ

1.1 FAQ之常见错误本文从编译错误,链接错误,运行时错误,计算结果错误等四个方面介绍了常见的错误及解决思路。

适合初学者阅读。

首先应该明确:错误有哪几种?我们当前遇到的是何种错误?阐述这些问题前,我们先讨论一下常规的应用程序开发的过程:1>>编写代码,使用一个或多个源代码文件。

2>>对第一步的每一个源代码文件执行编译操作。

得到一个或若干个目标代码。

3>>将目标代码,运行时库(Run-time Library)和其他使用到的函数库链接起来。

得到一个可执行文件(EXE 或其他)4>>编写程序的说明书,必要的(输入)数据文件5>>将上述得到的结果发布给用户。

(发布的方式可以是刻录成光盘,销售,放在网站上供别人下载,或者其他)6>>用户得到程序后,运行,输入数据,得到计算结果。

对于很多Fortran 程序员来说,可能用户就是自己,也可能仅仅是自己教研室的同事同学。

所以第4,5,6步骤很多时候不明显。

而如果使用集成开发环境(IDE)进行开发,第1,2,3步骤又可以一键完成。

因此,很多初学者就认为,写程序就是:输入代码,运行,得到结果。

这样的理解太狭义。

不管我们面对什么使用者来写代码,程序开发应该是上述的过程。

我们的编译器,编译环境,也是为这个过程而设计的。

于是,我们将错误分为四种:一. 编译错误(发生在第2步)编译错误,一般是源代码书写格式不正确,不符合语法要求。

二. 链接错误(发生在第3步)链接错误,一般是源代码结构不完整,运行时库或函数库使用不合理。

三. 运行时错误(发生在第6步)运行时错误,一般是执行代码时,遇到了事先未料及的错误。

比如内存不足了,磁盘空间不够了,输入文件格式不对了,输出文件写入失败了等等。

四. 计算结果不符合预期(程序代码不规范,或不符合你的设想)计算结果不符合预期,可能性就很多了。

语法与你的想法不一致,超出函数库的适用范围,执行流程控制不当等等。

fortran常见错误

fortran常见错误

FAQ之常见错误2014-02-02 13:45:35 来源:Fcode研讨团队评论:2点击:4419本文从编译错误,链接错误,运行时错误,计算结果错误等四个方面介绍了常见的错误及解决思路。

适合初学者阅读。

首先应该明确:错误有哪几种?我们当前遇到的是何种错误?阐述这些问题前,我们先讨论一下常规的应用程序开发的过程:1>>编写代码,使用一个或多个源代码文件。

2>>对第一步的每一个源代码文件执行编译操作。

得到一个或若干个目标代码。

3>>将目标代码,运行时库(Run-time Library)和其他使用到的函数库链接起来。

得到一个可执行文件(EXE 或其他)4>>编写程序的说明书,必要的(输入)数据文件5>>将上述得到的结果发布给用户。

(发布的方式可以是刻录成光盘,销售,放在网站上供别人下载,或者其他)6>>用户得到程序后,运行,输入数据,得到计算结果。

对于很多 Fortran 程序员来说,可能用户就是自己,也可能仅仅是自己教研室的同事同学。

所以第4,5,6步骤很多时候不明显。

而如果使用集成开发环境(IDE)进行开发,第1,2,3步骤又可以一键完成。

因此,很多初学者就认为,写程序就是:输入代码,运行,得到结果。

这样的理解太狭义。

不管我们面对什么使用者来写代码,程序开发应该是上述的过程。

我们的编译器,编译环境,也是为这个过程而设计的。

于是,我们将错误分为四种:一. 编译错误(发生在第2步)编译错误,一般是源代码书写格式不正确,不符合语法要求。

二. 链接错误(发生在第3步)链接错误,一般是源代码结构不完整,运行时库或函数库使用不合理。

三. 运行时错误(发生在第6步)运行时错误,一般是执行代码时,遇到了事先未料及的错误。

比如内存不足了,磁盘空间不够了,输入文件格式不对了,输出文件写入失败了等等。

四. 计算结果不符合预期(程序代码不规范,或不符合你的设想)计算结果不符合预期,可能性就很多了。

FORTRAN常见错误

FORTRAN常见错误

FORTRAN常见错误41 Insufficient virtual memory 虚拟内存不足70 Integer overflow 整数溢出错误71 Integer divide by zero 整数除0错误72 Floating overflow 浮点数溢出错误73 Floating divide by zero 浮点数除0错误74 Floating underflow 浮点数下溢错误75 Floating point exception 浮点数异常错误77 Subscript out of range 数组定义超出边界95 Floating-point conversion failed 浮点数格式转换失败146 Null pointer error 空指针错误147 Stack overflow 堆栈溢出148 String length error 字符串长度超出允许范围149 Substring error 数组下标超出允许范围150 Range error 整数值超出允许范围151 Allocatable array is already allocated 数组重复定义161 Program Exception - array bounds exceeded 引用数组下标超出允许范围162 Program Exception - denormal floating-point operand 非法浮点数操作符163 Program Exception - floating stack check 浮点数堆栈检查164 Program Exception - integer divide by zero 整数除0错误165 Program Exception - integer overflow 整数溢出166 Program Exception - privileged instruction 非法执行特权指令168 Program Exception - illegal instruction 非法指令170 Program Exception - stack overflow 堆栈溢出540 Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界541 CHARACTER substring expression out of range 字符串非法表示542 Label not found in assigned GOTO list 不属于GOTO语句引用的标号543 INTEGER arithmetic overflow 整数运算结果出现溢出544 INTEGER overflow on input 输入的整数值超出允许范围545 Invalid INTEGER 非法整数值546 REAL indefinite (uninitialized or previous error) 产生非法实数547 Invalid REAL 非法实数548 REAL math overflow 实数值溢出549 No matching CASE found for SELECT CASE select case语句中缺少case项550 INTEGER assignment overflow 整数定义超出允许范围556 A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符557 E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符558 I edi t descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符559 L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符568 Multiple radix specifiers 输入或输出语句重复说明582 Array already allocated 数组已分配583 Array size zero or negative 数组大小为0或负数585 Array not allocated 没有被分配的数组610 Invalid argument 非法参数616 Invalid number in input 输入非法数字617 Invalid string in input 输入非法字符串618 Comma missing in COMPLEX input 输入的多个表达式之间缺少逗号619 T or F expected in LOGICAL read 输入的逻辑值必须是T或F622 Illegal character in hexadecimal input 输入非法的十六进制数637 Integer expected in format 格式语句中要求的整数638 Initial left parenthesis expected in format 格式语句中多余的左括号639 Positive integer expected in format 格式语句中要求用正整数641 Integer expected preceding H, X, or P edi t descriptor 在H、X、P编辑符前要求用整数644 '.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔645 Unexpected end of format 格式语句没有结束646 Unexpected character in format 格式语句中的非法字符647 M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值648 Integer out of range in format 格式语句中的整数值超出允许范围650 Separator expected in format 格式语句中需要分隔符663 Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1664 Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度672 Out of memory 内存不足718 Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组727 Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组729 DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组。

Visual Fortran常见错误内容

Visual Fortran常见错误内容

Visual Fortran 常见运行错误信息41 Insufficient virtual memory 虚拟内存不足70 Integer overflow 整数溢出错误71 Integer divide by zero 整数除0错误72 Floating overflow 浮点数溢出错误73 Floating divide by zero 浮点数除0错误74 Floating underflow 浮点数下溢错误75 Floating point exception 浮点数异常错误77 Subscript out of range 数组定义超出边界95 Floating-point conversion failed 浮点数格式转换失败146 Null pointer error 空指针错误147 Stack overflow 堆栈溢出148 String length error 字符串长度超出允许范围149 Substring error 数组下标超出允许范围150 Range error 整数值超出允许范围151 Allocatable array is already allocated 数组重复定义161 Program Exception - array bounds exceeded 引用数组下标超出允许范围162 Program Exception - denormal floating-point operand 非法浮点数操作符163 Program Exception - floating stack check 浮点数堆栈检查164 Program Exception - integer divide by zero 整数除0错误165 Program Exception - integer overflow 整数溢出166 Program Exception - privileged instruction 非法执行特权指令168 Program Exception - illegal instruction 非法指令170 Program Exception - stack overflow 堆栈溢出540 Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界541 CHARACTER substring expression out of range 字符串非法表示542 Label not found in assigned GOTO list 不属于GOTO语句引用的标号543 INTEGER arithmetic overflow 整数运算结果出现溢出544 INTEGER overflow on input 输入的整数值超出允许范围545 Invalid INTEGER 非法整数值546 REAL indefinite (uninitialized or previous error) 产生非法实数547 Invalid REAL 非法实数548 REAL math overflow 实数值溢出549 No matching CASE found for SELECT CASE select case语句中缺少case项550 INTEGER assignment overflow 整数定义超出允许范围556 A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符557 E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符558 I edit descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符559 L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符568 Multiple radix specifiers 输入或输出语句重复说明582 Array already allocated 数组已分配583 Array size zero or negative 数组大小为0或负数585 Array not allocated 没有被分配的数组610 Invalid argument 非法参数616 Invalid number in input 输入非法数字617 Invalid string in input 输入非法字符串618 Comma missing in COMPLEX input 输入的多个表达式之间缺少逗号619 T or F expected in LOGICAL read 输入的逻辑值必须是T或F622 Illegal character in hexadecimal input 输入非法的十六进制数637 Integer expected in format 格式语句中要求的整数638 Initial left parenthesis expected in format 格式语句中多余的左括号639 Positive integer expected in format 格式语句中要求用正整数641 Integer expected preceding H, X, or P edit descriptor 在H、X、P编辑符前要求用整数644 '.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔645 Unexpected end of format 格式语句没有结束646 Unexpected character in format 格式语句中的非法字符647 M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值648 Integer out of range in format 格式语句中的整数值超出允许范围650 Separator expected in format 格式语句中需要分隔符663 Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1664 Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度672 Out of memory 内存不足718 Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组727 Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组729 DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组。

FORTRAN常见错误

FORTRAN常见错误

FORTRAN常见错误41 Insufficient virtual memory 虚拟内存不足70 Integer overflow 整数溢出错误71 Integer divide by zero 整数除0错误72 Floating overflow 浮点数溢出错误73 Floating divide by zero 浮点数除0错误74 Floating underflow 浮点数下溢错误75 Floating point exception 浮点数异常错误77 Subscript out of range 数组定义超出边界95 Floating-point conversion failed 浮点数格式转换失败146 Null pointer error 空指针错误147 Stack overflow 堆栈溢出148 String length error 字符串长度超出允许范围149 Substring error 数组下标超出允许范围150 Range error 整数值超出允许范围151 Allocatable array is already allocated 数组重复定义161 Program Exception - array bounds exceeded 引用数组下标超出允许范围162 Program Exception - denormal floating-point operand 非法浮点数操作符163 Program Exception - floating stack check 浮点数堆栈检查164 Program Exception - integer divide by zero 整数除0错误165 Program Exception - integer overflow 整数溢出166 Program Exception - privileged instruction 非法执行特权指令168 Program Exception - illegal instruction 非法指令170 Program Exception - stack overflow 堆栈溢出540 Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界541 CHARACTER substring expression out of range 字符串非法表示542 Label not found in assigned GOTO list 不属于GOTO语句引用的标号543 INTEGER arithmetic overflow 整数运算结果出现溢出544 INTEGER overflow on input 输入的整数值超出允许范围545 Invalid INTEGER 非法整数值546 REAL indefinite (uninitialized or previous error) 产生非法实数547 Invalid REAL 非法实数548 REAL math overflow 实数值溢出549 No matching CASE found for SELECT CASE select case语句中缺少case项550 INTEGER assignment overflow 整数定义超出允许范围556 A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符557 E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符558 I edit descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符559 L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符568 Multiple radix specifiers 输入或输出语句重复说明582 Array already allocated 数组已分配583 Array size zero or negative 数组大小为0或负数585 Array not allocated 没有被分配的数组610 Invalid argument 非法参数616 Invalid number in input 输入非法数字617 Invalid string in input 输入非法字符串618 Comma missing in COMPLEX input 输入的多个表达式之间缺少逗号619 T or F expected in LOGICAL read 输入的逻辑值必须是T或F622 Illegal character in hexadecimal input 输入非法的十六进制数637 Integer expected in format 格式语句中要求的整数638 Initial left parenthesis expected in format 格式语句中多余的左括号639 Positive integer expected in format 格式语句中要求用正整数641 Integer expected preceding H, X, or P edit descriptor 在H、X、P编辑符前要求用整数644 '.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔645 Unexpected end of format 格式语句没有结束646 Unexpected character in format 格式语句中的非法字符647 M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值648 Integer out of range in format 格式语句中的整数值超出允许范围650 Separator expected in format 格式语句中需要分隔符663 Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1664 Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度672 Out of memory 内存不足718 Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组727 Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组729 DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组。

fortran常见错误及其原因

fortran常见错误及其原因

fortran常见错误及其原因常见fortran错误1.Incrementally linked image--PC correlation disabled.!编译终止2. forrtl:severe(157):Program Exception - access violationbounds and /warn:argument_checking options set, to see if theproblem is an out-of-bounds memory reference or a argument mismatch that causes data to be treated as anaddress.Other causes of this error include:severe(64):input conversion error, unit 2, file D:\FORTRAN2\testi!文件testi正在读写,直到读写到2时错误。

举例:程序想读写整数,却碰到变量故终止。

4 error LNKZOOI :unresolved external symbol _ SN @ 4 fatal error LNKllZO :1 unresolved externals!出现了未指定的外部函数符号Sn。

这是因为在函数子程序中错把函数名Sn写成了ns。

根据错误信息中的提示,用户在编辑窗口寻找有错位置进行修改。

连接错误往往出现在有函数调用或子程序调用的程序中,常见的错误性质有:未定的函数符号、找不到主程序或子程序、实参与虚参的个数不一致等。

注意:连接错误只给出错误代号和错误性质,不给出具体语句的行号。

5 :: error FOR229O :implicit type for 1 detected between 1 and = C :\ abc.: error FOR33Og :undefined label 10编译系统提示用户:在程序的第5行,变量i未经类型说明;在程序的第H行,标号10未定义。

fortran runtime end of file

fortran runtime end of file

fortran runtime end of file在Fortran编程中,"End of File"是一个常见的错误,通常发生在尝试从一个文件读取数据,但是已经到达文件的末尾时。

当程序尝试读取超出文件末尾的数据时,就会触发这个错误。

为了避免这个错误,你可以在读取文件之前检查是否已经到达文件的末尾。

在Fortran中,你可以使用EOF函数来检查是否到达文件末尾。

EOF函数返回一个逻辑值,如果已经到达文件末尾,那么它返回.TRUE.,否则返回.FALSE.。

下面是一个简单的例子,演示了如何在读取文件时使用EOF函数:fortran复制代码PROGRAM ReadFileIMPLICIT NONEINTEGER :: iosCHARACTER(LEN=100) :: lineOPEN('myfile.txt', STATUS='OLD', IOSTAT=ios)IF (ios /= 0) THENPRINT *, 'Error opening file'STOPEND IFDO WHILE (.NOT. EOF(1))READ(1, *, IOSTAT=ios) lineIF (ios /= 0) EXITPRINT *, lineEND DOCLOSE(1)END PROGRAM ReadFile在这个例子中,程序打开一个名为'myfile.txt'的文件,并在一个循环中逐行读取文件的内容。

每次读取一行之前,它都会检查是否已经到达文件的末尾。

如果已经到达文件的末尾,那么EOF(1)将返回.TRUE.,循环将结束,程序将关闭文件并退出。

如果在读取过程中发生任何错误,程序也会退出。

fortran90常见错误

fortran90常见错误

1、运行fortran时出现forrt1:severe<59>:list-directed I/O syntax error,unit 1,file G:\1\1\meat.dat怎么办这是通道1 ,链接到文件meat.dat 的读写出错了。

这问题你得认真检查类似read( 1 , * ) 或write( 1 , * ) 这样的语句,错误原因挺多的。

比如二进制文件用了文本方式读取,比如变量列表与文件不匹配。

问:另外forrt1:severe<161>:program exception -array bounds exceeded是怎么回事?回答:数组越界,也是很常见的错误。

比如real a(100)如果你使用了a(101) 就会越界,因为a 数组只有100 个元素。

2、fortran运行提示error M6201:math-**,现将代码贴出,求高手帮忙看看,急求解答!我不能确定你的错误是怎么引起的。

可能咱们的编译器不同。

你的代码在我这里的问题是:虚参和实参精度不同。

在程序中,你定义了部分real*8,但是对应的虚参和返回值却定义为real。

比如主程序里的z1(双精度),传入函数g里面的x却定义为单精度。

主程序Do 死循环了。

z2_jiashe 和 z2_suan 每一次循环都没有发生改变,于是永远跳不出循环。

我给你的建议是:同一个程序,统一使用real*8 或real*4,尽量不要混用,除非你很自信能理清他们的关系。

检查Do 循环,尤其是z2_jiashe 和z2_suan,是否应该每次循环不同?fortran_排除错误(2012-04-20 23:22:44)安装好VISUAL FORTRAN后1、运行Developer studio即可开始编译FORTRAN程序2、选择File菜单中的New选项3、在弹出的对话框选择projects标签,其他标签不用管,projects格式选用Fortran console application;在project name里命名(最好英文名),点击“ok ”4、接下来画面中,选择“an empty project”,点击“finish”5、接下来画面点击“ok”6、再选择一次File菜单中的new7、对话框选用files标签,选择Fortran free format source file ,并在file里命名8、点击“ok”数Source Files 放源文件(.c、.cpp)程序的实现代码全放在这里Header Files 放头文件(.h)声明放在这里Resource Files 资源文件(.rc)放图标、图片、菜单、文字之类的,主要用来做界面的东东一般都放这里External Dependencies 除上三种以外的,程序编译时用到的文件全放这里fortran内部函数出错信息解释内部函数出错信息解释[sourcefile(line)]run-time error M62××MATH错误号函数级数学错误信息M6201 functionnames:DOMAIN error函数的自变量超出了约定的取值域,例如sqrt(-1)M6202 functionname:SING error无意义的变量。

fortran常见错误代码

fortran常见错误代码

fortran常见错误代码If you have installed the Parallel Software Environment and compiled a program for parallel execution, additional messages specific to parallel execution may appear (see the DIGITAL High Performance Fortran 90 HPF and PSE Manual).statement specified STATUS= 'NEW '(create new file) using I/O unit x. Make sure correct file name, directory path, unit, and so forth were specified in the source program. Decide whether to:Rename or remove the existing file before rerunning theprogram.Modify the source file to specify different filespecification, I/O unit, or OPEN statement STATUS.severe (19): Invalid reference to variable in NAMELIST inputFOR$IOS_INVREFVAR. One of the following conditions occurred: 19The variable was not a member of the namelist group.An attempt was made to subscript a scalar variable.A subscript of the array variable was out-of-bounds. An array variable was specified with too many or too few subscripts for the variable.An attempt was made to specify a substring of a noncharacter variable or array name.A substring specifier of the character variable wasout-of-bounds.A subscript or substring specifier of the variable was not an integer constant.An attempt was made to specify a substring by using an unsubscripted array variable.20 severe (20): REWIND errorFOR$IOS_REWERR. One of the following conditions occurred:The file was not a sequential file.The file was not opened for sequential or append access. The DIGITAL Fortran 90 RTL I/O system detected an error condition during execution of a REWIND statement.severe (24): End-of-file during readFOR$IOS_ENDDURREA. One of the following conditions occurred:A DIGITAL Fortran 90 RTL I/O system end-of-file conditionwas encountered during execution of a READ statement that did not contain an END, ERR, or IOSTAT specification.An end-of-file record written by the ENDFILE statement was encountered during execution of a READ statement that did not contain an END, ERR, or IOSTAT specification.An attempt was made to read past the end of an internal file character string or array during execution of a READ statement that did not contain an END, ERR, or IOSTATspecification.This error is returned by END and ERRSNS.27 severe (27): Too many records in I/O statementFOR$IOS_TOOMANREC. An attempt was made to do one of the following: Read or write more than one record with an ENCODE or DECODEstatement.Write more records than existed.condition is not one of the more common conditions for which specific error messages are provided. It can occur when an OPEN operation was attempted for one of the following:Segmented file that was not on a disk or a raw magnetic tape Standard I/O file that had been closed31 severe (31): Mixed file access modesFOR$IOS_MIXFILACC. An attempt was made to use any of the following combinations:Formatted and unformatted operations on the same unit An invalid combination of access modes on a unit, such as direct and sequentialA DIGITAL Fortran 90 RTL I/O statement on a logical unit that was opened by a program coded in another language33severe (33): ENDFILE errorFOR$IOS_ENDFILERR. One of the following conditions occurred: The file was not a sequential organization file with variable-length records.The file was not opened for sequential or append access.An unformatted file did not contain segmented records. The DIGITAL Fortran 90 RTL I/O system detected an error during execution of an ENDFILE statement.severe (46): Inconsistent OPEN/CLOSE parametersFOR$IOS_INCOPECLO. Specifications in an OPEN or CLOSE statement 46were inconsistent. Some invalid combinations follow:READONLY or ACTION= 'READ 'with STATUS= 'NEW 'or STATUS='SCRATCH 'READONLY with STATUS= 'REPLACE ', ACTION= 'WRITE ', or ACTION= 'READWRITE 'ACCESS= 'APPEND 'with READONLY, ACTION= 'READ ', STATUS= 'NEW ', or STATUS= 'SCRATCH ' DISPOSE= 'SAVE ', 'PRINT ', or 'SUBMIT 'with STATUS= 'SCRATCH 'DISPOSE= 'DELETE 'with READONLYCLOSE statement STATUS= 'DELETE 'with OPEN statement READONLYACCESS= 'APPEND 'with STATUS= 'REPLACE 'ACCESS= 'DIRECT 'or 'KEYED 'with POSITION= 'APPEND ', 'ASIS ', or 'REWIND 'error (75): Floating point exceptionFOR$IOS_SIGFPE. A floating-point exception occurred. Core dump file created. Possible causes include: Division by zeroOverflowInvalid operation, such as subtraction of infinite values, multiplication of zero by infinity (without signs), division of zero by zero or infinity by infinityConversion of floating-point to fixed-point format when an overflow prevents conversioninfo (95): Floating-point conversion failedFOR$IOS_FLOCONFAI. The attempted unformatted read or write of nonnative floating-point data failed because the floating-point value:Exceeded the allowable maximum value for the equivalentnative format and was set equal to infinity (plus or minus) Was infinity (plus or minus) and was set to infinity (plus or minus) Was invalid and was set to not a number (NaN)Very small numbers are set to zero (0). This error could be caused by the specified nonnative floating-point format not matching the floating-point format found in the specified file.Check the following:The correct file was specified.The record layout matches the format DIGITAL Fortran 90 is expecting.The ranges for the data being used (Chapter 9)The correct nonnative floating-point data format wasspecified (Chapter 10).。

fortran常见错误

fortran常见错误

附录:常见错误提示及原因安装1.关于Fortran编译器的安装和配置?在安装FEPG之前一般要先安装好Powerstation Fortran 4.0编译器,并设置好Fortran编译器的path、lib和include路径。

如果你的Powerstation Fortran 4.0编译器安装在目录C:\MSDEV下,设置如下:·在WIN 2000/XP下的设置:a.鼠标移到我的电脑图标,单击右键,然后点击属性;b.点击高级属性;c.点击环境变量,进行系统变量设置;系统变量如下图:d. 如果图上的include、lib、path几个变量没有,请点击新建;如有,点击编辑;按下面变量值进行修改:变量:path值:c:\MSDEV\bin; %path%变量:lib 值:c:\MSDEV\lib;%lib%变量:include值:c:\MSDEV\include;%include%注意:如果path、lib和include变量中有相应新增加的内容,可不增加。

如果编译器装在其它目录,则把C:\MSDEV换为该目录名。

实际上,在安装Powerstation Fortran 4.0时,会出现一个对话框,询问是否增加环境变量,如果选是,这些变量就已经配置好了。

安装fepg,需要用户有管理员权限。

2.运行FEPG命令生成Fortran源程序时,出现fl32不是内部命令也不是外部命令的错误(或fl32 is not internal command)?没配置好Fortran编译器的path路径。

按照上面第1个问题中的解答配置好path路径。

3. 运行FEPG命令生成Fortran源程序时,有些fortran源程序没连接成可执行程序,出现不能发现fepg.lib库文件的错误?安装FEPG之前,没安装和配置好Fortran编译器所致。

在安装FEPG之后出现此情况,可先按照上面第1个问题中的解答配置好Fortran编译器,然后在dos窗口下,运行FEPG所在目录下nfe.r8目录下的gfepglib.bat程序,即可生成fepg.lib库文件。

fortran常见运行错误信息

fortran常见运行错误信息

fortran常见运行错误信息Insufficient virtual memory 虚拟内存不足70 Integer overflow 整数溢出错误71 Integer divide by zero 整数除0错误72 Floating overflow 浮点数溢出错误73 Floating divide by zero 浮点数除0错误74 Floating underflow 浮点数下溢错误75 Floating point exception 浮点数异常错误77 Subscript out of range 数组定义超出边界95 Floating-point conversion failed 浮点数格式转换失败146 Null pointer error 空指针错误147 Stack overflow 堆栈溢出148 String length error 字符串长度超出允许范围149 Substring error 数组下标超出允许范围150 Range error 整数值超出允许范围151 Allocatable array is already allocated 数组重复定义161 Program Exception - array bounds exceeded 引用数组下标超出允许范围162 Program Exception - denormal floating-point operand 非法浮点数操作符163 Program Exception - floating stack check 浮点数堆栈检查164 Program Exception - integer divide by zero 整数除0错误165 Program Exception - integer overflow 整数溢出166 Program Exception - privileged instruction 非法执行特权指令168 Program Exception - illegal instruction 非法指令170 Program Exception - stack overflow 堆栈溢出540 Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界541 CHARACTER substring expression out of range 字符串非法表示542 Label not found in assigned GOTO list 不属于GOTO语句引用的标号543 INTEGER arithmetic overflow 整数运算结果出现溢出544 INTEGER overflow on input 输入的整数值超出允许范围545 Invalid INTEGER 非法整数值546 REAL indefinite (uninitialized or previous error) 产生非法实数547 Invalid REAL 非法实数548 REAL math overflow 实数值溢出549 No matching CASE found for SELECT CASE select case语句中缺少case项550 INTEGER assignment overflow 整数定义超出允许范围556 A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符557 E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符558 I edit descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符559 L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符568 Multiple radix specifiers 输入或输出语句重复说明582 Array already allocated 数组已分配583 Array size zero or negative 数组大小为0或负数585 Array not allocated 没有被分配的数组610 Invalid argument 非法参数616 Invalid number in input 输入非法数字617 Invalid string in input 输入非法字符串618 Comma missing in COMPLEX input 输入的多个表达式之间缺少逗号619 T or F expected in LOGICAL read 输入的逻辑值必须是T或F622 Illegal character in hexadecimal input 输入非法的十六进制数637 Integer expected in format 格式语句中要求的整数638 Initial left parenthesis expected in format 格式语句中多余的左括号639 Positive integer expected in format 格式语句中要求用正整数641 Integer expected preceding H, X, or P edit descriptor 在H、X、P编辑符前要求用整数644 '.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔645 Unexpected end of format 格式语句没有结束646 Unexpected character in format 格式语句中的非法字符647 M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值648 Integer out of range in format 格式语句中的整数值超出允许范围650 Separator expected in format 格式语句中需要分隔符663 Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1664 Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度672 Out of memory 内存不足718 Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组727 Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组729 DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组。

fortran常见错误代码

fortran常见错误代码

If you have installed the Parallel Software Environment and compiled a program for parallel execution, additional messages specific to parallel execution may appear (see the DIGITAL High Performance Fortran 90 HPF and PSE Manual).statement specified STATUS= 'NEW '(create new file) using I/O unit x. Make sure correct file name, directory path, unit, and so forth were specified in the source program. Decide whether to:Rename or remove the existing file before rerunning theprogram.Modify the source file to specify different filespecification, I/O unit, or OPEN statement STATUS.severe (19): Invalid reference to variable in NAMELIST inputFOR$IOS_INVREFVAR. One of the following conditions occurred: 19The variable was not a member of the namelist group.An attempt was made to subscript a scalar variable.A subscript of the array variable was out-of-bounds. An array variable was specified with too many or too few subscripts for the variable.An attempt was made to specify a substring of a noncharacter variable or array name.A substring specifier of the character variable wasout-of-bounds.A subscript or substring specifier of the variable was not an integer constant.An attempt was made to specify a substring by using an unsubscripted array variable.20 severe (20): REWIND errorFOR$IOS_REWERR. One of the following conditions occurred:The file was not a sequential file.The file was not opened for sequential or append access. The DIGITAL Fortran 90 RTL I/O system detected an error condition during execution of a REWIND statement.severe (24): End-of-file during readFOR$IOS_ENDDURREA. One of the following conditions occurred:A DIGITAL Fortran 90 RTL I/O system end-of-file conditionwas encountered during execution of a READ statement that did not contain an END, ERR, or IOSTAT specification.An end-of-file record written by the ENDFILE statement was encountered during execution of a READ statement that did not contain an END, ERR, or IOSTAT specification.An attempt was made to read past the end of an internal file character string or array during execution of a READstatement that did not contain an END, ERR, or IOSTATspecification.This error is returned by END and ERRSNS.27 severe (27): Too many records in I/O statementFOR$IOS_TOOMANREC. An attempt was made to do one of the following: Read or write more than one record with an ENCODE or DECODEstatement.Write more records than existed.condition is not one of the more common conditions for which specific error messages are provided. It can occur when an OPEN operation was attempted for one of the following:Segmented file that was not on a disk or a raw magnetic tape Standard I/O file that had been closed31 severe (31): Mixed file access modesFOR$IOS_MIXFILACC. An attempt was made to use any of the following combinations:Formatted and unformatted operations on the same unit An invalid combination of access modes on a unit, such as direct and sequentialA DIGITAL Fortran 90 RTL I/O statement on a logical unit that was opened by a program coded in another language33severe (33): ENDFILE errorFOR$IOS_ENDFILERR. One of the following conditions occurred: The file was not a sequential organization file with variable-length records.The file was not opened for sequential or append access.An unformatted file did not contain segmented records. The DIGITAL Fortran 90 RTL I/O system detected an error during execution of an ENDFILE statement.severe (46): Inconsistent OPEN/CLOSE parametersFOR$IOS_INCOPECLO. Specifications in an OPEN or CLOSE statement 46were inconsistent. Some invalid combinations follow:READONLY or ACTION= 'READ 'with STATUS= 'NEW 'or STATUS='SCRATCH 'READONLY with STATUS= 'REPLACE ', ACTION= 'WRITE ', or ACTION= 'READWRITE 'ACCESS= 'APPEND 'with READONLY, ACTION= 'READ ', STATUS= 'NEW ', or STATUS= 'SCRATCH 'DISPOSE= 'SAVE ', 'PRINT ', or 'SUBMIT 'with STATUS= 'SCRATCH 'DISPOSE= 'DELETE 'with READONLYCLOSE statement STATUS= 'DELETE 'with OPEN statement READONLYACCESS= 'APPEND 'with STATUS= 'REPLACE 'ACCESS= 'DIRECT 'or 'KEYED 'with POSITION= 'APPEND ', 'ASIS ', or 'REWIND 'error (75): Floating point exceptionFOR$IOS_SIGFPE. A floating-point exception occurred. Core dump file created. Possible causes include:Division by zeroOverflowInvalid operation, such as subtraction of infinite values, multiplication of zero by infinity (without signs),division of zero by zero or infinity by infinityConversion of floating-point to fixed-point format when an overflow prevents conversioninfo (95): Floating-point conversion failedFOR$IOS_FLOCONFAI. The attempted unformatted read or write of nonnative floating-point data failed because the floating-point value:Exceeded the allowable maximum value for the equivalentnative format and was set equal to infinity (plus or minus) Was infinity (plus or minus) and was set to infinity (plus or minus)Was invalid and was set to not a number (NaN)Very small numbers are set to zero (0). This error could be caused by the specified nonnative floating-point format not matching the floating-point format found in the specified file.Check the following:The correct file was specified.The record layout matches the format DIGITAL Fortran 90 is expecting.The ranges for the data being used (Chapter 9)The correct nonnative floating-point data format wasspecified (Chapter 10).。

fortran unclassifiable statement at (1)

fortran unclassifiable statement at (1)

fortran unclassifiable statement at (1)
在Fortran编程语言中,错误消息"fortran unclassifiable statement at (1)" 通常表示编译器遇到了它无法识别的语句。

这可能是由于多种原因造成的,以下是一些常见的原因:
1.语法错误:代码中可能存在拼写错误、错误的符号使用,或者缺少某些必需的关键字。

2.代码结构问题:在某些情况下,可能是由于程序的结构问题,例如,子程序或函数调用
中的错误。

3.不支持的特性:如果尝试使用Fortran标准中不支持的特性或功能,也可能会触发此错
误。

4.混合编程:在某些情况下,如果Fortran代码与其他编程语言(如C或C++)混合编写,
可能会因为不兼容的语法或结构而出现此错误。

5.版本不匹配:编译器的版本可能不兼容你的代码。

尝试更新或更改编译器可能会解决这
个问题。

6.使用了过时或不推荐使用的语法或函数:尽管这些功能在旧版本的Fortran中是有效的,
但现代版本的Fortran可能不再支持这些功能。

为了解决这个问题,你可以:
•检查代码中的语法错误,确保所有的语句都是正确的。

•确保所有的子程序和函数调用都是正确的。

•查阅Fortran文档,确保你正在使用的所有特性都是当前标准所支持的。

•如果与其他语言混合编程,请确保你遵循了正确的混合编程规范。

•更新或更改编译器,确保它与你的代码兼容。

•考虑使用现代的Fortran编程实践和标准。

Fortran运行中给出的系统错误及解决方法

Fortran运行中给出的系统错误及解决方法

⎰-102e xdxSevere_MessagesMust be corrected. The program's execution is terminated when the error is encountered, unless for I/O statements the program uses the END or ERR I/O statement specifiers to transfer control,perhaps to a routine that uses the IOSTAT specifier (see your DEC Fortran user manual).The severe messages follow (in alphabetical order):o MESSAGE: Adjustable array dimension errorNUMBER: 93EXPLANATION: Upon entry to a subprogram, one of the followingerrors was detected during the evaluation of dimensioninginformation:- An upper-dimension bound was less than alower-dimension bound.- The dimensions implied an array that was largerthan addressable memory.o MESSAGE: Attempt to access non-existent recordNUMBER: 36EXPLANATION: A direct-access READ or FIND statement attemptedto access beyond the end of a relative file (or a sequentialfile on disk with fixed-length records) or access a record that was previously deleted in a relative file.o Array index out of bounds (SIGTRAP)NUMBER: 138EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.The cause is an array subscript that is outside the dimensionedboundaries of that array. Try recompiling using the -checkbounds option (perhaps with the f77_dump_flag environmentvariable set) or examine the core dump file to determine thesource code in error.o MESSAGE: Array index out of bounds for index n (SIGTRAP) NUMBER: 139EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.The cause is an array subscript that is outside the dimensionedboundaries of the array index n. Try recompiling using the-check bounds option (perhaps with the f77_dump_flagenvironment variable set) or examine the core dump file todetermine the source code in error.o MESSAGE: BACKSPACE errorNUMBER: 23EXPLANATION: An error condition was detected during executionof a BACKSPACE statement.o MESSAGE: Cannot overwrite existing fileNUMBER: 10EXPLANATION: Specified file xxx already exists when OPENstatement specified STATUS='NEW' (create new file) using I/Ounit x. Make sure correct file name, directory path, unit, and so forth were specified in the source program. Decide whether to:- Rename or remove the existing file before rerunningthe program.- Modify the source file to specify different filespecification, I/O unit, or OPEN statement STATUS='UNKNOWN'. o MESSAGE: Cannot stat fileNUMBER: 108EXPLANATION: Attempted stat operation on the indicated filefailed. Make sure correct file and unit were specified.o MESSAGE: CLOSE errorNUMBER: 28EXPLANATION: An error condition was detected by the DECFortran RTL I/O system during execution of a CLOSE statement. o MESSAGE: DELETE errorNUMBER: 55EXPLANATION: An error condition was detected by the DECFortran RTL I/O system during execution of a DELETE statement. o MESSAGE: Divide by zero check (SIGTRAP)NUMBER: 137EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump file for possible cause.o MESSAGE: Duplicate file specificationsNUMBER: 21EXPLANATION: Multiple attempts were made to specify fileattributes without an intervening close operation. A DEFINEFILE statement was followed by another DEFINE FILE statement or an OPEN statement.o MESSAGE: ENDFILE errorNUMBER: 33EXPLANATION: One of the following conditions occurred:- The file was not a sequential organization file withvariable-length records.- The file was not opened for sequential or append access.- An unformatted file did not contain segmented records.- The DEC Fortran RTL I/O system detected an error duringexecution of an ENDFILE statement.o MESSAGE: End-of-file during readNUMBER: 24EXPLANATION: One of the following conditions occurred:- A DEC Fortran RTL I/O system end-of-file conditionwas encountered during execution of a READ statementthat did not contain an END, ERR, or IOSTAT specification. - An end-of-file record written by the ENDFILE statementwas encountered during execution of a READ statementthat did not contain an END, ERR, or IOSTAT specification. - An attempt was made to read past the end of an internalfile character string or array during execution of a READ statement that did not contain an END, ERR, or IOSTATspecification.o MESSAGE: Error during readNUMBER: 39EXPLANATION: The DEC Fortran RTL I/O system detected an errorcondition during execution of a READ statement.o MESSAGE: Error during writeNUMBER: 38EXPLANATION: The DEC Fortran RTL I/O system detected an error condition during execution of a WRITE statement.o MESSAGE: File name specification errorNUMBER: 43EXPLANATION: The file name was specified erroneously.o MESSAGE: File not foundNUMBER: 29EXPLANATION: A file with the specified name could not be found during an open operation.o MESSAGE: FIND errorNUMBER: 57EXPLANATION: The DEC Fortran RTL I/O system detected an error condition during execution of a FIND statement.o MESSAGE: Floating overflow in math libraryNUMBER: 88EXPLANATION: A floating-point overflow condition was detected during execution of a math library procedure.o MESSAGE: Floating underflow in math libraryNUMBER: 89EXPLANATION: A floating-point underflow condition was detected during execution of a math library procedure. The resultreturned was zero.o MESSAGE: Format/variable-type mismatchNUMBER: 61EXPLANATION: An attempt was made either to read or write areal variable with an integer field descriptor (I or L), or to read or write an integer or logical variable with a real field descriptor (D, E, F, or G).o MESSAGE: Formatted I/O to unit open for unformatted transfers NUMBER: 257EXPLANATION: Attempted formatted I/O (such as list-directed ornamelist I/O) to a unit where the OPEN statement indicated the file was unformatted (FORM keyword). Check that the correct unit (file) was specified.If the FORM keyword was not specified in the OPEN statement andthe file should contain formatted data, specifyFORM='FORMATTED' in the OPEN statement. Otherwise, ifappropriate, use unformatted I/O.o MESSAGE: Inconsistent file organizationNUMBER: 51EXPLANATION: The file organization specified in an OPENstatement did not match the organization of the existing file. o MESSAGE: Inconsistent OPEN/CLOSE parametersNUMBER: 46EXPLANATION: Specifications in an OPEN or CLOSE statement wereinconsistent. Some invalid combinations follow:- READONLY with STATUS='NEW' or STATUS='SCRATCH'- ACCESS='APPEND' with READONLY, STATUS='NEW' orSTATUS='SCRATCH'- DISPOSE='SAVE', 'PRINT', or 'SUBMIT' withSTATUS='SCRATCH'- DISPOSE='DELETE' with READONLYo MESSAGE: Inconsistent record lengthNUMBER: 37EXPLANATION: An attempt was made to open a direct access filewithout specifying a record length.o MESSAGE: Inconsistent record typeEXPLANATION: The RECORDTYPE value in an OPEN statement did notmatch the record type attribute of the existing file that was opened.o MESSAGE: Infinite format loopNUMBER: 60EXPLANATION: The format associated with an I/O statement thatincluded an I/O list had no field descriptors to use intransferring those values.o MESSAGE: Input conversion errorNUMBER: 64EXPLANATION: During a formatted input operation, an invalidcharacter was detected in an input field, or the input valueoverflowed the range representable in the input variable. The value of the variable was set to zero.o MESSAGE: Input record too longNUMBER: 22EXPLANATION: A record was read that exceeded the explicit ordefault record length specified when the file was opened. To read the file, use an OPEN statement with a RECL= value (record length) of the appropriate size.o MESSAGE: Input statement requires too much dataEXPLANATION: An unformatted READ statement attempted to readmore data than existed in the record being read.o MESSAGE: Insufficient virtual memoryNUMBER: 41EXPLANATION: The DEC Fortran RTL was unable to acquireadditional virtual memory from the operating system. Users of the C and Korn shells may be able to overcome this problem by increasing the per-process data limit using the limit (C shell) or ulimit (Korn shell) commands. For more information, see the csh(1) and ksh(1) reference pages.If the maximum per-process data size is already allocated,increase the value of the maxdsiz parameter in the system'sconfiguration file. Note that edits to the configuration file do not take effect until the operating system kernel has been rebuilt, and the system has been rebooted. For moreinformation, see the doconfig(1) reference page and youroperating system guide to system configuration.o MESSAGE: Integer overflowNUMBER: 70EXPLANATION: During an arithmetic operation, an integer valueexceeded byte, word, or longword range. The result of theoperation was the correct low-order part. See your DEC Fortran user manual for ranges of the various integer data types.o MESSAGE: Integer zero divideNUMBER: 71EXPLANATION: During an integer arithmetic operation, anattempt was made to divide by zero. The result of theoperation was set to the dividend, which is equivalent todivision by 1.o MESSAGE: Internal consistency check failureNUMBER: 8EXPLANATION: Internal severe error. Please check that theprogram is correct. Recompile if an error exists in theprogram.If this error persists, submit an SPR.o MESSAGE: Invalid argument to Fortran Run-Time Library NUMBER: 48EXPLANATION: The compiler passed an invalid or improperlycoded argument to the DEC Fortran RTL. This can occur if the compiler is newer than the RTL in use.o MESSAGE: Invalid argument to math libraryNUMBER: 81EXPLANATION: One of the mathematical procedures detected aninvalid argument value.o MESSAGE: Invalid logical unit numberNUMBER: 32EXPLANATION: A logical unit number greater than or less than zero was used in an I/O statement.o MESSAGE: Invalid reference to variable in NAMELIST input NUMBER: 19EXPLANATION: One of the following conditions occurred:- The variable was not a member of the namelist group.- An attempt was made to subscript the scalar variable.- A subscript of the array variable was out-of-bounds.- An array variable was specified with too many or toofew subscripts for the variable.- An attempt was made to specify a substring of a non-character variable or array name.- A substring specifier of the character variable wasout-of-bounds.- A subscript or substring specifier of the variable wasnot an integer constant.- An attempt was made to specify a substring using anunsubscripted array variable.o MESSAGE: Kernel breakpoint (SIGTRAP)NUMBER: 131EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump for possible cause.o MESSAGE: Keyword value error in OPEN statementNUMBER: 45EXPLANATION: An improper value was specified for an OPEN orCLOSE statement keyword requiring a value.o MESSAGE: List-directed I/O syntax errorNUMBER: 59EXPLANATION: The data in a list-directed input record had aninvalid format, or the type of the constant was incompatiblewith the corresponding variable. The value of the variable was unchanged.o MESSAGE: Logarithm of zero or negative valueNUMBER: 83EXPLANATION: An attempt was made to take the logarithm of zeroor a negative number. The result returned was the reservedoperand, -0.o MESSAGE: Mixed file access modesNUMBER: 31EXPLANATION: An attempt was made to use any of the followingcombinations:- Formatted and unformatted operations on the same unit.- An invalid combination of access modes on a unit,such as direct and sequential.- A DEC Fortran RTL I/O statement on a logical unit thatwas opened by a program coded in another language. o MESSAGE: No such deviceNUMBER: 42EXPLANATION: A pathname included an invalid or unknown device name when an OPEN operation was attempted.o MESSAGE: Not a Fortran-specific errorNUMBER: 1EXPLANATION: An error occurred in the user program or in the RTL that was not a DEC Fortran-specific error.o MESSAGE: Not taken branch delay emulation (SIGTRAP) NUMBER: 134EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created. Examine core dump for possible cause.o MESSAGE: OPEN or DEFINE FILE requiredNUMBER: 26EXPLANATION: A direct access READ, WRITE, or FIND, statementwas attempted for a file when no DEFINE FILE or OPEN statement with ACCESS='DIRECT' was performed for that file.o MESSAGE: Open failureNUMBER: 30EXPLANATION: An error was detected by the DEC Fortran RTL I/Osystem while attempting to open a file in an OPEN, INQUIRE, or other I/O statement. This message is issued when the errorcondition is not one of the more common conditions for which specific error messages are provided. It can occur if an OPEN operation is attempted for one of the following files:- A segmented file that was not on a disk or a rawmagnetic tape.- A standard I/O file that had been closed.o MESSAGE: Operation requires seek abilityNUMBER: 120EXPLANATION: Attempted an operation on a file that requiresthe ability to perform seeks on that file. Make sure thecorrect unit, directory path, and file were specified.o MESSAGE: Output statement overflows recordNUMBER: 66EXPLANATION: An output statement attempted to transfer moredata than would fit in the maximum record size.o MESSAGE: Overflow check (SIGTRAP)NUMBER: 136EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.The cause is an integer overflow. Try recompiling using the-check overflow option (perhaps with the f77_dump_flagenvironment variable set) or examine the core dump file todetermine the source code in error.o MESSAGE: Pathname errorNUMBER: 43EXPLANATION: A pathname (or file name) given to an OPEN orINQUIRE statement was not acceptable to the DEC Fortran RTL I/O system.o MESSAGE: Permission to access file denied, unit x, file xxx NUMBER: 9EXPLANATION: Check the mode (protection) of the specifiedfile. Make sure the correct file was being accessed. Change the protection, specified file, or process used beforererunning program.o MESSAGE: Record number outside rangeNUMBER: 25EXPLANATION: A direct access READ, WRITE, or FIND statementspecified a record number outside the range specified when the file was opened.o MESSAGE: Recursive I/O operationNUMBER: 40EXPLANATION: While processing an I/O statement for a logicalunit, another I/O operation on the same logical unit wasattempted, such as a function subprogram that performs I/O to the same logical unit was referenced in an expression in an I/O list or variable format expression.o MESSAGE: REWIND errorNUMBER: 20EXPLANATION: One of the following conditions occurred:- The file was not a sequential file.- The file was not opened for sequential or append access.- The DEC Fortran RTL I/O system detected an error conditionduring execution of a REWIND statement.o MESSAGE: Segmented record format errorNUMBER: 35EXPLANATION: An invalid segmented record control data word wasdetected in an unformatted sequential file. The file wasprobably either created with RECORDTYPE='FIXED' or 'VARIABLE' in effect, or was created by a program written in a languageother than Fortran.o MESSAGE: Significance lost in math libraryNUMBER: 87EXPLANATION: The magnitude of an argument or the magnitude ofthe ratio of the arguments to a math library function was solarge that all significance in the result was lost. The result returned was the reserved operand, -0.o MESSAGE: Square root of negative valueNUMBER: 84EXPLANATION: An argument required the evaluation of the squareroot of a negative value. The result returned was the reserved operand, -0.o MESSAGE: Subscript out of rangeNUMBER: 77EXPLANATION: An array reference was detected outside thedeclared array bounds.o MESSAGE: Syntax error in formatNUMBER: 62EXPLANATION: A syntax error was encountered while the RTL wasprocessing a format stored in an array or character variable. o MESSAGE: Syntax error in NAMELIST inputNUMBER: 17EXPLANATION: The syntax of input to a namelist READ statement was incorrect.o MESSAGE: Taken branch delay emulation (SIGTRAP) NUMBER: 133EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created. Examine core dump for possible cause.o MESSAGE: Too many records in I/O statementNUMBER: 27EXPLANATION: An attempt was made to do one of the following: - Read or write more than one record with an ENCODEor DECODE statement.- Write more records than existed.o MESSAGE: Too many values for NAMELIST variableNUMBER: 18EXPLANATION: An attempt was made to assign too many values to a variable during a namelist READ statement.o MESSAGE: Undefined exponentiationNUMBER: 82EXPLANATION: An exponentiation that is mathematicallyundefined was attempted, for example, 0.**0. The result returned for floating-point operations was the reservedoperand, -0, and for integer operations, zero.o MESSAGE: Unformatted I/O to unit open for formatted transfers NUMBER: 256EXPLANATION: Attempted unformatted I/O to a unit where theOPEN statement indicated the file was formatted (FORM keyword). Check that the correct unit (file) was specified.If the FORM keyword was not specified in the OPEN statement andthe file should contain unformatted data, specifyFORM='UNFORMATTED' in the OPEN statement. Otherwise, ifappropriate, use formatted I/O (such as list-directed ornamelist I/O).o MESSAGE: Unit already openNUMBER: 34EXPLANATION: A DEFINE FILE statement specified a logical unitthat was already opened.o MESSAGE: Unit not connectedNUMBER: 11EXPLANATION: The specified unit was not open at the time ofthe attempted I/O operation. Check if correct unit number was specified. If appropriate, use an OPEN statement to explicitly open the file (associates the file with the unit number).o MESSAGE: User breakpoint (SIGTRAP)EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump for possible cause.o MESSAGE: User single step (SIGTRAP)NUMBER: 135EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump for possible cause.o MESSAGE: Variable format expression value errorNUMBER: 68EXPLANATION: The value of a variable format expression was notwithin the range acceptable for its intended use; for example, a field width was less than or equal to zero. A value of 1 was assumed, except for a P edit descriptor, for which a value of zero was assumed.o MESSAGE: Write to READONLY fileNUMBER: 47EXPLANATION: A write operation was attempted to a file thatwas declared READONLY in the OPEN statement that is currently in effect.o MESSAGE: Wrong number of argumentsEXPLANATION: An improper number of arguments was used to calla math library procedure.Error_MessagesShould be corrected. The program may continue execution, but the output from this execution may be incorrect.The error messages follow (in alphabetical order):o MESSAGE: Floating divide by zeroNUMBER: 73EXPLANATION: During a floating-point arithmetic operation, anattempt was made to divide by zero.o MESSAGE: Floating invalidNUMBER: 65EXPLANATION: During an arithmetic operation, thefloating-point value generated resulted in an invalid format (not representable for that data type).o MESSAGE: Floating overflowNUMBER: 72EXPLANATION: During an arithmetic operation, a floating-pointvalue exceeded the largest representable value for that data type. See your DEC Fortran user manual for ranges of thevarious data types.o MESSAGE: Floating point exceptionNUMBER: 75EXPLANATION: A floating-point exception occurred. Core dumpfile created. Possible causes include divide by zero,overflow, or an invalid operation, such as subtraction ofinfinite values, multiplication of zero by infinity (withoutsigns), division of zero by zero or infinity by infinity, and conversion of floating-point to fixed-point format when anoverflow prevents conversion.o MESSAGE: Floating underflowNUMBER: 74EXPLANATION: During an arithmetic operation, a floating-pointvalue became less than the smallest representable value forthat data type. On RISC systems (depending on the values ofthe f77 command -fpe option), the underflowed result was either set to zero or allowed to gradually underflow. On AXP systems, the underflowed result is set to zero. See your DEC Fortranuser manual for ranges of the various data types.o MESSAGE: Fortran abort routine calledNUMBER: 266EXPLANATION: The program called abort to terminate theprogram.o MESSAGE: IOT trap signalNUMBER: 76EXPLANATION: Core dump file created. Examine core dump forpossible cause of this IOT signal.o MESSAGE: Output conversion errorNUMBER: 63EXPLANATION: During a formatted output operation, the value ofa particular number could not be output in the specified field length without loss of significant digits. When this situation is encountered, the field is filled with asterisks.o MESSAGE: Process interrupted (SIGINT)NUMBER: 69EXPLANATION: The process received the signal SIGINT.Determine source of this interrupt signal (described insignal(3)).o MESSAGE: Process killed (SIGTERM)NUMBER: 78EXPLANATION: The process received the signal SIGTERM.Determine source of this software termination signal (described in signal(3)).o MESSAGE: Process quit (SIGQUIT)NUMBER: 79EXPLANATION: The process received the signal SIGQUIT. Coredump file created. Determine source of this quit signal(described in signal(3)).Warning_MessagesShould be investigated. The program continues execution, but the output from this execution may be incorrect.The warning messages follow (in alphabetical order):o MESSAGE: Could not open message catalog: formsg.cat NUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. See your DEC Fortran user manual for moreinformation.Informational_MessagesFor informational purposes only. Unless it accompanies anothermessage, the program continues.The informational messages follow (in alphabetical order):o MESSAGE: Check environment variable NLSPATH and protection of path-name/for_msg.datNUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. For more information, see your DEC Fortran user manual or your DEC Fortran installation guide.o MESSAGE: Check location/protection of NLS and/usr/lib/formsg.datNUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. See your DEC Fortran user manual for moreinformation.o MESSAGE: nn floating divide-by-zero trapsNUMBER: 299EXPLANATION: The total number of floating-point divide-by-zero traps encountered during program execution was nn. This summary message appears at program completion.o MESSAGE: nn floating invalid trapsNUMBER: 297EXPLANATION: The total number of floating-point invalid data traps encountered during program execution was nn. This summary message appears at program completion.o MESSAGE: nn floating overflow trapsNUMBER: 298EXPLANATION: The total number of floating-point overflow traps encountered during program execution was nn. This summary message appears at program completion.o MESSAGE: Floating-point conversion failedNUMBER: 95EXPLANATION: The attempted unformatted read or write ofnon-native floating-point data failed. A non-nativefloating-point value either exceeded the allowable maximumvalue for the equivalent native format and was set equal toinvalid, or the value was infinity (plus or minus), not anumber (NaN), or otherwise invalid and was set to invalid.Very small numbers are set to zero (0). This could be caused by the specified non-native floating-point format not matching the floating-point format found in the specified file.Make sure the correct file was specified. Make sure the recordlayout matches the format DEC Fortran is expecting. Check that the correct non-native floating-point data format wasspecified, as described in your DEC Fortran user manual.o MESSAGE: nn floating underflow trapsNUMBER: 300EXPLANATION: The total number of floating-point underflowtraps encountered during program execution was nn. Thissummary message appears at program completion.o MESSAGE: Format syntax error at or near xxNUMBER: 58EXPLANATION: Check the statement containing xx, a charactersubstring from the format string, for a format syntax error.For information about FORMAT statements, refer to the "DECFortran Language Reference Manual".o MESSAGE: Fortran error message number is nnnNUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. For information about the message file location and the error text that corresponds to the listed error number, nnn, see your DEC Fortran user manual.。

fortran90常见错误

fortran90常见错误

1、运行fortran时出现forrt1:severe<59>:list-directed I/O syntax error,unit 1,file G:\1\1\meat.dat怎么办这是通道1 ,链接到文件meat.dat 的读写出错了。

这问题你得认真检查类似read( 1 , * ) 或write( 1 , * ) 这样的语句,错误原因挺多的。

比如二进制文件用了文本方式读取,比如变量列表与文件不匹配。

问:另外forrt1:severe<161>:program exception -array bounds exceeded是怎么回事?回答:数组越界,也是很常见的错误。

比如real a(100)如果你使用了a(101) 就会越界,因为a 数组只有100 个元素。

2、fortran运行提示error M6201:math-**,现将代码贴出,求高手帮忙看看,急求解答!我不能确定你的错误是怎么引起的。

可能咱们的编译器不同。

你的代码在我这里的问题是:虚参和实参精度不同。

在程序中,你定义了部分real*8,但是对应的虚参和返回值却定义为real。

比如主程序里的z1(双精度),传入函数g里面的x却定义为单精度。

主程序Do 死循环了。

z2_jiashe和z2_suan每一次循环都没有发生改变,于是永远跳不出循环。

我给你的建议是:同一个程序,统一使用real*8 或real*4,尽量不要混用,除非你很自信能理清他们的关系。

检查Do 循环,尤其是z2_jiashe 和z2_suan,是否应该每次循环不同?fortran_排除错误(2012-04-20 23:22:44)安装好VISUAL FORTRAN后1、运行Developer studio即可开始编译FORTRAN程序2、选择File菜单中的New选项3、在弹出的对话框选择projects标签,其他标签不用管,projects格式选用Fortran console application;在project name里命名(最好英文名),点击“ok ”4、接下来画面中,选择“an empty project”,点击“finish”5、接下来画面点击“ok”6、再选择一次File菜单中的new7、对话框选用files标签,选择Fortran free format source file ,并在file里命名8、点击“ok”数Source Files 放源文件(.c、.cpp)程序的实现代码全放在这里Header Files 放头文件(.h)声明放在这里Resource Files 资源文件(.rc)放图标、图片、菜单、文字之类的,主要用来做界面的东东一般都放这里External Dependencies 除上三种以外的,程序编译时用到的文件全放这里fortran内部函数出错信息解释内部函数出错信息解释[sourcefile(line)]run-time error M62××MATH错误号函数级数学错误信息M6201 functionnames:DOMAIN error函数的自变量超出了约定的取值域,例如sqrt(-1)M6202 functionname:SING error无意义的变量。

fortran常见错误代码

fortran常见错误代码
For more information, see error 41. This error has no condition symbol.
11
severe (1): Not a Fortran-specific error
FOR$IOS_NOTFORSPE. An error in the user program or in the RTL was not a DIGITAL Fortran 90-specific error and was not reportable through any other DIGITAL Fortran 90 run-time messages. If you call ERRSNS, an error of this kind returns a value of 1 (for more information on the ERRSNS subroutine, see theDIGITAL Fortran Language Reference Manual).
Table 8-2 Run-Time Error Messages and Explanations
Number
Severity Level, Number, and Message Text; Condition Symbol and Explanation
None1
info: Fortran error message number isnnn
Rename or remove the existing file before rerunning the program.
Modify the source file to specify different file specification, I/O unit, or OPEN statement STATUS.

visual fortran常见运行错误

visual fortran常见运行错误

Insufficient virtual memory 虚拟内存不足Integer overflow 整数溢出错误Integer divide by zero 整数除0错误Floating overflow 浮点数溢出错误Floating divide by zero 浮点数除0错误Floating underflow 浮点数下溢错误Floating point exception 浮点数异常错误Subscript out of range 数组定义超出边界Floating-point conversion failed 浮点数格式转换失败Null pointer error 空指针错误Stack overflow 堆栈溢出String length error 字符串长度超出允许范围Substring error 数组下标超出允许范围Range error 整数值超出允许范围Allocatable array is already allocated 数组重复定义Program Exception - array bounds exceeded 引用数组下标超出允许范围Program Exception - denormal floating-point operand 非法浮点数操作符Program Exception - floating stack check 浮点数堆栈检查Program Exception - integer divide by zero 整数除0错误Program Exception - integer overflow 整数溢出Program Exception - privileged instruction 非法执行特权指令Program Exception - illegal instruction 非法指令Program Exception - stack overflow 堆栈溢出Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界CHARACTER substring expression out of range 字符串非法表示Label not found in assigned GOTO list 不属于GOTO语句引用的标号INTEGER arithmetic overflow 整数运算结果出现溢出INTEGER overflow on input 输入的整数值超出允许范围Invalid INTEGER 非法整数值REAL indefinite (uninitialized or previous error) 产生非法实数Invalid REAL 非法实数REAL math overflow 实数值溢出No matching CASE found for SELECT CASE select case语句中缺少case项INTEGER assignment overflow 整数定义超出允许范围A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符I edit descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符Multiple radix specifiers 输入或输出语句重复说明Array already allocated 数组已分配Array size zero or negative 数组大小为0或负数Array not allocated 没有被分配的数组Invalid argument 非法参数Invalid number in input 输入非法数字Invalid string in input 输入非法字符串Comma missing in COMPLEX input 输入的多个表达式之间缺少逗号T or F expected in LOGICAL read 输入的逻辑值必须是T或FIllegal character in hexadecimal input 输入非法的十六进制数Integer expected in format 格式语句中要求的整数Initial left parenthesis expected in format 格式语句中多余的左括号Positive integer expected in format 格式语句中要求用正整数Integer expected preceding H, X, or P edit descriptor 在H、X、P编辑符前要求用整数'.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔Unexpected end of format 格式语句没有结束Unexpected character in format 格式语句中的非法字符M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值Integer out of range in format 格式语句中的整数值超出允许范围Separator expected in format 格式语句中需要分隔符Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度Out of memory 内存不足Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组。

fortran90常见错误

fortran90常见错误

fortran90常见错误1、运行fortran时出现forrt1:severe<59>:list-directed I/O syntax error,unit 1,file G:\1\1\meat.dat怎么办这是通道1 ,链接到文件meat.dat 的读写出错了。

这问题你得认真检查类似read( 1 , * ) 或write( 1 , * ) 这样的语句,错误原因挺多的。

比如二进制文件用了文本方式读取,比如变量列表与文件不匹配。

问:另外forrt1:severe<161>:program exception -array bounds exceeded是怎么回事?回答:数组越界,也是很常见的错误。

比如real a(100)如果你使用了a(101) 就会越界,因为a 数组只有100 个元素。

2、fortran运行提示error M6201:math-**,现将代码贴出,求高手帮忙看看,急求解答!我不能确定你的错误是怎么引起的。

可能咱们的编译器不同。

你的代码在我这里的问题是:虚参和实参精度不同。

在程序中,你定义了部分real*8,但是对应的虚参和返回值却定义为real。

比如主程序里的z1(双精度),传入函数g里面的x却定义为单精度。

主程序Do 死循环了。

z2_jiashe 和 z2_suan 每一次循环都没有发生改变,于是永远跳不出循环。

我给你的建议是:同一个程序,统一使用real*8 或real*4,尽量不要混用,除非你很自信能理清他们的关系。

检查Do 循环,尤其是z2_jiashe 和z2_suan,是否应该每次循环不同?fortran_排除错误(2012-04-20 23:22:44)安装好VISUAL FORTRAN后1、运行Developer studio即可开始编译FORTRAN程序2、选择File菜单中的New选项3、在弹出的对话框选择projects标签,其他标签不用管,projects格式选用Fortran console application;在project name 里命名(最好英文名),点击“ok ”4、接下来画面中,选择“an empty project”,点击“finish”5、接下来画面点击“ok”6、再选择一次File菜单中的new7、对话框选用files标签,选择Fortran free format source file ,并在file里命名8、点击“ok”数Source Files 放源文件(.c、.cpp)程序的实现代码全放在这里Header Files 放头文件(.h)声明放在这里Resource Files 资源文件(.rc)放图标、图片、菜单、文字之类的,主要用来做界面的东东一般都放这里External Dependencies 除上三种以外的,程序编译时用到的文件全放这里fortran内部函数出错信息解释内部函数出错信息解释[sourcefile(line)]run-time error M62××MATH错误号函数级数学错误信息M6201 functionnames:DOMAIN error函数的自变量超出了约定的取值域,例如sqrt(-1)M6202 functionname:SING error无意义的变量。

fortran常见错误代码

fortran常见错误代码
If you have installed the Parallel Software Environment and compiled a program for parallel execution, additional messages specific to parallel execution may appear (see theDIGITAL High Performance Fortran 90 HPF and PSE Manual).
FOR$IOS_INVREFVAR. One of the following conditions occurred:
The variable was not a member of the namelist group.
An attempt was made to subscript a scalar variable.
20
severe (20): REWIND error
FOR$IOS_REWERR. One of the following conditions occurred:
The file was not a sequential file.
The file was not opened for sequential or append access.
22
severe (22): Input record too long
FOR$IOS_INPRECTOO. A record was read that exceeded the explicit or default record length specified when the file was opened. To read the file, use an OPEN statement with a RECL= value (record length) of the appropriate size.

fortran常见错误

fortran常见错误

fortran常见错误默认分类 2010-09-02 19:36:55 阅读80 评论0 字号:大中小订阅41 Insufficient virtual memory 虚拟内存不足70 Integer overflow 整数溢出错误71 Integer divide by zero 整数除0错误72 Floating overflow 浮点数溢出错误73 Floating divide by zero 浮点数除0错误74 Floating underflow 浮点数下溢错误75 Floating point exception 浮点数异常错误77 Subscript out of range 数组定义超出边界95 Floating-point conversion failed 浮点数格式转换失败146 Null pointer error 空指针错误147 Stack overflow 堆栈溢出148 String length error 字符串长度超出允许范围149 Substring error 数组下标超出允许范围150 Range error 整数值超出允许范围151 Allocatable array is already allocated 数组重复定义161 Program Exception - array bounds exceeded 引用数组下标超出允许范围162 Program Exception - denormal floating-point operand 非法浮点数操作符163 Program Exception - floating stack check 浮点数堆栈检查164 Program Exception - integer divide by zero 整数除0错误165 Program Exception - integer overflow 整数溢出166 Program Exception - privileged instruction 非法执行特权指令168 Program Exception - illegal instruction 非法指令170 Program Exception - stack overflow 堆栈溢出540 Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界541 CHARACTER substring expression out of range 字符串非法表示542 Label not found in assigned GOTO list 不属于GOTO语句引用的标号543 INTEGER arithmetic overflow 整数运算结果出现溢出544 INTEGER overflow on input 输入的整数值超出允许范围545 Invalid INTEGER 非法整数值546 REAL indefinite (uninitialized or previous error) 产生非法实数547 Invalid REAL 非法实数548 REAL math overflow 实数值溢出549 No matching CASE found for SELECT CASE select case语句中缺少case项550 INTEGER assignment overflow 整数定义超出允许范围556 A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符557 E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符558 I edit descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符559 L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符568 Multiple radix specifiers 输入或输出语句重复说明582 Array already allocated 数组已分配583 Array size zero or negative 数组大小为0或负数585 Array not allocated 没有被分配的数组610 Invalid argument 非法参数616 Invalid number in input 输入非法数字617 Invalid string in input 输入非法字符串618 Comma missing in COMPLEX input 输入的多个表达式之间缺少逗号619 T or F expected in LOGICAL read 输入的逻辑值必须是T或F622 Illegal character in hexadecimal input 输入非法的十六进制数637 Integer expected in format 格式语句中要求的整数638 Initial left parenthesis expected in format 格式语句中多余的左括号639 Positive integer expected in format 格式语句中要求用正整数641 Integer expected preceding H, X, or P edit descriptor 在H、X、P编辑符前要求用整数644 '.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔645 Unexpected end of format 格式语句没有结束646 Unexpected character in format 格式语句中的非法字符647 M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值648 Integer out of range in format 格式语句中的整数值超出允许范围650 Separator expected in format 格式语句中需要分隔符663 Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1664 Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度672 Out of memory 内存不足718 Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组727 Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组729 DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组用fortran时曾经有个问题很头疼,就是如果输出到屏幕的话当程序结束时或者出错关闭的时候了窗口就一闪而过,根本来不及看输出了什么,当然你可以添加pause语句,但是如果迭代上千次后出错那加pause也不顶用了。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

fortran运行常用错误(转)
(2006-11-1010:18:44)
转载▼
分类:分子动力学
41Insufficient virtual memory虚拟内存不足
70Integer overflow整数溢出错误
71Integer divide by zero整数除0错误
72Floating overflow浮点数溢出错误
73Floating divide by zero浮点数除0错误
74Floating underflow浮点数下溢错误
75Floating point exception浮点数异常错误
77Subscript out of range数组定义超出边界
95Floating-point conversion failed浮点数格式转换失败
146Null pointer error空指针错误
147Stack overflow堆栈溢出
148String length error字符串长度超出允许范围
149Substring error数组下标超出允许范围
150Range error整数值超出允许范围
151Allocatable array is already allocated数组重复定义
161Program Exception-array bounds exceeded引用数组下标超出允许范围162Program Exception-denormal floating-point operand非法浮点数操作符163Program Exception-floating stack check浮点数堆栈检查
164Program Exception-integer divide by zero整数除0错误
165Program Exception-integer overflow整数溢出
166Program Exception-privileged instruction非法执行特权指令
168Program Exception-illegal instruction非法指令
170Program Exception-stack overflow堆栈溢出
540Array or substring subscript expression out of range数组下标低下数组定义下界或高于数组定义上界
541CHARACTER substring expression out of range字符串非法表示
542Label not found in assigned GOTO list不属于GOTO语句引用的标号
543INTEGER arithmetic overflow整数运算结果出现溢出
544INTEGER overflow on input输入的整数值超出允许范围
545Invalid INTEGER非法整数值
546REAL indefinite(uninitialized or previous error)产生非法实数
547Invalid REAL非法实数
548REAL math overflow实数值溢出
549No matching CASE found for SELECT CASE select case语句中缺少case项
550INTEGER assignment overflow整数定义超出允许范围
556A edit descriptor expected for CHARACTER字符型数据的格式化输入和输出需要A编辑符
557E,F,D,or G edit descriptor expected for REAL实数型数据的格式化输入和输出需要E,F,D,G编辑符
558I edit descriptor expected for INTEGER整数型数据的格式化输入和输出需要I 编
辑符
559L edit descriptor expected for LOGICAL逻辑型数据的格式化输入和输出需要L 编
辑符
568Multiple radix specifiers输入或输出语句重复说明
582Array already allocated数组已分配
583Array size zero or negative数组大小为0或负数
585Array not allocated没有被分配的数组
610Invalid argument非法参数
616Invalid number in input输入非法数字
617Invalid string in input输入非法字符串
618Comma missing in COMPLEX input输入的多个表达式之间缺少逗号
619T or F expected in LOGICAL read输入的逻辑值必须是T或F
622Illegal character in hexadecimal input输入非法的十六进制数
637Integer expected in format格式语句中要求的整数
638Initial left parenthesis expected in format格式语句中多余的左括号
639Positive integer expected in format格式语句中要求用正整数
641Integer expected preceding H,X,or P edit descriptor在H、X、P编辑符前要求用整数
644'.'expected in format在D、E、F、G编辑符中w和d域之间用'.'分隔
645Unexpected end of format格式语句没有结束
646Unexpected character in format格式语句中的非法字符
647M field exceeds W field in I edit descriptor在I编辑符中M域的值大于W域的值
648Integer out of range in format格式语句中的整数值超出允许范围
650Separator expected in format格式语句中需要分隔符
663Out of range:substring starting position'pos'is less than1子字符串的起始位置小于1
664Out of range:substring ending position'pos'is greater than string leng th'len'子字符串的终止位置大于字符串长度
672Out of memory内存不足
718Cannot allocate temporary array--out of memory由于内存不足不能分配临时数组
727Cannot ALLOCATE allocatable array--out of memory由于内存不足不能分配数组729DEALLOCATE failure:ALLOCATABLE array is not ALLOCATED释放没有被分配的数组。

相关文档
最新文档