https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25829

Nicolas Koenig <koenigni at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #44106|0                           |1
        is obsolete|                            |

--- Comment #41 from Nicolas Koenig <koenigni at gcc dot gnu.org> ---
Created attachment 44151
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44151&action=edit
Next version of patch.

Yet another patch version.

Error handling is partially implemented, iostat and iomsg work for WAIT.

This patch drops all pending I/O requests when an error occurs. Given that
trying to flush corrupted data almost always is a bad idea, this seems like the
only sensible way.

Timing data:

With

program main
  implicit none
  integer, parameter :: n = 10**7
  character(3), parameter :: yes = "no"
  real, dimension(n) :: a,b,c

  call random_number(a)
  call random_number(b)
  call random_number(c)
  open (10, file="a.dat",asynchronous=yes)
  open (20, file="b.dat",asynchronous=yes)
  open (30, file="c.dat",asynchronous=yes)
  write (10,*,asynchronous=yes) a
  write (20,*,asynchronous=yes) b
  write (30,*,asynchronous=yes) c
  wait (10)
  wait (20)
  wait (30)
end program main

real    0m15.465s
user    0m15.313s
sys     0m0.152s

With the "no" replaced by "yes":

real    0m5.558s
user    0m16.253s
sys     0m0.152s

If you ask me, that's quite nice :)

Reply via email to