Supercomputing in Astrophysics with Ada 95 |
by Dr. Martin J. Stift, Associate Professor
Institut für Astronomie Wien, Austria
Astrophysical Computing: A Study in FORTRAN Dominance
For more than three decades, astrophysics has lived under the almost undisputed domination of Fortran. Many of the astrophysical codes developed in early times and written in the most archaic Fortran versions are still in use for large-scale computations; the latest revision and the impending update of the Fortran standard have hardly influenced the programming habits of most astronomers. In the field of computational astrophysics, modern software-engineering concepts are widely unknown as are most modern programming languages (ask the average astronomer about Ada, Eiffel, Smalltalk ...) and high-performance computing in any programming language has had little impact so far. A vast abyss separates the Grand Challenge codes from the bulk of the programs used in astrophysical modelling.The Need for Change Even Fortran hardliners realise that progress in computer hardware makes it advisable to abandon some of the most venerable language constructs such as the COMMON. And rumour has it that for the first time in history the Fortran standard revision will lead to the abandonment of language features. (Will it be the Hollerith constant?) The mounting complexity of (astro)physical models makes methods and languages of the 50's and 60's become obsolete rapidly. Should one continue to cling to increasingly outdated computing tools?The Transition to Ada At the time I adopted Ada for my future work (early 1994), the features of the Ada 9X standard, that was to become Ada 95, had begun to emerge. Unlike Fortran90, Ada 83 already offered genericity, concurrency, and exception handling; Ada 95 promised inheritance, polymorphism, programming by extension, distribution. I was seduced by the rigour of this language and by its elegance. Still, would Ada really be advantageous for scientific programming with codes of the typical size of a few thousand lines of code (kLOC)? You need a lot of courage (and tenure) to embark on this adventure.Parallel Computing with Ada 95 Most (astro)physicists believe that, despite its shortcomings, you have to use Fortran on present and future massively parallel computers because of the parallel capabilities of High Performance Fortran (HPF). (Until recently, you could not find Ada on the Web sites dedicated to parallel computing, but this has changed.) People are not aware of the power of the concurrent features of the Ada language, i.e., task objects and protected objects, and nobody seems to have realised that, with the GNU Ada 95 Translator (GNAT) compiler on a Silicon Graphics Power Challenge or Origin server, you can actually carry out parallel computations with Ada 95.Acknowledgements A number of people have contributed to this first successful large-scale application of Ada to (astro)physical problems. In particular I want to thank G. Könighofer (Swing Informationssysteme GmbH, A-1130 Wien) for introducing me to the world of Ada and putting the large Swing Ada class library at my disposal. Mag. R.M. Fensl has contributed elegant astrophysical code, demonstrating that students can do better with Ada than with Fortran. And, of course, thanks are due to Prof. Strohmeier (Laboratoire de Génie Logiciel, EPF Lausanne) for advice and encouragement. Lack of funding made me appreciate these two splendid compilers, even more than I already did: the free GNAT compiler under Linux and Irix, and a free sample of the Aonix Academic AdaMagic compiler.For More Information Dr. Martin J. Stift |
Copyright 1996. IIT Research Institute All rights assigned to the US Government (Ada Joint Program Office). Permission to reprint this flyer, in whole or in part, is granted, provided the AdaIC is acknowledged as the source. |
Form U226 astro.txt |
Home | Webmaster | Last Updated: 08/11/98 |