IO: Add ACTION and STATUS flags to OPEN statements.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
9455f9be9a
commit
68449d0ccc
@ -2420,7 +2420,8 @@ module io
|
||||
'compressed_size', csize)
|
||||
allocate(buffer(csize))
|
||||
|
||||
open (newunit=io, file=file_path, access='stream', action='read')
|
||||
open (newunit=io, file=file_path, access='stream', &
|
||||
status='old', action='read')
|
||||
read (io) buffer
|
||||
close (io)
|
||||
|
||||
@ -2474,7 +2475,8 @@ module io
|
||||
end if
|
||||
|
||||
else
|
||||
open (newunit=io, file=file_path, access='stream', action='read')
|
||||
open (newunit=io, file=file_path, access='stream', &
|
||||
status='old', action='read')
|
||||
read (io) array
|
||||
close (io)
|
||||
end if
|
||||
@ -2611,7 +2613,8 @@ module io
|
||||
filename = trim(array_file) // '.bin' // file_suffix
|
||||
filepath = trim(data_path) // trim(filename)
|
||||
|
||||
open (newunit=io, file=filepath, access='stream')
|
||||
open (newunit=io, file=filepath, access='stream', &
|
||||
action='write', status='replace')
|
||||
write (io) buffer(1:cbytes)
|
||||
close (io)
|
||||
|
||||
@ -2646,7 +2649,8 @@ module io
|
||||
filename = trim(array_file) // '.bin'
|
||||
filepath = trim(data_path) // trim(filename)
|
||||
|
||||
open (newunit=io, file=filepath, access='stream')
|
||||
open (newunit=io, file=filepath, access='stream', &
|
||||
action='write', status='replace')
|
||||
write (io) array
|
||||
close (io)
|
||||
|
||||
@ -5191,7 +5195,7 @@ module io
|
||||
write (fname, "('p',i6.6,'_',i5.5,'.xdmf')") isnap, nproc
|
||||
write (hname, "('p',i6.6,'_',i5.5,'.h5' )") isnap, nproc
|
||||
|
||||
open (unit = xdmf, file = fname, status = 'replace')
|
||||
open (unit=xdmf, file=fname, status='replace')
|
||||
|
||||
! write the header
|
||||
!
|
||||
@ -5379,7 +5383,7 @@ module io
|
||||
!
|
||||
write (fname, "('p',i6.6,'.xdmf')") isnap
|
||||
|
||||
open (unit = xdmf, file = fname, status = 'replace')
|
||||
open (unit=xdmf, file=fname, status='replace')
|
||||
|
||||
! write the header
|
||||
!
|
||||
|
Loading…
x
Reference in New Issue
Block a user