Approach: A number of Particle-in-Cell (PIC) codes have been converted from Fortran 77 both to C++ and to Fortran 90 and the performance measured [1].
Accomplishments: Although the syntax for expressing object-oriented features differs in the two languages, we found we could translate most concepts without difficulty. Initial performance results showed that the Fortran 90 code performed better. For example, a 1d benchmark on the RS/6000 using the IBM compilers gave the following performance results:
Fortran 77: 245 sec. Fortran 90: 364 sec. C++: 508 sec.
Backward compatibility of Fortran 90 made conversion from Fortran 77 easy, since one can proceed incrementally, one class at a time. The environment was also more stable than C++, since it is standardized and not rapidly evolving. Converting an object- oriented code from Fortran 90 to C++ is also straightforward, thus Fortran 90 could be a useful intermediate language when converting code from Fortran 77 to C++.
Significance: Fortran 90 may simplify the transition from legacy Fortran 77 codes to modern, object-oriented codes, resulting in increased programming efficiency, while minimizing performance degradation.
Status/Plans: Since there are various ways to encapsulate data, we are studying alternative strategies which would maximize performance.
[1] C. D. Norton, B. K. Szymanski, and V. K. Decyk, ÒObject Oriented Parallel Computation for Plasma PIC Simulation,Ó to appear in Communications of the ACM 38, 10 (1995).
Point of Contact:
Viktor K. Decyk,
Jet Propulsion Laboratory
vdecyk@olympic.jpl.nasa.gov
(818) 393-2690