Derivative Code Compiler (dcc) Version 1.0
dcc is a source-to-source compiler that generates
first- and higher-order tangent-linear and adjoint code for numerical
programs written in a subset of C/C++.
For tests you can download a prior version of dcc from the book's website The Art of Differentiating Computer Programs.
Based on the prior version 0.9 of dcc, the version on the current site is the recent version
where the usability and the input language has been extended.
Please note that the command line syntax is completely different to the one from version 0.9, as you can see in the following example.
Let us consider the following code.
void f(int n, int m, double* x, double* y)
#pragma ad indep x
#pragma ad dep y
To generate the tangent-linear code assuming that the code is given in the file f.c is done by:
dcc -t f.c
To provide the adjoint code the compiler expects the option -a:
dcc -a f.c
The reapplication of dcc to its own output is used to provide second order derivative code.
For example to get the forward-over-reverse code type:
dcc -a f.c
gcc -E -P -I. -C a1_f.c > a1_f_preprocessed.c
dcc -t -d 2 a1_f_preprocessed.c
The call to the preprocessor (gcc -E -P -I. -C) is necessary because dcc generates some C macros and include statements that have to be processed before
the reapplication can be done.
The generated files are:
Download (restricted to RWTH network)
A static binary version of dcc version 1.0 can be downloaded for Windows 32bit or as a version for Linux 64 bit (compiled for the RWTH Cluster environment).
- Michael Förster, Uwe Naumann.
Toward Adjoint OpenMP.
Department Of Computer Science Technical Reports.
Michel Schanen, Michael Förster, Boris Gendler, and Uwe Naumann.
Compiler-based Differentiation of Numerical Simulation Codes.
In ICCGI 2011, The Sixth International Multi-Conference on Computing in the Global Information Technology
, pages 105–110. IARIA, 2011.
M. Schanen, U. Naumann, and M. Förster.
Second-order adjoint algorithmic differentiation by source transformation of MPI code.
In Recent Advances in the Message Passing Interface, Lecture Notes in Computer Science, pages 257–264. Springer, 2010.
Ralf Hannemann, Boris Gendler, Jutta Wyes, Michael Förster, Moritz Schmitz, Wolfgang Marquardt, and Uwe Naumann.
AC-SAMMM: The Aachen Platform for Structured Automatic Manipulation of Mathematical Models.
Presented at: ASIM Workshop 2010, Trends in Computational Science and Engineering: Foundations of Modeling and Simulation; March 2010, Jülich.
Uwe Naumann, Wolfgang Marquardt, Ralf Hannemann, Boris Gendler, Jutta Wyes, Michael Förster, and Moritz Schmitz.
AC-SAMMM: Structured automatic manipulation of mathematical models.
Poster, 2011. Presented at: ASIM Workshop 2011, Trends in Computational Science and Engineering: Foundations of Modeling and Simulation; March 2011, Munich.
Ebadollah Varnik, Jörn Ungermann, Johannes Lotz, Michael Förster, Michel Schanen, Uwe Naumann, Martin Kaufmann, and Lars Hoffmann.
AD enabled Jurassic: Jülich Rapid Spectral Simulation Code.
Poster, 2010. Presented at: ASIM Workshop 2010, Trends in Computational Science and Engineering: Foundations of Modeling and Simulation; March 2010, Jülich.