Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

7
Scientific Programming 19 (2011) 253–258 253 DOI 10.3233/SPR-2011-0330 IOS Press Book Review Dan Nagle E-mail: [email protected] Modern Fortran Explained, by Michael Metcalf, John Reid and Malcolm Cohen, 488 pp., Oxford Uni- versity Press, 2011, ISBN: 978-0-19-960142-4. In the interests of full disclosure, I should explain that I know the authors, I work with two of them on International Standards committees, and I respect and like them all. Modern Fortran Explained is the latest in a long line of books, going back to when what became Fortran 90 was a work in progress in the 1980s. New editions have been published for every revision of the Fortran stan- dard since, to the point where the authors have dropped the year indication from the title. If the year had not been dropped from the title, this book might be For- tran 95/2003/2008 Explained. Remnants of this legacy are found in the overall structure of the book, in that it discusses Fortran 95 first, then adds a Fortran 2003 layer, and lastly a Fortran 2008 layer. Forward pointers to changed items, largely lifted restrictions, are found where needed. Modern Fortran Explained has 488 pages, and in- cludes a Preface, 20 Chapters, 7 Appendices and an In- dex. In the preface, we are told that Fortran is a princi- pal language for science and engineering calculations and that the authors intend to fully describe modern Fortran. Fortran certainly has been around for a while. Since the Fortran 2003 standard was published, Fortran celebrated its 50th anniversary. After originating with IBM in the late ‘50s, what I call Archaic Fortran was the first standardized programming language with For- tran 66. Modern Fortran begins, I reckon, with Fortran 90. While old-timers might be astounded to see what has become of a language they perhaps last used on a CDC 6600, what does Fortran offer a younger pro- grammer? I can think of a number of items: first, a very high degree of portability, without disciplining oneself to a subset of the language or low-level tricks with con- ditional compilation. This requires understanding the numeric requirements of your programming task and using the kind mechanism as it was intended. Next, the availability of first-class arrays, together with the well-designed array syntax, allows a concise statement of many numerical and scientific problems. Addition- ally, Fortran has substantial libraries for evaluation of mathematical functions, bit manipulation, string ma- nipulation, and also in support of the array features. Many libraries beyond the standard-specified ones are well-trusted due to long years of service, some free and some commercial. And starting with Fortran 2008, there is a clear and concise, easily understood and highly scalable parallelism in the form of the coar- ray features, which is based on the coarray features Cray has supported for over a decade now. The par- allel programming model is intuitive, and the imple- mentation avoids clutter. One needn’t forego full sup- port for object-oriented programming to obtain these advantages, either. With 20 Chapters to cover, we had best get started. Chapter One “Whence Fortran” gives an overview of the history of the standards process that has pro- duced modern Fortran. We read an overview of the structure of the standards committee hierarchy who write the Fortran standards. An international hierar- chy of committees is responsible for programming lan- guages (not that every programming language is spec- ified by an International Standard!), with a more-or- less parallel committee hierarchy in each participating country. The main new features introduced with each revision of the Fortran standard are described, up to the production of the latest, Fortran 2008. The descrip- tion of the making of Fortran 2008 is by far the short- est, surprisingly. But then, one of the authors has re- tired from the committees, and the other two were on opposite sides of the Coarray Wars, so it’s likely best all around to keep that description brief. (Note the in- dication of the congenial atmosphere of the Fortran committees.) In short, Fortran has emerged from its long history as a fully modern programming language, easily capable of producing highly portable programs via the kind mechanism, with full language support for modern programming techniques (encapsulation, overloading, inheritance, polymorphism), with versa- 1058-9244/11/$27.50 © 2011 – IOS Press and the authors. All rights reserved

Transcript of Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

Page 1: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

Scientific Programming 19 (2011) 253–258 253DOI 10.3233/SPR-2011-0330IOS Press

Book Review

Dan NagleE-mail: [email protected]

Modern Fortran Explained, by Michael Metcalf,John Reid and Malcolm Cohen, 488 pp., Oxford Uni-versity Press, 2011, ISBN: 978-0-19-960142-4.

In the interests of full disclosure, I should explainthat I know the authors, I work with two of them onInternational Standards committees, and I respect andlike them all.

