Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Status 30 on OPEN()

ereisch
New Contributor II
568 Views
I'm trying to open a file on a system with the following parameters:

OPEN(
1 UNIT = my_fd,
2 FILE = filename(1:nfilename),
3 ACCESS = 'DIRECT',
4 ORGANIZATION = 'RELATIVE',
5 FORM = 'UNFORMATTED',
6 RECORDTYPE = 'FIXED',
7 RECL = 2048,
8 CARRIAGECONTROL = 'NONE',
9 STATUS = openfilestatus,
1 IOSTAT = status,
2 SHARED
3 )

...and I'm getting status=30 when this function returns. I have several processes which are all opening the file simultaneously, and at present I'm not sure which one is throwing the error (still investigating that one). This only recently showed up when one of our customers upgraded their NFS server, and since then they haven't been able to get the file to successfully open (even on a local partition). I'm told the file in question is not present when the call is first made, and after the crashes there is a file there but with zero size.

Thanks.
0 Kudos
1 Solution
Steven_L_Intel1
Employee
568 Views
Hmm. Error 30 is "error during OPEN" which is a catch-all error when none of the other more specific cases apply (such as "file not found"). You might try calling ERRSNS(IOERR,ISYSERR) (IOERR and ISYSERR would be declared INTEGER) and seeing what the value of ISYSERR is after a failed OPEN. This will be an "errno" number from the underlying C library.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
569 Views
Hmm. Error 30 is "error during OPEN" which is a catch-all error when none of the other more specific cases apply (such as "file not found"). You might try calling ERRSNS(IOERR,ISYSERR) (IOERR and ISYSERR would be declared INTEGER) and seeing what the value of ISYSERR is after a failed OPEN. This will be an "errno" number from the underlying C library.
0 Kudos
ereisch
New Contributor II
568 Views
Incredibly helpful; I didn't know about the ERRSNS call. Turns out errno was 37 (-ENOLCK), so now we know which tree we should be barking at. Thanks.
0 Kudos
Reply