Oracle® Solaris Studio 12.4:Fortran 用户指南

退出打印视图

更新时间: 2014 年 12 月
 
 

运行时错误消息

本附录介绍由 Fortran 运行时 I/O 库和操作系统生成的错误消息。

A.1 操作系统错误消息

操作系统错误消息包括系统调用失败、C 库错误和 shell 诊断。系统调用错误消息可在 intro(2) 中找到。通过 Fortran 库进行的系统调用并不直接生成错误消息。Fortran 库中的以下系统例程将调用 C 库例程,而这些库例程可生成错误消息:

        integer system, status
        status = system("cp  afile bfile")
        print*, "status = ", status
        end

显示以下消息:

cp: cannot access afile
 status =  512

A.2 f95 运行时 I/O 错误消息

f95 I/O 库在运行时检测到错误的时候发出诊断消息。下面是一个使用 f95 编译和运行的示例:

demo% cat wf.f
      WRITE( 6 ) 1
      END
demo% f95 -o wf wf.f
demo% wf

 ******  FORTRAN RUN-TIME SYSTEM  ******
 Error 1003:  unformatted I/O on formatted unit
 Location:  the WRITE statement at line 1 of "wf.f"
 Unit:  6
 File:  standard output
Abort

因为 f95 消息包含对原始源代码文件名和行号的引用,所以应用程序开发者应该考虑在 I/O 语句中使用 ERR= 子句以软件方式捕获运行时 I/O 错误。

Table A–1 列出了由 f95 发出的运行时 I/O 消息。

