skip to main content
research-article

OpenAD/F: A Modular Open-Source Tool for Automatic Differentiation of Fortran Codes

Published:01 July 2008Publication History
Skip Abstract Section

Abstract

The Open/ADF tool allows the evaluation of derivatives of functions defined by a Fortran program. The derivative evaluation is performed by a Fortran code resulting from the analysis and transformation of the original program that defines the function of interest. Open/ADF has been designed with a particular emphasis on modularity, flexibility, and the use of open source components. While the code transformation follows the basic principles of automatic differentiation, the tool implements new algorithmic approaches at various levels, for example, for basic block preaccumulation and call graph reversal. Unlike most other automatic differentiation tools, Open/ADF uses components provided by the Open/AD framework, which supports a comparatively easy extension of the code transformations in a language-independent fashion. It uses code analysis results implemented in the OpenAnalysis component. The interface to the language-independent transformation engine is an XML-based format, specified through an XML schema. The implemented transformation algorithms allow efficient derivative computations using locally optimized cross-country sequences of vertex, edge, and face elimination steps. Specifically, for the generation of adjoint codes, Open/ADF supports various code reversal schemes with hierarchical checkpointing at the subroutine level. As an example from geophysical fluid dynamics, a nonlinear time-dependent scalable, yet simple, barotropic ocean model is considered. OpenAD/F's reverse mode is applied to compute sensitivities of some of the model's transport properties with respect to gridded fields such as bottom topography as independent (control) variables.

