I found some of my programs running extremely slow with gfortran. Here is a test case that shows the problem -
[dranta:~/tests/gfortran-D] dir% g77 -o rdiska rdiska.f [dranta:~/tests/gfortran-D] dir% time rdiska 0.010u 0.080s 0:00.20 45.0% 0+0k 0+1io 0pf+0w [dranta:~/tests/gfortran-D] dir% gfortran -o rdiska rdiska.f [dranta:~/tests/gfortran-D] dir% time rdiska STOP 0 8.160u 29.010s 0:37.13 100.1% 0+0k 0+1io 0pf+0w [dranta:~/tests/gfortran-D] dir% cat rdiska.f program main implicit integer(a-z) dimension w(16384) common/frfcm1/mxfrf,ifrf,buflen,fcsize,dskloc ,curlen,kop,ier ncpw=4 buflen=16384 lrecl=ncpw*buflen open (3,access='direct',form='unformatted' 1,recl=lrecl,status='unknown') do 10 i=1,200 call wdiska(3,w,16384,(i-1)*buflen); 10 continue do 20 i=1,200 call rdiska(3,w,16384,(200-i)*buflen); 20 continue stop end subroutine rdiska (lus,w,nw,da) implicit integer(a-z) dimension w(nw) common/frfcm1/mxfrf,ifrf,buflen,fcsize,dskloc ,curlen,kop,ier lda=da/buflen+1 read (lus,rec=lda,iostat=ios) w return entry wdiska(lus,w,nw,da) lda=da/buflen+1 write (lus,rec=lda) w return c end -- Summary: gfortran 30 x slower that g77 on random I/O Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dir at lanl dot gov CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: powerpc-apple-darwin7.9.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23363