表 A-1  f95 运行时 I/O 消息
错误
消息
1000
format error(格式错误)
1001
illegal unit number(非法的单元编号)
1002
formatted I/O on unformatted unit(未格式化单元上的格式化 I/O)
1003
unformatted I/O on formatted unit(格式化单元上的未格式化 I/O)
1004
direct-access I/O on sequential-access unit(顺序访问单元上的直接存取 I/O)
1005
sequential-access I/O on direct-access unit(直接访问单元上的顺序存取 I/O)
1006
device does not support BACKSPACE(设备不支持 BACKSPACE)
1007
off beginning of record(超出记录的开头)
1008
can’t stat file(无法对文件执行 stat 操作)
1009
no * after repeat count(重复计数后没有 *)
1010
record too long(记录太长)
1011
truncation failed(截断失败)
1012
incomprehensible list input(无法理解的列表输入)
1013
out of free space(可用空间不足)
1014
unit not connected(单元未连接)
1015
read unexpected character(读取意外的字符)
1016
illegal logical input field(非法逻辑输入字段)
1017
’new’ file exists(“新”文件已存在)
1018
can’t find ’old’ file(无法找到“旧”文件)
1019
unknown system error(未知的系统错误)
1020
requires seek ability(需要查找功能)
1021
illegal argument(非法参数)
1022
negative repeat count(重复计数为负)
1023
illegal operation for channel or device(通道或设备的操作非法)
1024
reentrant I/O(重进入 I/O)
1025
incompatible specifiers in open(打开的说明符不兼容)
1026
illegal input for namelist(名称列表的输入非法)
1027
error in FILEOPT parameter(FILEOPT 参数中有错误)
1028
writing not allowed(不允许写入)
1029
reading not allowed(不允许读取)
1030
integer overflow on input(输入上的整数溢出)
1031
floating-point overflow on input(输入上的浮点溢出)
1032
floating-point underflow on input(输入上的浮点下溢)
1051
default input unit closed(缺省输入单元已关闭)
1052
default output unit closed(缺省输出单元已关闭)
1053
direct-access READ from unconnected unit(从未连接单元直接进行 READ 访问)
1054
direct-access WRITE to unconnected unit(对未连接单元直接进行 WRITE 访问)
1055
unassociated internal unit(非关联的内部单元)
1056
null reference to internal unit(对内部单元的空引用)
1057
empty internal file(空内部文件)
1058
list-directed I/O on unformatted unit(未格式化单元上的列表引导 I/O)
1059
namelist I/O on unformatted unit(未格式化单元上的名称列表 I/O)
1060
tried to write past end of internal file(写操作已超过内部文件的结尾)
1061
unassociated ADVANCE specifier(非关联 ADVANCE 说明符)
1062
ADVANCE specifier is not ’YES’ or ’NO’(ADVANCE 说明符不是 'YES' 或 'NO')
1063
EOR specifier present for advancing input(出现针对高级输入的 EOR 说明符)
1064
SIZE specifier present for advancing input(出现针对高级输入的 SIZE 说明符)
1065
negative or zero record number(记录数为负或零)
1066
record not in file(记录不在文件中)
1067
corrupted format(格式已破坏)
1068
unassociated input variable(非关联的输入变量)
1069
more I/O-list items than data edit descriptors(I/O 列表项比数据编辑描述符多)
1070
zero stride in subscript triplet(下标三重态中的零跨距)
1071
zero step in implied DO-loop(隐含 DO 循环中的零步骤)
1072
negative field width(字段宽度为负)
1073
zero-width field(字段宽为零)
1074
character string edit descriptor reached on input(到达输入上的字符串编辑描述符)
1075
Hollerith edit descriptor reached on input(到达输入上的霍尔瑞斯编辑描述符)
1076
no digits found in digit string(数字字符串中没有数字)
1077
no digits found in exponent(指数中没有数字)
1078
scale factor out of range(比例因子超出范围)
1079
digit equals or exceeds radix(数字等于或超过基数)
1080
unexpected character in integer field(整数字段中的意外字符)
1081
unexpected character in real field(实数字段中的意外字符)
1082
unexpected character in logical field(逻辑字段中的意外字符)
1083
unexpected character in integer value(整数值中的意外字符)
1084
unexpected character in real value(实数值中的意外字符)
1085
unexpected character in complex value(复数值中的意外字符)
1086
unexpected character in logical value(逻辑值中的意外字符)
1087
unexpected character in character value(字符值中的意外字符)
1088
unexpected character before NAMELIST group name(NAMELIST 组名前的意外字符)
1089
NAMELIST group name does not match the name in the program(NAMELIST 组名与程序中的名称不匹配)
1090
unexpected character in NAMELIST item(NAMELIST 项中的意外字符)
1091
unmatched parenthesis in NAMELIST item name(NAMELIST 项名中的括号不匹配)
1092
variable not in NAMELIST group(变量不在 NAMELIST 组中)
1093
too many subscripts in NAMELIST object name(NAMELIST 对象名称中的下标太多)
1094
not enough subscripts in NAMELIST object name(NAMELIST 对象名称中的下标不足)
1095
zero stride in NAMELIST object name(NAMELIST 对象名称中的零跨距)
1096
empty section subscript in NAMELIST object name(NAMELIST 对象名称中的空节下标)
1097
subscript out of bounds in NAMELIST object name(NAMELIST 对象名称中的下标超出界限)
1098
empty substring in NAMELIST object name(NAMELIST 对象名称中的空子字符串)
1099
substring out of range in NAMELIST object name(NAMELIST 对象名称中的子字符串超出范围)
1100
unexpected component name in NAMELIST object name(NAMELIST 对象名称中的意外组件名称)
1111
unassociated ACCESS specifier(非关联 ACCESS 说明符)
1112
unassociated ACTION specifier(非关联 ACTION 说明符)
1113
unassociated BINARY specifier(非关联 BINARY 说明符)
1114
unassociated BLANK specifier(非关联 BLANK 说明符)
1115
unassociated DELIM specifier(非关联 DELIM 说明符)
1116
unassociated DIRECT specifier(非关联 DIRECT 说明符)
1117
unassociated FILE specifier(非关联 FILE 说明符)
1118
unassociated FMT specifier(非关联 FMT 说明符)
1119
unassociated FORM specifier(非关联 FORM 说明符)
1120
unassociated FORMATTED specifier(非关联 FORMATTED 说明符)
1121
unassociated NAME specifier(非关联 NAME 说明符)
1122
unassociated PAD specifier(非关联 PAD 说明符)
1123
unassociated POSITION specifier(非关联 POSITION 说明符)
1124
unassociated READ specifier(非关联 READ 说明符)
1125
unassociated READWRITE specifier(非关联 READWRITE 说明符)
1126
unassociated SEQUENTIAL specifier(非关联 SEQUENTIAL 说明符)
1127
unassociated STATUS specifier(非关联 STATUS 说明符)
1128
unassociated UNFORMATTED specifier(非关联 UNFORMATTED 说明符)
1129
unassociated WRITE specifier(非关联 WRITE 说明符)
1130
zero length file name(零长度文件名)
1131
ACCESS specifier is not ’SEQUENTIAL’ or ’DIRECT’(ACCESS 说明符不是 'SEQUENTIAL' 或 'DIRECT')
1132
ACTION specifier is not ’READ’, ’WRITE’ or ’READWRITE’(ACTION 说明符不是 'READ'、'WRITE' 或 'READWRITE')
1133
BLANK specifier is not ’ZERO’ or ’NULL’(BLANK 说明符不是 'ZERO' 或 'NULL')
1134
DELIM specifier is not ’APOSTROPHE’, ’QUOTE’, or ’NONE’(DELIM 说明符不是 'APOSTROPHE'、'QUOTE' 或 'NONE')
1135
unexpected FORM specifier(意外的 FORM 说明符)
1136
PAD specifier is not ’YES’ or ’NO’(PAD 说明符不是 'YES' 或 'NO')
1137
POSITION specifier is not ’APPEND’, ’ASIS’, or ’REWIND’(POSITION 说明符不是 'APPEND'、'ASIS' 或 'REWIND')
1138
RECL specifier is zero or negative(RECL 说明符为零或负数)
1139
no record length specified for direct-access file(没有为直接访问文件指定记录长度)
1140
unexpected STATUS specifier(意外的 STATUS 说明符)
1141
status is specified and not ’OLD’ for connected unit(指定了状态,但不是针对单元的 'OLD')
1142
STATUS specifier is not ’KEEP’ or ’DELETE’(STATUS 说明符不是 'KEEP' 或 'DELETE')
1143
status ’KEEP’ specified for a scratch file(为临时文件指定了状态 'KEEP')
1144
impossible status value(不可能的状态值)
1145
a file name has been specified for a scratch file(已经为临时文件指定了文件名)
1146
attempting to open a unit that is being read from or written to(正在尝试打开在下列内容中读取或写入的单元)
1147
attempting to close a unit that is being read from or written to(正在尝试关闭在下列内容中读取或写入的单元)
1148
attempting to open a directory(正在尝试打开目录)
1149
status is ’OLD’ and the file is a dangling symbolic link(状态是 'OLD',文件是不定符号链接)
1150
status is ’NEW’ and the file is a symbolic link(状态是 'NEW',文件是符号链接)
1151
no free scratch file names(没有可用的临时文件名)
1152
specifier ACCESS=’STREAM’ for default unit(对于缺省单元,说明符 ACCESS='STREAM')
1153
stream-access to default unit(对缺省单元的流访问)
1161
device does not support REWIND(设备不支持 REWIND)
1162
read permission required for BACKSPACE(BACKSPACE 需要读权限)
1163
BACKSPACE on direct-access unit(直接访问单元上的 BACKSPACE)
1164
BACKSPACE on binary unit(二进制单元上的 BACKSPACE)
1165
end-of-file seen while backspacing(在 backspace 操作期间看到文件结尾)
1166
write permission required for ENDFILE(ENDFILE 需要写权限)
1167
ENDFILE on direct-access unit(直接访问单元上的 ENDFILE)
1168
stream-access to sequential or direct-access unit(对连续或直接访问单元的流访问)
1169
stream-access to unconnected unit(对未连接单元的流访问)
1170
direct-access to stream-access unit(对流访问单元的直接访问)
1171
incorrect value of POS specifier(POS 说明符的值错误)
1172
unassociated ASYNCHRONOUS specifier(非关联 ASYNCHRONOUS 说明符)
1173
unassociated DECIMAL specifier(非关联 DECIMAL 说明符)
1174
unassociated IOMSG specifier(非关联 IOMSG 说明符)
1175
unassociated ROUND specifier(非关联 ROUND 说明符)
1176
unassociated STREAM specifier(非关联 STREAM 说明符)
1177
ASYNCHRONOUS specifier is not ’YES’ or ’NO’(ASYNCHRONOUS 说明符不是 'YES' 或 'NO')
1178
ROUND specifier is not ’UP’, ’DOWN’, ’ZERO’, ’NEAREST’, ’COMPATIBLE’ or ’PROCESSOR-DEFINED’(ROUND 说明符不是 'UP'、'DOWN'、'ZERO'、'NEAREST'、'COMPATIBLE' 或 'PROCESSOR-DEFINED')
1179
DECIMAL specifier is not ’POINT’ or ’COMMA’(DECIMAL 说明符不是 'POINT' 或 'COMMA')
1180
RECL specifier is not allowed in OPEN statement for stream-access unit(在流访问单元的 OPEN 语句中不允许有 RECL 说明符)
1181
attempting to allocate an allocated array(正在尝试分配已分配的数组)
1182
deallocating an unassociated pointer(正在取消分配非关联的指针)
1183
deallocating an unallocated allocatable array(正在取消分配未分配的可分配数组)
1184
deallocating an allocatable array through a pointer(正取消分配可通过指针分配的数组)
1185
deallocating an object not allocated by an ALLOCATE statement(正在取消分配不是由 ALLOCATE 语句分配的对象)
1186
deallocating a part of an object(正在取消分配对象的一部分)
1187
deallocating a larger object than was allocated(正在取消比已分配的对象大的对象)
1191
unallocated array passed to array intrinsic function(向数组固有函数传递了未分配的数组)
1192
illegal rank(非法的等级)
1193
small source size(源尺寸小)
1194
zero array size(数组尺寸为零)
1195
negative elements in shape(形状中的元素为负)
1196
illegal kind(非法的种类)
1197
nonconformable array(不一致的数组)
1213
asynchronous I/O on unconnected unit(未连接单元上的异步 I/O)
1214
asynchronous I/O on synchronous unit(同步单元上的异步 I/O)
1215
a data edit descriptor and I/O list item type are incompatible(数据编辑描述符与 I/O 列表项类型不兼容)
1216
current I/O list item doesn’t match with any data edit descriptor(当前 I/O 列表项与所有数据编辑描述符都不匹配)
1217
illegal CORR_ACCTION value(非法的 CORR_ACCTION 值)
1218
infinite loop occurred due to I/O handler enabled(由于启用 I/O 处理程序而发生死循环)
1220
the number of requested bytes is greater than is supported on the target platform(所请求的字节数大于目标平台上所支持的字节数)
1221
data in a UNION cannot be read from or written to an incompatible file type(UNION 中的数据无法从不兼容的文件类型读取,也不能写入不兼容的文件类型)
2001
invalid constant, structure, or component name(无效的常数、结构或组件名称)
2002
handle not created(未创建句柄)
2003
character argument too short(字符变量太短)
2004
array argument too long or too short(数组变量太长或太短)
2005
end of file, record, or directory stream(文件、记录或目录流的结尾)
2021
lock not initialized (OpenMP)(未将锁定初始化 (OpenMP))
2022
deadlock in using lock variable (OpenMP)(正在使用锁定变量的死锁 (OpenMP))
2023
lock not set (OpenMP)(未设置锁定 (OpenMP))