Abstract
The adjoint code generator (ADG) is developed to produce the adjoint codes, which are used to analytically calculate gradients and the Hessian-vector products with the costs independent of the number of the independent variables. Different from other automatic differentiation tools, the implementation of ADG has advantages of using the least program behavior decomposition method and several static dependence analysis techniques. In this paper we first address the concerned concepts and fundamentals, and then introduce the functionality and the features of ADG. In particular, we also discuss the design architecture of ADG and implementation details including the recomputation and storing strategy and several techniques for code optimization. Some experimental results in several applications are presented at the end.
Similar content being viewed by others
References
Yamamoto T. On the method of tangent hyperbolas in Banach spaces. J Comput Appl Math, 1998, 21: 75–86
Deng N Y, Zhang H B. Theoretical efficiency of a new inexact method of tangent hyperbolas. Optim Methods Softw, 2004, 19(3–4): 247–265
Knoll D A, Keys D E. Jacobian-free Newton-Krylov methods: A survey of approaches and applications. J Comput Phys, 2004, 193(2): 357–397
Wolfram S. The Mathematica Book. 3rd ed. Cambridge: Cambridge University Press and Wolfram Media, Inc., 1996
Waterloo Maple Software, Inc. Maple V software package, 1994
Macsyma Users’ Guide, 1996
Griewank A. On Automatic Differentiation, Mathematical Programming: Recent Developments and Applications (Amsterdam). Iri M, Tanabe K, eds. Dordrecht: Kluwer Academic Publishers, 1989. 83–108
Griewank A. Evaluating Derivatives: Principles and Techniques of Automatic Differentiation. Philadelphia: SIAM, 2000
Wang B, Zou X L, Zhu J, et al. Data assimilation and its applications. Proc Natl Acad Sci USA, 2000, 97: 11143–11144
Zou X L, Wang B, Liu H, et al. Use of GPS/MET refraction angles in three-dimensional variational analysis. Quart J Roy Meteor Soc, 2000, 126: 3013–3040
Le Dimet F X, Talagrand O. Variational algorithms for analysis and assimilation of meteorological observations: theoretical aspects. Tellus, 1986, 38(A): 97–110
Zhang X, Wang B. Parallel computing of a variational data assimilation model for GPS/MET observation using the raytracing method. Adv Atmos Sci, 2004, 21: 220–226
Berresa S, Bulvedab R, Coronel A, et al. Numerical identification of parameters for a flocculated suspension from concentration measurements during batch centrifugation. Chem Eng J, 2005, 111: 91–103
Bischof C, Pusch G, Knoesel R. Sensitivity analysis of the MM5 weather model using automatic differentiation. Comput Phys, 1996, 10: 605–612
Cacui D G. Sensitivity theory for nonlinear systems, II: Extension to additional classes of responses. J Math Phys, 1981, 22(12): 2803–2812
Mu M. Nonlinear singular vectors and nonlinear singular values. Sci China Ser D-Earth Sci, 2000, 43: 375–385
Griewank A. An implementation of checkpointing for the reverse or adjoint model of differentiation. ACM Trans Math Softw, 1999, 26(1): 1–19
Bischof C, Haghighat M R. On hierarchical differentiation. In: Berz M, Bischof C, Corliss G, et al., eds. Computational Differentiation: Techniques, Applications, and Tools. Philadelphia, PA: SIAM, 1996. 83–94
Volin YM, Ostrovskill G M. Automatic computation of derivatives with the use of the multi-class differentiation techniques. Comput Math Appl, 1985, 11: 1099–1114
Griewank A. Achieve logarithmic growth of temporal and spatial complexity in reverse automatic differentiation. Optim Methods Softw, 1992, 1: 35–54
Bischof C, Buker H M, Hovland P, et al. Advances in Automatic Differentiation, Lecture Notes in Computational Science and Engineering. Berlin: Springer, 2008. 64
Cheng Q, Zhang L B, Wang B. Model adjointization and its costs. Sci China Ser F-Inf Sci, 2004, 47(5): 587–611
Cheng Q, Zhang H B, Zhao Y H. Differentiation transforming system. Nat Sci Prog, 2009, 19(3): 397–406
Levine J, Mason T. Lex and Yacc. 2nd ed. Sebastopol, CA: O Reilly and Associate Inc., 1992
Giering R, Kaminski T. Recipes for adjoint code construction. ACM Trans Math Softw, 1998, 24(4): 437–474
Rostating N, Dalmas S, Galligo A. Automatic differentiation in Odyssee. Tellus, 1993, 45(A): 558–568
Griewank A, Juedes D, Utke J. Algorithm 755: ADOL-C, a package for the automatic differentiation of algorithms written in C/C++. ACM Trans Math Softw, 1996, 22(2): 131–167
Bischof C, Carle A, Corliss G, et al. ADIFOR: Generating derivative codes for Fortran programs. Scientific Program, 1992, 1(1): 11–29
Griewank A. Some bounds on the complexity of gradients, Jacobians, and Hessians. In: Pardalos P M, ed. Complexity in Nonlinear Optimization. River Edge, NJ: World Scientific Publishers, 1993. 128–161
Newsam G N, Ramsdell J D. Estimation of sparse Jacobian matrices. SIAM J Algebr Discrete Method, 1983, 4: 404–417
Balay S, Buschelman K, Eijkhout V, et al. PETSc 2.0 users manual. Technical Report ANL-95/11-Revision 2.1.3, Argonne National Laboratory, May 2003
Zou X L, Vandenberghe F, Wang B, et al. A Raytracing operator and its adjoint for the use of GPS/MET refraction angle measurements. J Geophys Res Atmos, 1999, 104(D18): 22301–22318
Wang B, Ji Z Z. Construction and numerical tests for the multi-conservation difference scheme. Chin Sci Bull, 2003, 48(10): 1016–1020
Wu W, Song L C, Mo Y R, et al. Xiamen-An ab initio Spin-Free Valence Bond (VB) Program. Xiamen: Xiamen University Press, 1998
Song L C, Luo Y, Dong K M, et al. Paired-permanent approach for VB theory (II). Sci China Ser B-Mech, 2001, 44(6): 561–570
Roberta G, Dean A M, Green W H, et al. Hydrogen abstraction rates via density functional theory. Chem Phys Lett, 1999, 312(2–4): 262–268
Author information
Authors and Affiliations
Corresponding author
Additional information
Supported by the National Natural Science Foundation of China (Grant Nos. 60503031, 10871014), and the National Basic Research Program of China (Grant No. 2004CB418304)
Rights and permissions
About this article
Cite this article
Cheng, Q., Cao, J., Wang, B. et al. Adjoint code generator. Sci. China Ser. F-Inf. Sci. 52, 926–941 (2009). https://doi.org/10.1007/s11432-009-0098-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11432-009-0098-5