Computing Reviews

Modern Fortran explained (4th ed.)
Metcalf M., Reid J., Cohen M., Oxford University Press, Inc.,New York, NY,2011. 512 pp.Type:Book
Date Reviewed: 03/27/12

Reports of Fortran’s death are greatly exaggerated. The language is still used extensively and very successfully for scientific computation on both sequential and parallel architectures. This is perhaps hardly surprising given the wealth of high-quality numerical software available in Fortran, both commercially and for free.

But Fortran is no longer that antiquated language of the late ‘80s and ‘90s, much maligned by computer science professors. It has been modernized and revitalized over the past two decades by a series of new standards: Fortran 90, Fortran 95, Fortran 2003, and, most recently, Fortran 2008. These standards have added a whole host of modern features and constructs to the language while preserving backwards compatibility to Fortran 66 and Fortran 77. This means that older, stable routines can still be called from code using the modern language.

To be more specific, but without giving a complete list, modern Fortran now has dynamic storage allocation, pointers, array valued operations, user-defined types, modules (and sub-modules), user-defined generics and operators, and support for object-oriented programming. The newer standards also recognize the importance of being able to interoperate with other languages by defining a standardized mechanism for interoperating with C. The important requirement of being able to detect and, possibly, recover gracefully from floating-point exceptions is provided via a special intrinsic module. This allows access to the flags defined by the Institute of Electrical and Electronics Engineers (IEEE) floating-point standard. Finally, I must mention co-arrays, Fortran’s first standard foray into the realm of parallel computation.

The current volume is the fourth in a sequence by the authors that has tracked each of the emerging standards since Fortran 90. The book, like its previous editions, assumes that the reader has practical programming experience at least to the level of Fortran 77 and wishes to update his or her knowledge. It would not be suitable as an introductory text to modern Fortran programming.

The book’s structure reflects the successive standards; the features first introduced in Fortran 90 are covered in the first ten chapters, and chapter 11 describes the relatively minor changes made to Fortran 95. The next seven chapters cover the new material appearing in Fortran 2003, and the final two describe the latest additions to the current standard, Fortran 2008.

There are also a number of appendices. The first provides a very useful list of all the available intrinsic functions flagged with the standard in which they were first defined. Another two describe deprecated and obsolescent features; these are elements of the language, typically dating from the 66 and 77 standards, that have either been dropped from the newer standards or may be excluded in a later standard. An example of each would be Hollerith strings (deprecated) and the arithmetic IF (obsolescent).

Each chapter typically covers a major new topic--for example, array features, object-oriented programming, co-arrays, and so on. Following a simple overview, various aspects of the new features are discussed and details of the relevant syntax presented. Simple but relevant examples are provided, and any pitfalls and restrictions noted. Most chapters also contain an extended illustrative code sample. Finally, every chapter concludes with a number of exercises; some just need pen and paper, while others require the reader to write, and preferably run, complete programs.

This book is ideal for current practitioners of the black art of numerical software production who either are still using Fortran 77 or have left the Fortran brotherhood for a more trendy language and have recognized the error of their ways. It is currently the case that the book is ahead of most compilers; however, a number of compilers are available that implement the newer standards up to and including 2003. One of these, gfortran, from the GNU project, is freely downloadable and available for a wide range of platforms.

So, get a compiler, read the book, and discover the joys of programming in Fortran in the 21st century.

Reviewer:  T. Hopkins Review #: CR140014 (1208-0773)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy