Time really flies! About six years ago, the Fortran 2003 standard (commonly abbreviated as F03) was officially published in an attempt to modernize the language. Over the past few years, we've seen a steady increase of interest in adoption of F03 features in the field, particularly the object-oriented programming (OOP) and C interoperability features. F03's C interoperability features struck a chord in the scientific computation community as mixed language applications are becoming the mainstream. In addition, more and more scientific and engineering programmers realize the power of OOP. We're happy to note there are actual scientific and engineering applications being developed using OOP features of F03. On the vendor side, the initial attitude to OOP was generally lukewarm. However as demand continued to grow, vendors eventually accelerated their implementations in recent years. At this very moment, there are two compilers fully compliant with the Fortran 2003 standard and a number of others that are very close to be fully complaint, according to the latest compiler survey conducted by Fortran Forum.
While there are growing activities on the F03 front, we also see some exciting work in further modernization of the language. Right after the publication of F03, the Fortran committee (WG5/J3) started working on the next revision. The content of the revision was frozen in 2008, resulting in a name of "Fortran 2008" for the upcoming new standard. The F08 standard integrated the existing submodule TR, which facilitates the separation of (module) procedure declarations and implementations. F08 also adds a few other features, e.g, BLOCK construct is added to limit the scopes of variables; CONTIGUOUS attribute is added to pointer or assumed-shape arrays, thus enabling compiler optimizations on accessing these arrays. But the most significant inclusion in F08 is the coarray feature, which brings the Fortran language to a new level. Fortran 2008 is a truly parallel programming language. An overview of the coarray feature in F08 by John Reid can be found at the WG5 web site.
The Fortran 2008 standard was finally published on Oct. 6, 2010, after some initial delay. You can purchase it from the ISO website. If you don't want to pay CHF 338,00. You can go to the J3 site to get the final draft that is very close to the official standard.
We will talk more about new F08 features and what's coming up after F08 in the upcoming months ... stay tuned.
When the compiler knows that an array occupies a contiguous block of memory, it can perform optimizations based on memory layout. Explicit shape arrays, assumed-size arrays and allocatable arrays occupy contiguous blocks of memory. For array pointers and assumed shape arrays, the compiler cannot determine at compile time if it is the case.
In the latest AIX XL Fortran compiler,
When these assertions are made, the compiler can perform more optimizations. But if any of the array pointers or assumed shape arrays in the code are not associated with a contiguous array,
Fortran 2008 introduces a new attribute:
Our colleague Jim Xia recently coauthored a new book: Scientific Software Design: The Object-Oriented Way (ISBN: 978-0521888134). The book is a great example of how to use the object-oriented features of Fortran 2003 in scientific design patterns. BTW, the examples in the book compile with XL Fortran.
The Back Cover:
This book concerns software design. Although many current discussions of scientific programming focus on scalable performance, this book focuses on scalable design. The authors analyze how the structure of a package determines its developmental complexity according to such measures as bug search times and documentation information content. The work presents arguments for why these issues impact solution cost and time more than does scalable performance. The final chapter explores the question of scalable execution and shows how scalable design relates to scalable execution. The book's focus is on program organization, which has received considerable attention in the broader software engineering community, where graphical description standards for modeling software structure and behavior have been developed by computer scientists. These discussions might be enriched by engineers who write scientific codes. This book aims to bring such scientific programmers into discussion with computer scientists. The authors do so by introducing object-oriented software design patterns in the context of scientific simulation.