References

  1. ACTS. 2007. Adjoint compiler technology and standards project. http://www.autodiff.org/ACTS.Google ScholarGoogle Scholar
  2. ADIC. 2007. http://www.mcs.anl.gov/adicserver.Google ScholarGoogle Scholar
  3. Aho, A., Sethi, R., and Ullman, J. 1986. Compilers. Principles, Techniques, and Tools. Addison-Wesley, Reading, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Albrecht, A., Gottschling, P., and Naumann, U. 2003. Markowitz-type heuristics for computing Jacobian matrices efficiently. In Computational Science (ICCS'03). Lecture Notes in Computer Science, vol. 2658. Springer, 575--584. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Berz, M., Bischof, C., Corliss, G., and Griewank, A., Eds. 1996. Computational Differentiation: Techniques, Applications, and Tools. Proceedings Series. SIAM, Philadelphia, PA.Google ScholarGoogle Scholar
  6. Bücker, M., Corliss, G., Hovland, P., Naumann, U., and Norris, B., Eds. 2006. Automatic Differentiation: Applications, Theory and Implementations. Lecture Notes in Computer Science, vol. 50. Springer, Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Corliss, G., Faure, C., Griewank, A., Hascoet, L., and Naumann, U., Eds. 2002. Automatic Differentiation of Algorithms -- From Simulation to Optimization. Springer, Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Corliss, G. and Griewank, A., Eds. 1991. In Proceedings of Automatic Differentiation: Theory, Implementation, and Application. SIAM, Philadelphia, PA.Google ScholarGoogle Scholar
  9. Faure, C. and Papegay, Y. 1997. Odyssée version 1.6: The user's reference manual. Tech. rep. Sophia Antipolis, Projet SAFIR. http://www.inria.fr/recherche/equipes/safir.en.html.Google ScholarGoogle Scholar
  10. Giering, R. and Kaminski, T. 1998. Recipes for adjoint code construction. ACM Trans. Math. Softw. 24, 437--474. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Griewank, A. 2000. Evaluating Derivatives. Principles and Techniques of Algorithmic Differentiation. Frontiers in Applied Mathematics, vol. 19, SIAM, Philadelphia, PA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Griewank, A. and Reese, S. 1991. On the calculation of Jacobian matrices by the Markovitz rule. In Proceedings of Automatic Differentiation: Theory, Implementation, and Application. SIAM, 126--135.Google ScholarGoogle Scholar
  13. Hascoët, L., Naumann, U., and Pascual, V. 2005. To be recorded analysis in reverse-mode automatic differentiation. Future Gener. Comput. Syst. 21, 8, 1401--1417. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Heimbach, P., Hill, C., and Giering, R. 2005. An efficient exact adjoint of the parallel MIT general circulation model, generated via automatic differentiation. Future Gener. Comput. Syst. 21, 8, 1356--1371. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hovland, P., Naumann, U., and Norris, B. 2002. An XML-based platform for semantic transformation of numerical programs. In Software Engineering and Applications (SEA'02), M. Hamza, Ed. ACTA Press, Anaheim,CA, 530--538.Google ScholarGoogle Scholar
  16. Losch, M. and Wunsch, C. 2003. Bottom topography as a control variable in an ocean model. J. Atmosph. Ocean. Techn. 20, 1685--1696.Google ScholarGoogle ScholarCross RefCross Ref
  17. Marotzke, J., Giering, R., Zhang, K., Stammer, D., Hill, C., and Lee, T. 1999. Construction of the adjoint MIT ocean general circulation model and application to Atlantic heat transport variability. J. Geophys. Resear. 104, C12, 29, 529--29, 547.Google ScholarGoogle Scholar
  18. Marshall, J., Adcroft, A., Hill, C., Perelman, L., and Heisey, C. 1997. A finite-volume, incompressible Navier Stokes model for studies of the ocean on parallel computers. J. Geophys. Resear. 102, C3, 5,753--5,766.Google ScholarGoogle Scholar
  19. Naumann, U. 2002. Elimination techniques for cheap Jacobians. In Automatic Differentiation of Algorithms - From Simulation to Optomization. Springer, 247--253. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Naumann, U. 2004. Optimal accumulation of Jacobian matrices by elimination methods on the dual computational graph. Math. Prog. 3, 99, 399--421. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Naumann, U. 2006. Optimal Jacobian accumulation is NP-complete. Math. Prog. published online at www.springerlink.com. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Naumann, U. and Gottschling, P. 2003. Simulated annealing for optimal pivot selection in Jacobian accumulation. In Stochastic Algorithms: Foundations and Applications, A. Albrecht and K. Steinhöfel, Eds. Lecture Notes in Computer Science,, vol. 2827. Springer, 83--97.Google ScholarGoogle Scholar
  23. Naumann, U. and Utke, J. 2005. Source templates for the automatic generation of adjoint code through static call graph reversal. In Computational Science - ICCS'05, V. Sunderam, G. van Albada, P. Sloot, and J. Dongarra, Eds. Lecture Notes in Computer Science, vol. 3514. Springer, 338--346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Naumann, U., Utke, J., Lyons, A., and Fagan, M. 2004. Control flow reversal for adjoint code generation. In Proceedings of the 4th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'04). IEEE Computer Society, Los Alamitos, CA, 55--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. NEOS. 2007. Network enhanced optimization server. http://www-neos.mcs.anl.gov/.Google ScholarGoogle Scholar
  26. OpenAD. 2007. http://www.mcs.anl.gov/OpenAD.Google ScholarGoogle Scholar
  27. OpenMP. 2007. http://www.openmp.org.Google ScholarGoogle Scholar
  28. Stammer, D., Wunsch, C., Giering, R., Eckert, C., Heimbach, P., Marotzke, J., Adcroft, A., Hill, C., and Marshall, J. 2002. The global ocean circulation and transports during 1992 -- 1997, estimated from ocean observations and a general circulation model. J. Geophys. Resear. 107, C9, 3118.Google ScholarGoogle Scholar
  29. Strout, M. and Hovland, P. 2006. Linearity analysis for automatic differentiation. In Computational Science -- ICCS'06. Lecture Notes in Computer Science, vol. 3994. Springer, 574--581. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Strout, M., Mellor-Crummey, J., and Hovland, P. 2005. Representation-independent program analysis. In Proceedings of the 6th ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Utke, J. 2006. Flattening basic blocks. Lecture Notes in Computer Science, vol. 5C, Springer, 121--133.Google ScholarGoogle ScholarCross RefCross Ref
  32. Utke, J., Lyons, A., and Naumann, U. 2006. Efficient reversal of the interprocedural flow of control in adjoint computations. J. Syst. Softw. 79, 1280--1294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Utke, J. and Naumann, U. 2003. Software technological issues in automatizing the semantic transformation of numerical programs. In Proceedings of Software Engineering and Applications (SEA'03), M. Hamza, Ed. ACTA Press, Anaheim, CA, 417--422.Google ScholarGoogle Scholar
  34. Utke, J. and Naumann, U. 2004. Separating language dependent and independent tasks for the semantic transformation of numerical programs. In Proceedings of Software Engineering and Applications (SEA'04), M. Hamza, Ed. ACTA Press, Anaheim, CA, 552--558.Google ScholarGoogle Scholar
  35. Utke, J. and Naumann, U. 2006. OpenAD/F: User manual. Tech. rep. Argonne National Laboratory. http://www.mcs.anl.gov/openad/.Google ScholarGoogle Scholar
  36. Wengert, R. E. 1964. A simple automatic derivative evaluation program. Comm. ACM 7, 8, 463--464. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Wunsch, C. 2006. Discrete Inverse and State Estimation Problems: With Geophysical Fluid Applications. Cambridge University Press, Cambridge, UK.Google ScholarGoogle Scholar
  38. Wunsch, C. and Heimbach, P. 2007. Practical global oceanic state estimation. Physica D. To appear. 230, 197--208.Google ScholarGoogle Scholar

Index Terms

  1. OpenAD/F: A Modular Open-Source Tool for Automatic Differentiation of Fortran Codes

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image ACM Transactions on Mathematical Software
                ACM Transactions on Mathematical Software  Volume 34, Issue 4
                July 2008
                152 pages
                ISSN:0098-3500
                EISSN:1557-7295
                DOI:10.1145/1377596
                Issue’s Table of Contents

                Copyright © 2008 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 1 July 2008
                • Accepted: 1 July 2007
                • Revised: 1 May 2007
                • Received: 1 November 2000
                Published in toms Volume 34, Issue 4

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article
                • Research
                • Refereed

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader