From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29166 invoked by alias); 30 May 2005 14:32:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29157 invoked by uid 48); 30 May 2005 14:32:28 -0000 Date: Mon, 30 May 2005 14:33:00 -0000 From: "kargl at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050530143227.21820.kargl@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libfortran/21820] New: Really, really, horrible IO performance X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg03840.txt.bz2 List-Id: Consider the following program: program kl integer i,j,k integer, parameter :: m = 1000, n = 387 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) end program kl We find the following performance on multiple executions. kargl[225] rm foo.dat kargl[227] gfc40 -static -o z kl.f90 kargl[228] time ./z 0.11 real 0.05 user 0.05 sys kargl[229] time ./z 29.44 real 0.36 user 28.13 sys kargl[230] time ./z 28.77 real 0.25 user 28.07 sys kargl[231] rm foo.dat kargl[232] gfc41 -static -o z kl.f90 kargl[233] time ./z 0.23 real 0.06 user 0.05 sys kargl[234] time ./z 0.11 real 0.05 user 0.06 sys kargl[235] time ./z 0.11 real 0.03 user 0.08 sys Here gfc40 is an unpatched gfortran from 4.0.1, and gfc41 is a patched gfortran from HEAD. Now, image the performance if m = 1080 and n = 25000. Oh, the inhumanity! See attached patch for suggested fix. -- Summary: Really, really, horrible IO performance Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kargl at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21820