Re: About Migrating from F77 to F95



zuying@xxxxxxxxx wrote:
Hi all,

I used to write f77 codes and now I want to migrate to f95. Since
there is a large set of old f77 styled codes in my own lib, I have
several questions on the necessities for the migration:

1. if I keep the old codes unchanged and only re-compile them with
compilers like ifort, will the efficiency be promoted a lot even
without rewriting codes? and in what degree the efficiency will be
promoted if I further rewrite all the codes in f95 style and recompile
them with ifort?


As others said, you ask for a comparison between an unknown compiler and an unknown version of ifort, so no answer makes much sense. ifort, particularly in the latest versions, is exceptionally good at vectorizing loops with many assignments, provided they meet the qualifications. It also necessarily works harder at vectorizing double precision than certain other compilers.

ifort will gain efficiency from modern syntax only in those cases where your rewrite forces you to make better optimizable source code. ifort for 32-bit and 32-bit extended 64-bit depends heavily on vectorization of stride 1 arrays as its primary means for optimization. ifort still tends to be weak in optimization of array syntax with non-default stride.
ifort is just beginning to address the issues of fusion for efficiency for the recent CPUs which care about it. So, you might not gain as much from such a move if you don't intend to keep your compiler up to date.

gfortran is doing well in optimization of f95 syntax, short of dealing with fusion and the like.
.



Relevant Pages

  • Re: About Migrating from F77 to F95
    ... compilers like ifort, will the efficiency be promoted a lot even ... without rewriting codes? ... When that all works you might consider replacing fixed storage with dynamic ...
    (comp.lang.fortran)
  • Re: optical design software
    ... Exporting from the optical engineering programs to CAD seems to be the ... SolidWorks into FRED and Zemax needs some special care in the ... Another poster has the opinion that these codes dont do optimization. ...
    (sci.optics)
  • Re: About Migrating from F77 to F95
    ... I used to write f77 codes and now I want to migrate to f95. ... That depends on what Fortran 77 compiler you have been using. ...
    (comp.lang.fortran)
  • Re: About Migrating from F77 to F95
    ... Then I gonna stay with my previous codes and only write ... f95 for new codes. ... promoted if I further rewrite all the codes in f95 style and recompile ... But if you convert to an f95 style ...
    (comp.lang.fortran)
  • About Migrating from F77 to F95
    ... I used to write f77 codes and now I want to migrate to f95. ... is there any suggestion form you experienced guys about rewriting ...
    (comp.lang.fortran)