all the sudden strange behavior using above compiler. For illustration My source file is named U1.f95 with the following code
------------------
open (1, file="modinc395.t",status="old",position="rewind",&
action="read",iostat=ierror)
read(1,'(2(i3))') nps,npmx ; print*,"nps,npmx",nps,npmx
close(1) ; open (1, file="modinc395.t",status="old",position="append",&
action="readwrite",iostat=ierror)
write(1,*)" U1.f95" ; write(1,'("nps",(i2)," npmx",(i2))')nps,npmx
end
---------------------------
and named the file U1.f95
The source file modinc395.t which it reads is
-------------
5 1
-------------
on the top and only line of the file.
And at the dos command line I type
gfortran u1.f95
NOw as per above it is supposed to write, append to
the same file modinc395.t which it has been doing for over the last couple years properly but all the sudden now instead of writing to this file it writes to a created file fort.1 which i have nowhere told it to create or anything about this name. It writes
-----------
U1.f95
nps 5 npmx 1
-----------------
which is correct but it should be appending the file modinc395.t instead. Why all the sudden this change ? As far as i know i haven't changed anything. If i did something accidently what could it be ?
Note I have been using on a much longer source file with more writing. The above is just a simplified example. It does the same on the much longer file.
------------------
open (1, file="modinc395.t",status="old",position="rewind",&
action="read",iostat=ierror)
read(1,'(2(i3))') nps,npmx ; print*,"nps,npmx",nps,npmx
close(1) ; open (1, file="modinc395.t",status="old",position="append",&
action="readwrite",iostat=ierror)
write(1,*)" U1.f95" ; write(1,'("nps",(i2)," npmx",(i2))')nps,npmx
end
---------------------------
and named the file U1.f95
The source file modinc395.t which it reads is
-------------
5 1
-------------
on the top and only line of the file.
And at the dos command line I type
gfortran u1.f95
NOw as per above it is supposed to write, append to
the same file modinc395.t which it has been doing for over the last couple years properly but all the sudden now instead of writing to this file it writes to a created file fort.1 which i have nowhere told it to create or anything about this name. It writes
-----------
U1.f95
nps 5 npmx 1
-----------------
which is correct but it should be appending the file modinc395.t instead. Why all the sudden this change ? As far as i know i haven't changed anything. If i did something accidently what could it be ?
Note I have been using on a much longer source file with more writing. The above is just a simplified example. It does the same on the much longer file.