Monday, December 3, 2012

But isn't Fortran dead?

Despite what many programmers in Comp Sci would tell you, no Fortran is not dead. And it likely will never be dead, even when the "next generation" of compilers (Cray Chapel, IBM X10) start being used outside of Cray & IBM.

MPI support for Fortran still exists with updates coinciding with the C/C++ updates. Intel recently released version 13 of their compiler, adding more compatibility with the Fortran 2003 and 2008 standards. The Portland Group brand of Fortran compilers are working hand-in-hand with nVidia to allow Fortran the use of the graphics cards for faster, cheaper computations.

I know several hydrodynamic codes that utilize Fortran: Athena (the original code was in C, but it was ported to F90), VH-1, Ramses, CLAWPACK (and all its derivatives, sparing only pyCLAW), VAC (And its derivatives), Pencil, Piernik and several others. Some of these have been released within the last 5 years, others a decade or so. There are many other codes written for research purposes using Fortran.

So no, Fortran is definitely not dead.

I started using Fortran 90 in 2007 as part of my Master's degree (in physics) research in the optical properties of superlattice- and Gallium-based semiconductors. Most of what I did there was translate my advisors Fortran 77 code into a more-up-to-date standardized form (i.e., eliminating do-continue and replacing it with do-enddo). I moved on to my PhD program in 2009 where I started research on numerically modeling supernova remnants using the F90/95 standard for the hydrodynamic simulations. I use the Intel compiler on the cluster we have on campus.


This blog will be about the things I have discovered about Fortran 90/95/03 through discussions with my C/C++ using colleagues and tips & tricks for those budding physicists who want a modern, fast, number-crunching language without the use of any ugly curly braces. You will not find any goto here, unless it is my complaining about seeing it elsewhere.


Comments are always welcome!

2 comments:

  1. I just discovered this blog today. I agree fortran is not very loved today, but nonetheless I love it! I'm sure I'll find tons of interesting things here!

    ReplyDelete
  2. it's the "in-thing" to hate on Fortran, but the syntax is elegant and easy to learn. Physics-based codes also require multi-dimensional arrays, since the mapping from array dimension to physical space is simply too direct to not take advantage of. I remember struggling through a C-code for a 2-d array, and Fortran90 simply handled all the memory management and let me focus on the logic instead of worrying about pointing to an array of pointers - this may be extremely obvious to the "C"-men and women, but for someone who hasn't used it before, it adds another layer of complexity to the learning process.

    ReplyDelete