http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48587
--- Comment #4 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-04-14 08:12:33 UTC --- (In reply to comment #3) > I suppose one could put an OPEN .. CLOSE in a DO LOOP and see what happens > now. With gfortran 4.4.3 on Linux 2.6.32, /tmp on ext4, single SATA disk, and 2.67 GHz Xeon X3450 CPU, the following program program twobfiles implicit none integer, parameter :: dp = kind(1.0d0) integer :: ii, cnt, cnt2, cnt_rate real(dp) :: elapsed call system_clock(cnt, cnt_rate) do ii = 10, 10010 open(unit=ii, status="scratch") close(ii) end do call system_clock(cnt2) elapsed = real((cnt2 - cnt), dp) / cnt_rate print *, "Estimate for opening and closing 2 billion files: ", & elapsed * 2._dp**31 / 10000, " s." end program twobfiles estimates around 10 hours. I suspect current trunk and changing the code to use NEWUNIT= are in the same ballpark.