Modern Fortran Explained is the latest in a long lineof books, going back to when what became Fortran 90was a work in progress in the 1980s. New editions havebeen published for every revision of the Fortran stan-dard since, to the point where the authors have droppedthe year indication from the title. If the year had notbeen dropped from the title, this book might be For-tran 95/2003/2008 Explained. Remnants of this legacyare found in the overall structure of the book, in thatit discusses Fortran 95 first, then adds a Fortran 2003layer, and lastly a Fortran 2008 layer. Forward pointersto changed items, largely lifted restrictions, are foundwhere needed.

Modern Fortran Explained has 488 pages, and in-cludes a Preface, 20 Chapters, 7 Appendices and an In-dex. In the preface, we are told that Fortran is a princi-pal language for science and engineering calculationsand that the authors intend to fully describe modernFortran. Fortran certainly has been around for a while.Since the Fortran 2003 standard was published, Fortrancelebrated its 50th anniversary. After originating withIBM in the late ‘50s, what I call Archaic Fortran wasthe first standardized programming language with For-tran 66. Modern Fortran begins, I reckon, with Fortran90.

While old-timers might be astounded to see whathas become of a language they perhaps last used ona CDC 6600, what does Fortran offer a younger pro-grammer? I can think of a number of items: first, a veryhigh degree of portability, without disciplining oneselfto a subset of the language or low-level tricks with con-ditional compilation. This requires understanding thenumeric requirements of your programming task andusing the kind mechanism as it was intended. Next,

the availability of first-class arrays, together with thewell-designed array syntax, allows a concise statementof many numerical and scientific problems. Addition-ally, Fortran has substantial libraries for evaluation ofmathematical functions, bit manipulation, string ma-nipulation, and also in support of the array features.Many libraries beyond the standard-specified ones arewell-trusted due to long years of service, some freeand some commercial. And starting with Fortran 2008,there is a clear and concise, easily understood andhighly scalable parallelism in the form of the coar-ray features, which is based on the coarray featuresCray has supported for over a decade now. The par-allel programming model is intuitive, and the imple-mentation avoids clutter. One needn’t forego full sup-port for object-oriented programming to obtain theseadvantages, either. With 20 Chapters to cover, we hadbest get started.

Chapter One “Whence Fortran” gives an overviewof the history of the standards process that has pro-duced modern Fortran. We read an overview of thestructure of the standards committee hierarchy whowrite the Fortran standards. An international hierar-chy of committees is responsible for programming lan-guages (not that every programming language is spec-ified by an International Standard!), with a more-or-less parallel committee hierarchy in each participatingcountry. The main new features introduced with eachrevision of the Fortran standard are described, up tothe production of the latest, Fortran 2008. The descrip-tion of the making of Fortran 2008 is by far the short-est, surprisingly. But then, one of the authors has re-tired from the committees, and the other two were onopposite sides of the Coarray Wars, so it’s likely bestall around to keep that description brief. (Note the in-dication of the congenial atmosphere of the Fortrancommittees.) In short, Fortran has emerged from itslong history as a fully modern programming language,easily capable of producing highly portable programsvia the kind mechanism, with full language supportfor modern programming techniques (encapsulation,overloading, inheritance, polymorphism), with versa-

1058-9244/11/$27.50 © 2011 – IOS Press and the authors. All rights reserved

Page 2: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

254 Book Review

tile and expressive array features, and with special em-phasis given to the concise and clear expression ofhighly scalable parallelism.

Chapter Two “Language Elements” starts with thecharacter set, first that of Fortran 95 and later as ex-panded by Fortran 2003. It moves on to tokens and lan-guage source form (the modern free form rather thanthe archaic card-image fixed form). The next idea is theconcept of type, leading to the form of the literals forthe intrinsic types. Next, we encounter names. So wecan now declare scalar variables of the intrinsic types.Defining derived types comes next, and how to declarevariables of whatever derived types we have defined.Having scalar variables, arrays of intrinsic types can-not be far behind. This leads us to the concept of stor-age order. Hence, we move to character variables andthe substring notation. With arrays, and derived typescontaining arrays, a discussion of objects and subob-jects is in order. A discussion of pointers concludes thischapter.

Chapter Three “Expressions and Assignments”comes next. The basic idea is that expressions are eval-uated according to the operands and the connecting op-erators without regard to context, and only then con-verted as needed for assignment. We start with scalarnumeric expressions, including the exponentiation op-erator, and the results of mixing operand types. Theusual truncation of integer division is fully described.Here we find full tables of the promotion of operandsof mixed-mode operations. With assignment, we en-counter defined and undefined variables. Extendingarithmetic operators, we find the relational operatorsgiving logical results. These, in turn, lead to logical op-erators and their expressions. Extending the discussionto character type, we read of character assignment andthe concatenation operator. Having the literals for in-trinsic types, we next find the derived type construc-tors. As soon as variables of derived types have values,we want to combine them using programmer-definedoperators. From defined operators, defined assignmentis not far away. At this point, we are ready for arrayexpressions and assignments. How pointers are usedto build data structures and used in expressions is ex-plained before nullifying a pointer concludes this chap-ter.

Chapter Four “Control Constructs” allows us tomodify the execution sequences seen in the codesnippets encountered so far. The choice constructsinclude the if construct (in Fortran spelled if(. . .)then . . . end if) and the case construct (in For-

tran spelled select case(. . .) case(. . .). . . endselect). The iterative construct is the multi-formeddo construct (spelled do . . . end do). The flexibilitygiven by the exit statement is shown. The go to state-ment must be mentioned, with the usual admonition onits misuse. This concludes the chapter.

Chapter Five “Program Units and Procedures”shows us how to combine our control constructs intocomplete programs. The first program unit, of course,is the (main) program, which may be named. A pro-gram may contain internal procedures. If a programis to cease execution at more than one place, a stopstatement is useful. External subprograms, externalsubroutines and external functions, can also contain in-ternal procedures. Modules provide a means of shar-ing names, and their attendant attributes (variable, ar-ray, type, procedure and so on), among program units.Modules can also contain module procedures whichmay also be shared. Procedures may, of course, havearguments, and this leads to the concept of the pro-cedure’s interface. Fortran does not require pass-by-reference, but rather has a set of rules governing argu-ment association, and these are well described. To re-turn from a procedure at more than one place, a re-turn statement is useful. Among the argument at-tributes are the intents, which restrict how an argumentmay be used within the procedure. The restrictions onwhat side effects are allowed to function references ap-pearing in expressions are described. An interface maybe explicit or implicit. Procedures may be passed asarguments, a classic example being the function to beminimized being passed to the procedure to do the min-imization. Arguments to procedures may use keywordsor be optional. With the simple scope of labels, we en-counter scope, which leads to a full discussion of scopein general. Next comes recursion, both direct and indi-rect. With procedure interfaces, we can define genericsets of procedures. Assumed length characters follow.Finally, descriptions of the function and subrou-tine statements completing the chapter.

Chapter Six “Array Features” describes one of For-tran’s most useful features, its array handling capabil-ity. One key here is to treat zero-sized arrays as a use-ful end-case for array handling generally. Next, we seehow to declare an array argument so as to automati-cally pass its shape. This leads to automatic objects.Another possibility for arrays of variable size is theallocatable array, which is described next. How allo-catable arrays are treated as arguments follows, alongwith allocatable function results. Of course, a derivedtype may have an allocatable component. This leads to

Page 3: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

Book Review 255

a discussion of allocatable objects versus pointer ob-jects. After discussing elemental operations and array-valued functions, we come to masked assignment withthe where statement and block and the forall state-ment and block. This, in turn, leads to the ideas of pureprocedures and elemental procedures. This is followedby a detailed discussion of array elements and the dis-tinctions between array components and arrays of de-rived types. Alternative data structures may be con-structed using pointer components. The Fortran seman-tics of pointers, as aliases of targets, is examined beforemoving to array constructors. The use of mask arrayscompletes this chapter.

Chapter Seven “Specification Statements” covers infull detail the specification of entities in Fortran. Im-plicit typing is mentioned and fully described, onlyto be disavowed via the standard implicit nonestatement. First, one may declare constants and useconstant expressions. These may give initial values tovariables. Initial values for pointers, and default ini-tialization of derived type components is next. Weencounter the public and private attributes for mod-ule data. The pointer, target and allocatable attributeare followed by the intent and optional attributes fordummy arguments. We next encounter the save at-tribute (and its relationship to initial values) beforeturning to the description of the use statement with itsonly and renaming clauses. The effects of these on hi-erarchies of modules is discussed before turning our at-tention to an expanded discussion of derived type defi-nitions. The standard namelist statement completesthis chapter (namelist input/output is covered in the in-put/output chapter further on).

Chapter Eight “Intrinsic Procedures” show us the setof intrinsic procedures available in Fortran 95 (to beexpanded in later revisions of the standard). First, wemeet the use of keywords in calling procedures. Theintrinsic statement is explained, it is useful when ex-tending the use of an intrinsic to new cases, typically,to handle a derived type. Next, we examine Fortran’sextensive library of mathematical and string processingprocedures. Before moving to the numeric inquiry pro-cedures, we pause to examine the numeric model, uponwhich the results are defined. Likewise, the bit ma-nipulation procedures are prefaced by a discussion ofthe bit model. Having seen the elemental procedures,we move to the transformational procedures which arevery useful when reducing or producing arrays. Theeffects of the dim argument are fully covered. Pointerprocedures, clock procedures, and random numberscomplete the chapter.

Chapter Nine “Data Transfer” starts by mentioningnumeric conversion, input/output lists and formatting.This introduction is followed by descriptions of unitnumbers and internal files. Formatted input and output,list directed input/output, and namelist input/outputfollow in order. More advanced topics include non-advancing input/output before encountering the indi-vidual edit descriptors. Unformatted input/output anddirect access files follow. The standard sequence of ac-tion of a transfer statement completes this chapter.

Chapter Ten “Operations on External Files” beginsby stating what cannot be standardized: the allowednames for files, and whether sequential access and di-rect access may be used with the same external file.The rewind, backspace and endfile statementsfollow. The open (including the changeable modes),close and inquire statements complete this shortchapter.

Chapter Eleven ‘‘Floating-Point Exception Handling’’begins with a description of how this feature came to bein Fortran, the development having missed the deadlinefor inclusion in Fortran 95, it was issued as a TechnicalReport and included in Fortran 2003. Floating-pointexception handling in Fortran is based on the IEEE754 standard, so we start with a short review. Accessto the features of 754 is via intrinsic modules, whichare a (then) new feature to Fortran. The discussion fol-lows the exception-enabling flags, halting modes androunding modes. Opaque derived types manipulated byprocedures accessed from the intrinsic modules is thegeneral scheme. If a processor does not support 754,it simply fails to provide the intrinsic module, and thecompilation of a program requiring 754 fails when themodule is not found. If a processor supports only por-tions of 754, inquiry procedures exist and the resultingvalues may be tested.

Chapter Twelve “Interoperability with C” describesthe standard means of Fortran and C cooperationwithin a single program. The intention is to allowstandard-defined access by Fortran programs to themany libraries defined for use by C language programs,mainly operating system services and the like, and toallow the contrary so C programs may use the manylibraries written in Fortran, mainly numeric libraries.The key idea is to define a mapping between a C proto-type and a Fortran interface. Again, an intrinsic moduleis the mechanism. The intrinsic module defines kindvalues for the various C types for a Fortran program touse. Access to C pointers is via a set of intrinsic mod-ule procedures. Derived types and variables interoper-ate via a bind attribute. The C entity must have external

Page 4: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

256 Book Review

visibility. A value attribute is added to Fortran to en-able use of C pass-by-value formal parameters. A lim-ited enumeration facility is added to Fortran for usewith the corresponding C feature. Examples are pro-vided. This feature was mostly written by the Fortrancommittees, but interested outside parties, includingthe C standards committees, and the Fortran bindinggroup of the MPI Forum, have contributed. (A FurtherInteroperability with C Technical Specification is in theworks as this is written. It should be published shortly.)The liaison among the committees in support of thesefeatures is excellent.

Chapter Thirteen “Type Parameters and ProcedurePointers” discusses two rather unrelated topics. For-tran’s type system relies upon kind type parameters todistinguish among different kinds of types. For exam-ple, various sizes of integers are all of type integer,but with differing kind type parameter values. Start-ing with Fortran 2003, derived types may be defined insuch a way that the kind type parameter values neednot be specified until the type is used to declare a vari-able. Thus, one might define a type to model rationalnumbers, with integers for the numerator and denom-inator, and not specify the sizes of the integers untildeclaring a variable using the rational type. The dis-cussion of procedure pointers starts with the abstractinterface, followed by the procedure pointer. Next, welearn how to use a procedure pointer as a componentin a derived type definition. A discussion of the passattribute of dummy arguments completes this chapter.

Chapter Fourteen “Object-Oriented Programming”discusses Fortran features for implementing object-oriented programming. We start with type extensionbefore moving to class declarations of polymorphicentities. The rules for establishing a polymorphic en-tity’s dynamic type are explained. Next comes the con-cept of the unlimited polymorphic entity. To simplifywhat might become cumbersome notation, the asso-ciate construct allows a shorthand to be used for alengthy fully-qualified data entity’s name. The se-lect type construct operates analogously to theselect case construct, but chooses an executionpath based on the dynamic type. Abstract types and de-ferred bindings are described. Type-bound procedures,and their relationship to constructors and finalizationare discussed. The type inquiry functions complete thischapter.

