.f90 runs slower than .f

Steve Kargl sgk@troutmask.apl.washington.edu
Thu Aug 2 20:53:00 GMT 2012


On Thu, Aug 02, 2012 at 05:35:02PM +0100, Rachel Dowdall wrote:
> 
> I compiled with gfortran-4.7:
> FFLAGS  = -static -O3  -pg  -ffree-form
> with some flags that link to a fortran XML reader (should be 
> irrelevant), and yes I have tried turning off -pg.
> I'm not a computer scientist so I don't really understand what the 
> compiler would be doing that could cause this or how I can stop it. Does 
> it make certain assumptions about .f files that it cannot about .f90 
> (like no pointers)? The rest of the code is using some fortran 2003/2008 
> features.

Since you are compiling with the -pg flag, you can look
at the profile to see where the bottleneck may be.  If you 
do

 gfortran -pg -O3 -ffree-form -o z file.f ... rest of junk here
 gprof -b -l z z.gmon

with both the .f and .f90 files, wew may be able to see
what is broken. 

-- 
Steve



More information about the Fortran mailing list