Re: [AMBER-Developers] updating Fortran files to .F/.F90

From: Tyler Luchko <tluchko.rci.rutgers.edu>
Date: Fri, 14 Oct 2011 17:56:09 -0400

On 2011-10-13, at 2:52 PM, Scott Brozell wrote:
>
> As far as Amber, I think the C preprocessor was used because
> it was (almost?) ubiquitous and there was no Fortran equivalent.
> I think the Fortran standard is still vague on preprocessor details,
> but #ifdef, etc all work in practice.

There is a preprocessor as part of the f95 standard that is incompatible with cpp and the different fpps

http://fortranwiki.org/fortran/show/coco

It does not seem to be integrated with any compiler and does not appear to be widely used.

> I did the COLUMBUS conversion using simple unix commands,
> and it was simple and error free.
> But your (1) has never bothered me, and I doubt that (2) has
> much gain (is it even measurable ?). (3) might be true, but
> are we planning that change ?


As for the various motivations:

1) Looking up the line numbers in intermediate files does bother me and a few other people I have talked to. I don't spend a lot of time doing this but when I do it really takes all of the joy and wonder out of debugging.

2) As for the extra _*.f files, measuring clutter is somewhat subjective, but several hundred intermediate files are created in place which makes operations, like grepping, a pain. This is the biggest issue for me. Disk space is only a couple tens of MB and the build time difference is bare measurable but every millisecond counts, right :)

3) I should probably divide this into two parts.
  a) Updating to a universal convention does mean that the code will play nice with modern tools. As Ben mentioned, this includes things like syntax aware text editors properly identifying the files. Also, it is one less idiosyncrasy for new developers or users trying to edit the code.

  b) Switching to a new build method is an idea for the future and is not a primary motivation for switch the Fortran file suffixes. However, I'll still briefly plug the idea by pointing out that switching to cmake in particular will decrease build time measurably, simplify the build scripts and should allow those who want to to use a variety of IDEs with their associated performance/debugging tools.

Overall, the benefits are to better integrate with the tools we currently use and simplifying the distribution by using a modern, universal convention. They are not huge gains but implementing the change is not difficult.

Tyler
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Oct 14 2011 - 15:00:03 PDT
Custom Search