Chapter Fifteen “Establishing and Moving Data”,and the two chapters that follow, discuss some of themany minor enhancements and programming conve-niences defined in Fortran 2003. These include en-

hancements to structure constructors, to the allocatestatement (involving deferred types and polymorphicvariables), allocatable entities, the move_alloc in-trinsic, better control of access from modules includ-ing enhancements to the renaming abilities of the onlyclause on the use statement, and the allowance of nu-meric intrinsics to give variables their initial values.Chapter Sixteen “Miscellaneous Enhancements” con-tinues this line with pointer intents for pointer dummyarguments, the volatile attribute, the import statement,an intrinsic module providing definitions of more as-pects of the program’s environment, and support for in-ternationalization including various character sets. Ac-cess is provided to error messages, and one may de-fine public entities of private type. Chapter Seventeen“Input/Output Enhancements” discusses how the pro-grammer may customize input/output for entities ofderived type (allowing, for example, transfer of linkedlists of an unknown number of elements) and asyn-chronous input/output transfers including the asyn-chronous attribute for data to be so transferred. The ap-pearance of exceptional values of IEEE 754 arithmeticin formatted input/output transfers is explained, alongwith the stream access method. Recursive input/outputtransfers and the flush statement are next. This chap-ter concludes with discussion of intrinsic module pro-cedures, further specifiers on input/output statements,and namelist enhancements.

Chapter Eighteen “Enhanced Module Facilities” dis-cusses the improvements to modules made betweenFortran 2003 and Fortran 2008. The feature, informallycalled submodules, was not quite ready in time for therelease of the Fortran 2003 revision. But it was held tobe of such importance that it was released as a Tech-nical Report before Fortran 2008 was completed. Inshort, a module may have submodules, which inheritentities from the module via host association (as a con-tained procedure would from its containing procedure).A submodule may, in turn, have further submodules.A most useful part is that the interface to a proceduremay reside in the module and the implementation ofthe procedure may reside in a submodule. Thus, whenthe implementation is changed but the interface not, norecompilation of program units that use the module isnecessary. This avoids needless compilation cascades.The feature is also helpful in simplifying the task oforganizing data into modules, as the authors clearlyexplain. (It also encourages implementors to put onemodule procedure into one object file, rather than writ-ing the whole module into one large object file.)

Chapter Nineteen “Coarrays” is, to me, the mainevent in a description of Fortran 2008. Coarrays use

Page 5: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

Book Review 257

a Partitioned Global Address Space (PGAS) approachto provide a succinct notation for Single ProgramMultiple Data (SPMD) programming. Coarray For-tran might be compared to Unified Parallel C (UPC)or Titanium (an extension of Java). Briefly, a coar-ray program is executed by replicating the programsome number of times. An entity declared as a coar-ray can be used to fetch or define its value on the cur-rent image (each replication of the process is calledan image), of course, or the value on another image.What remains, largely, is to synchronize the images,and to ensure that each image’s memory correctly re-flects the program state. That is the role of the syn-chronization statements, and of the argument passingrestrictions that are to prevent copy-in/copy-out argu-ment passing. Statements that imply synchronizationare called image control statements. The current set ofcoarray features constitutes a simple, functional, coreimplementation. Work is ongoing on the Fortran stan-dards committees to add amenities, such as a meansto group images (which might be called teams), intrin-sic functions that apply across images (the collectivefunctions), and parallel input/output. This work is inits formative stages, but is currently intended to be re-leased as a Technical Specification (the new ISO-speakfor what was formally called a Technical Report) priorto any future revision of the Fortran standard.

Chapter Twenty “Other Fortran 2008 Enhance-ments” is the concluding chapter. It describes severalsmall enhancements intended to ease the programmer’stask. Perhaps among the most important is the abil-ity to use an exit statement to exit from nearly anyconstruct (exiting was previously restricted to loops),and the requirement for support of 64-bit (or larger)integers. Two new performance enhancements are theconcurrent loop control of the do loop, which allowsan iteration space to be tiled by a single block struc-ture when the iterations may be executed in any or-der, and the contiguous attribute, which signals to thecompiler that a pointer or a dummy argument is as-sociated with a contiguous set of memory locations.Numerous efficiencies are possible when this asser-tion is true. A variable of complex type may now haveits real and imaginary parts referenced easily by acomponent-like notation. Pointer functions may indi-cate the storage to receive the value in an assignmentstatement, and an elemental procedure may be declaredimpure to enable diagnostics, or a count of references,or similar activity. With larger memories, the kind ofan iteration variable may now be declared on the it-eration statement, perhaps to ensure a 64-bit integer

