This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/21820] Really, really, horrible IO performance
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 May 2005 07:38:41 -0000
- Subject: [Bug libfortran/21820] Really, really, horrible IO performance
- References: <20050530143227.21820.kargl@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-05-31 07:38 -------
First thing: I can reproduce the timings differences on my i386-linux, with ext3
filesystem.
Second thing: Steve, your patch truncates files, which is not correct! Given the
following modified testcase:
$ cat pr21820.f90
program kl
integer i,j,k
integer, parameter :: m = 1000, n = 300, n2 = 20
real x(m,n)
x = 1.e0
inquire(iolength=k) (x(i,1), i=1, m)
open(unit=1, file='foo.dat', access='direct', recl=k)
do j = 1, n
write(1,rec=j) (x(i,j), i=1, n)
end do
close(1)
open(unit=1, file='foo.dat', access='direct', recl=k)
do j = 1, n2
write(1,rec=j) (x(i,j), i=1, n)
end do
close(1)
end program kl
With an unpatched gfortran, I get:
$ ./a.out && ll foo.dat
-rw-r--r-- 1 fx fx 1.2M May 31 09:38 foo.dat
while your patch yields to:
$ ./a.out && ll foo.dat
-rw-r--r-- 1 fx fx 76K May 31 09:35 foo.dat
See the difference in sizes!
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-05-31 07:38:40
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21820