Issue opening file on NFS read-only mount
Bob Apodaca
bob@phxlab.honeywell.com
Wed Oct 30 21:02:00 GMT 2013
I am not certain this is a gfortran issue so feel free to point me in
the proper direction.
Here's the main issue: I am trying to read a file mounted via a
read-only NFS mount. This worked in Debian 6 (kernel 2.6.32 using
gfortran 4.4.5), but fails with Debian 7 (3.2.0-4-686-pae using gfortran
4.7.2 or gfortran 4.4.7).
Sample code:
FN = '/mnt/nfs/stuff/stuff/' //
+ 'morestuff/file'
OPEN (UNIT=7, FILE=FN )
READ (7, '( A )' , END=50) FILE_LINE
CLOSE (7)
When I used strace to try to understand this is what I am seeing:
stat64("/mnt/nfs/stuff/stuff/more_stuff/file", {st_mode=S_IFREG|0664,
st_size=15533, ...}) = 0
open("/mnt/nfs/stuff/stuff/more_stuff/file", O_RDWR|O_CREAT|O_LARGEFILE,
0666) = -1 EROFS (Read-only file system)
open("/mnt/nfs/stuff/stuff/more_stuff/file",
O_RDONLY|O_CREAT|O_LARGEFILE, 0666) = -1 ENOTDIR (Not a directory)
When I compile the same code on squeeze, I get:
open("/mnt/nfs/stuff/stuff/more_stuff/file", O_RDWR|O_CREAT|O_LARGEFILE,
0666) = -1 EROFS (Read-only file system)
open("/mnt/nfs/stuff/stuff/more_stuff/file",
O_RDONLY|O_CREAT|O_LARGEFILE, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=15533, ...}) = 0
When I run the code compiled on squeeze on a wheezy system, I get the
same result as code compiled on a wheezy system. This makes me suspect
gfortran may not be the issue, but I am not sure what the issue could be.
I would appreciate any help or advice.
More information about the Fortran
mailing list