is used without changing other portions of the code.Some formatting enhancements aimed towards easingthe writing of CSV files have been made. This enableseasier communication with workbench programs andspreadsheet programs that can read CSV files (and per-haps easily produce quick plots). Most of the rest ofthe new items in Fortran 2008 are in the intrinsic li-brary. These are mainly concentrated in the mathemati-cal functions (expanded trig for complex, Bessel, errorfunctions, gamma) and in bit manipulation (unsignedcomparison, leading and training zero counts, popula-tion counts, and a whole slew of reductions). Analo-gous with minloc and maxloc (location in an array hav-ing the minimum or maximum value), a new findloc(location of a given value) has been specified. The ex-ecution of external programs is standardized, if not thecommand line to be executed. Another new feature isstandardized access to the name of the program transla-tion phase (that is, the compiler) and the options used.This is helpful when documenting bug reports, bench-marks, and verification/certification runs. It is also use-ful when computing “on the cloud” and the compilerand its options may not be known beforehand (or evenbe the same on each node!), but should be included inthe output.

The book has seven appendices. The include a listof the intrinsic procedure names. The authors list theirown preferences for deprecated features, and I gen-erally agree. They next list the standard-defined dep-recated features list and deleted features list. An ex-tended example of object oriented programming usingFortran facilities is shown, to make clear how it all fitstogether. Next we find a glossary, useful since the au-thors use standard-defined terms for clarity throughout.And finally, an appendix has the solutions to the exer-cises.

That was quite a trip. Modern Fortran is a languagewith many features, and the authors have explained thewhole of it very well. I especially like the rationalesgiven for why certain restrictions exist. Usually, it’s tofavor efficiency. This has been true ever since the orig-inal Formula Translator, but the restrictions still leaveapplications programmers wanting explanations. Somerestrictions may not make sense unless one developscompilers for a living. Most applications programmersdo not, so it’s helpful to see the whys and wherefores.Also, this book is very thorough. Together, these fac-tors account for its length. But every sentence conveysa useful fact. This book is not light reading, the readerwill likely not be taking this book to the beach, it willstay beside the workstation where it can be easily con-sulted.

Page 6: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

258 Book Review

I have used earlier versions of this book as a text-book for graduate-level programming classes in Com-putational Science. I will use this one, given thechance. This book is suitable as a textbook (or supple-mentary reading) for a scientific programming course,at either the upper-division undergraduate level or thefirst-year graduate level. Most of the chapters havea least a few problems (solutions to the exercisesare given in an appendix). I would choose anotherlanguage for a first course in programming, perhapspython. Array operations and parallel problem solvingin a floating-point environment are sophisticated topicsthat might not do so well in an introductory presenta-tion. Fortran really is a tool that fully supports large-scale, high-performance number crunching.

I would prefer a different order of topics, where re-lated features are treated together rather than spreadover the revisions of the language, with the increment

added by each revision described with other, perhapsunrelated features of the same revision. But, given thestate of the compilers today, the current order of topicsis not so bad. Perhaps in time for the next edition ofthis book, compilers will have more closely matchedthe then-current standard (several support coarrays to-day), so at that time such a reordering will be moreuseful. In the mean time, an applications program-mer knows which revision is in use, more importantly,which features are in use. Modern Fortran, a fully-capable yet easily readable, very portable, highly effi-cient object-oriented language, with first class supportfor arrays, and an intuitive, highly scalable parallelism,needs some explanation to be used to best advantage.And that is exactly what these authors with this bookhave accomplished.

Page 7: Scientific Programming 19 (2011) 253–258 253 DOI 10.3233 ...

Submit your manuscripts athttp://www.hindawi.com

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttp://www.hindawi.com

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation http://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Applied Computational Intelligence and Soft Computing

 Advances in 

Artificial Intelligence

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporation

http://www.hindawi.com Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Modelling & Simulation in EngineeringHindawi Publishing Corporation http://www.hindawi.com Volume 2014

The Scientific World JournalHindawi Publishing Corporation http://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014