Monday, 7 June 2010

Is there life in FORTRAN?

FORTRAN isn't what it used to be. "Fortran" as we should now call it, is alive and kicking. But does it have a future?

I spent this afternoon at the BCS's (British Computer Society's) Fortran Specialist Group (http://www.fortran.bcs.org/), mainly because of multicore issues and the interesting variety of speakers. The big issue was - and remains - is the language still a viable tool? The answer from the group was a qualified "yes".

While Fortran has evolved overthe past few years its standardisation process has been painfully slow in comparison to the rate of processor evolution, and that of the market. Even today the 2003 standard is not fully implemented on most compilers. The 2008 standard will emerge later this year in very restricted form on NAg's compiler which would appear to be the only one (I am happy to be corrected on that). A next round is already underway with no clear idea as to when it will report, let alone be implemented.

One might ask what the value is of such a slow standardisation process. As usual the point is to enable portability and compatibility. Given the fact that Fortran codes are used the world over and in some pretty important applications there is an obvious need for portability and compatibility.

The problem in part has been that Fortran has been bringing itself into line with the structure and form of more modern languages (bear in mind FORTRAN was invented half a century ago). That was always bound to slow down things as fundamental issues were addressed and prejudices resolved. Today that process is largely sorted and the language looks and "feels" very different from its predecessors, at least in terms of capability. Now that the catharsis is out of the way perhaps future rounds can proceed with more speed.

But is there a market? The answer seems to be that there is but that it has changed. Fortran is alive, as a vehicle for implementing numerical models in industry as well as in HPC. This is true particularly in finance but also more broadly too. Vendors of compilers and other tools - and to a degree Concertant's own research - report a growing market.

However it seems to be becoming a language that people are picking up on the job and not being taught in colleges. Colleges seem to be teaching C/C++ and Java. Should Fortran be taught in college courses? Probably it should as a vehicle by which to learn scientific programming, for which it arguably does not have a peer, especially if you have a knowledge of maths. It is after all, FORmula TRANslation.

There is however an interesting discussion to be had about whether or not physicists  - and others - want to program using the language directly or whether they want to use a front end such as MATLAB or one of its alternatives. That is perhaps a discussion for another time.

1 comment:

  1. There are multiple advantages to using a math language in order to do mathematics.

    It starts with using the right tool for the right job. I would not use Fortran to write a compiler or create a GUI. But to do mathematics, it is certainly the best of the compiled languages for this task.

    Writing math formulae as formulae is ideal for mathematicians and scientists. This is a time saver, as it allows writing in math, and can obviously save hundreds of hours.

    Additionally, the concept that a program needs to be V&V'd should not be forgotten. The program should be consistent in providing the correct answer and to the correct problem. This process requires a SME (subject matter expert) to look at the code. One should not expect that a true mathematician can figure out what a pile of spaghetti code in C is doing. But to look at math formulae, that is reasonable.

    The bottom line, it is a matter of using the right tool for the right problem. For production mathematics, the new Fortrans are the right tool.

    One more old saying: If the only tool in your tool box is a hammer, then every problem that one encounters appears as a nail.

    ReplyDelete

Welcome to The Multicore Blog. Please add your comment. Remember it will be moderated.