Sun Studio 12 Update 1: Fortran User's Guide

A.2 f95 Runtime I/O Error Messages

The f95 I/O library issues diagnostic messages when errors are detected at runtime. Here is an example, compiled and run with 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

Because the f95 message contains references to the originating source code filename and line number, application developers should consider using the ERR= clause in I/O statements to softly trap runtime I/O errors.

Table A–1 lists the runtime I/O messages issued by f95.

Table A–1 f95 Runtime I/O Messages

Error  

Message  

1000

format error

1001

illegal unit number

1002

formatted I/O on unformatted unit

1003

unformatted I/O on formatted unit

1004

direct-access I/O on sequential-access unit

1005

sequential-access I/O on direct-access unit

1006

device does not support BACKSPACE

1007

off beginning of record

1008

can’t stat file

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

1025

incompatible specifiers in open

1026

illegal input for namelist

1027

error in FILEOPT parameter

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

1054

direct-access WRITE to unconnected unit

1055

unassociated internal unit

1056

null reference to internal unit

1057

empty internal file

1058

list-directed I/O on unformatted unit

1059

namelist I/O on unformatted unit

1060

tried to write past end of internal file

1061

unassociated ADVANCE specifier

1062

ADVANCE specifier is not ’YES’ or ’NO’

1063

EOR specifier present for advancing input

1064

SIZE specifier present for advancing input

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

1070

zero stride in subscript triplet

1071

zero step in implied DO-loop

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

1089

NAMELIST group name does not match the name in the program

1090

unexpected character in NAMELIST item

1091

unmatched parenthesis in NAMELIST item name

1092

variable not in NAMELIST group

1093

too many subscripts in NAMELIST object name

1094

not enough subscripts in NAMELIST object name

1095

zero stride in NAMELIST object name

1096

empty section subscript in NAMELIST object name

1097

subscript out of bounds in NAMELIST object name

1098

empty substring in NAMELIST object name

1099

substring out of range in NAMELIST object name

1100

unexpected component name in NAMELIST object name

1111

unassociated ACCESS specifier

1112

unassociated ACTION specifier

1113

unassociated BINARY specifier

1114

unassociated BLANK specifier

1115

unassociated DELIM specifier

1116

unassociated DIRECT specifier

1117

unassociated FILE specifier

1118

unassociated FMT specifier

1119

unassociated FORM specifier

1120

unassociated FORMATTED specifier

1121

unassociated NAME specifier

1122

unassociated PAD specifier

1123

unassociated POSITION specifier

1124

unassociated READ specifier

1125

unassociated READWRITE specifier

1126

unassociated SEQUENTIAL specifier

1127

unassociated STATUS specifier

1128

unassociated UNFORMATTED specifier

1129

unassociated WRITE specifier

1130

zero length file name

1131

ACCESS specifier is not ’SEQUENTIAL’ or ’DIRECT’

1132

ACTION specifier is not ’READ’, ’WRITE’ or ’READWRITE’

1133

BLANK specifier is not ’ZERO’ or ’NULL’

1134

DELIM specifier is not ’APOSTROPHE’, ’QUOTE’, or ’NONE’

1135

unexpected FORM specifier

1136

PAD specifier is not ’YES’ or ’NO’

1137

POSITION specifier is not ’APPEND’, ’ASIS’, or ’REWIND’

1138

RECL specifier is zero or negative

1139

no record length specified for direct-access file

1140

unexpected STATUS specifier

1141

status is specified and not ’OLD’ for connected unit

1142

STATUS specifier is not ’KEEP’ or ’DELETE’

1143

status ’KEEP’ specified for a scratch file

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

1150

status is ’NEW’ and the file is a symbolic link

1151

no free scratch file names

1152

specifier ACCESS=’STREAM’ for default unit

1153

stream-access to default unit

1161

device does not support REWIND

1162

read permission required for BACKSPACE

1163

BACKSPACE on direct-access unit

1164

BACKSPACE on binary unit

1165

end-of-file seen while backspacing

1166

write permission required for ENDFILE

1167

ENDFILE on direct-access unit

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

1172

unassociated ASYNCHRONOUS specifier

1173

unassociated DECIMAL specifier

1174

unassociated IOMSG specifier

1175

unassociated ROUND specifier

1176

unassociated STREAM specifier

1177

ASYNCHRONOUS specifier is not ’YES’ or ’NO’

1178

ROUND specifier is not ’UP’, ’DOWN’, ’ZERO’, ’NEAREST’, ’COMPATIBLE’ or ’PROCESSOR-DEFINED’

1179

DECIMAL specifier is not ’POINT’ or ’COMMA’

1180

RECL specifier is not allowed in OPEN statement for stream-access unit

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

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

1214

asynchronous I/O on synchronous unit

1215

a data edit descriptor and I/O list item type are incompatible

1216

current I/O list item doesn’t match with any data edit descriptor

1217

illegal CORR_ACCTION value

1218

infinite loop occurred due to I/O handler enabled

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

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)

2022

deadlock in using lock variable (OpenMP)

2023

lock not set (OpenMP)