JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for COMP-FORTRAN-90 Archives


COMP-FORTRAN-90 Archives

COMP-FORTRAN-90 Archives


COMP-FORTRAN-90@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

COMP-FORTRAN-90 Home

COMP-FORTRAN-90 Home

COMP-FORTRAN-90  2000

COMP-FORTRAN-90 2000

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Reasons to convert existing Fortran 77 code to Fortran 90

From:

Richard Maine <[log in to unmask]>

Reply-To:

Richard Maine <[log in to unmask]>

Date:

Fri, 19 May 2000 13:57:48 -0700 (PDT)

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (96 lines)

A Leonard writes:
 > Can you give me compelling reasons to use to convince our management and the 
 > other developers here to take the time to convert more than 200,000 lines of 
 > existing code to Fortran 90?

It should not take any time at all to convert Fortran 77 code to
Fortran 90.  Fortran 77 is a subset of Fortran 90, so all Fortran 77
code is already Fortran 90 code.

Now if your existing "Fortran 77" code isn't really Fortran 77, but is
instead full of vendor extensions, then that might be a different
matter.  You did mention porting to various platforms, so I'd guess
that you probably don't have too extreme a case of dependence on
uncommon vendor extensions.

It may be that you are talking about using some of the new features
of Fortran 90.  That is a bit of a different issue than converting
to Fortran 90.  One of the differences is that it is possible to
introduce new features gradually and only in places where they prove
helpful.  You aren't forced to do everything all at once.  Of course,
I've seen cases where it proved worthwhile to tear a program
completely apart and redo it from scratch, but those things vary
widely.

The redo-from-scratch cases that I most recall were in programs where
the whole program structure was driven by memory management issues
from days with smaller computers and with the memory management done
by the program.  Throwing the old stuff out and recoding ended up
with something about 1/4 the lines of code - and the recoding probably
took less time than porting the old stuff would have done).  Such
situations do happen, but not to everyone.

 > The main advantage I see is memory allocation.  Next would be elimination of 
 > include files and common blocks in favor of modules.

Those are good things.  And they can be introduced gradually.  It is
possible to use modules for some things, while still using COMMON
for others.  Its even possible to put a COMMON block in a module -
that often works out nicely as a transitional stage.

Another good thing is the improved error checking you get with such
things as explicit interfaces.

And there are a whole bunch of things that you may already be using
and calling f77, even though they are not standard f77 (but are
standard f90).  Variable names longer than 6 characters, implicit
none, DO/ENDDO, "!" for comments, etc.

The combination of free source form (with significant blanks) and
implicit none can help kill a lot of bugs.

 > It is my impression, from a previous job, that Fortran 90 compilers
 > are not all as mature as they should be.

I don't think that's a very accurate portrayal any more.  I'd say
more that f77 compilers are (slowly) disappearing from the marketplace.
There are quite a few vendors that no longer offer f77 compilers
as separate products, but instead use their f90 compilers for
both f90 and f77 code (see first paras of my reply).  IBM has done
this for a long time.  I see that HP is dropping their f77.  Etc.

You mentioned doing development on PCs.  (I'm assuming on MS windows,
since thats what people that don't say usually mean; if you meant
Linux or one of the other choices, you'd have probably said).  Most of
the current PC compilers are f90 (or f95).  If you insist that it's not
allowed for your compiler to support f90, then there are some options,
but that's going to limit you quite a bit.  Any more, I'd worry more
about the continuing support of the f77 compilers than the maturity of
the f90/f95 ones.

F90 is almost a decade old now - scarcely new and untried.

"As they should be" is hard to define.  Improvements are always
possible and often desired.

Optimization of whole-array operations is certainly an area that could
use a lot of improvement.  I recommend against wholesale conversion of
everything to use whole array syntax.  In some places, whole array
syntax greatly helps clarity, and in some places it might help
performance.  In other places, it could hurt.  There have been a lot
of people who seem to think that DO loops aren't allowed in f90,
or anyway that they are bad style.  Thus, we hear a lot of comparisons
described as f77 vs f90 comparisons that turn out to really be all
about DO loops vs whole array syntax.  Don't make that mistake.
Use whole array syntax when it helps clarity.  Where performance
is a major issue, test instead of assuming - there can be great
surprises, and it can vary from vendor to vendor.

-- 
Richard Maine
[log in to unmask]



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

December 2023
February 2023
November 2022
September 2022
February 2022
January 2022
June 2021
November 2020
September 2020
June 2020
May 2020
April 2020
December 2019
October 2019
September 2019
March 2019
February 2019
January 2019
November 2018
October 2018
September 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
December 2015
November 2015
October 2015
September 2015
August 2015
June 2015
April 2015
March 2015
January 2015
December 2014
November 2014
October 2014
August 2014
July 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
July 2013
June 2013
May 2013
April 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
August 2010
July 2010
June 2010
March 2010
February 2010
January 2010
December 2009
October 2009
August 2009
July 2009
June 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager