Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IOSTAT returns 37 on a write

rdtintel
Beginner
366 Views
Hi,
I am working with some Intel Fortan code that contains a line like:
write (UNIT=foo, REC=bar, IOSTAT=status) buff(1 : nbytes)
Very infrequently the status returned is 37. There does not appear to be anything strange
with the values of foo, bar, buff, or nbytes. However, "buff" is in a common block in shared
memory. This is a large system with interacting processes, something strange could be going on.
According to "Intel Fortran Building Applications", this is
Inconsistent record length
FOR$IOS_INCRECLEN. An attempt was made to open a direct acces file without
specifying a record length.
My question, is: What is the meaning of IOSTAT=37 for a write? Is it a normal return value from
write? When this happens, the file has usually been opened for quite a while.
If this is not a normal return value, then I have to consider the possibility that
the memory associated with file IO is being overwritten or something equally
difficult to debug. However, before going downthat road, i'd like to verify that
this IOSTAT value does not simply indicate a problem in the environment.
A pointer to the list of possible IOSTAT values for write would be great. I know where the list
of all possible IOSTAT return values is, but I don't know which ones are normally possible for write.
Thanks,
Ron
0 Kudos
1 Reply
Steven_L_Intel1
Employee
366 Views
There is no list of possible error codes by statement. I could imagine this happening on a WRITE if unit FOO was not currently open. Either variable FOO changed its value or the unit got closed earlier in the program.
0 Kudos
Reply