Cranfield Defence and Security
Permanent URI for this community
Browse
Browsing Cranfield Defence and Security by Publisher "ACM Association for Computing Machinery"
Now showing 1 - 2 of 2
Results Per Page
Sort Options
Item Open Access An Efficient overloaded implementation of forward mode automatic differentiation in MATLAB(ACM Association for Computing Machinery, 2006-06-01T00:00:00Z) Forth, Shaun A.The Mad package described here facilitates the evaluation of first derivatives of multi-dimensional functions that are defined by computer codes written in MATLAB. The underlying algorithm is the well-known forward mode of automatic differentiation implemented via operator overloading on variables of the class fmad. The main distinguishing feature of this MATLAB implementation is the separation of the linear combination of derivative vectors into a separate derivative vector class derivvec. This allows for the straightforward performance optimisation of the overall package. Additionally by internally using a matrix (two-dimensional) representation of arbitrary dimension directional derivatives we may utilise MATLAB"s sparse matrix class to propagate sparse directional derivatives for MATLAB code which uses arbitrary dimension arrays. On several examples the package is shown to be more efficient than Verma"s ADMAT package.© ACM, 2006. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM Transactions on Mathematical Software (TOMS) Volume 32 , Issue 2 (June 2006) 195 - 222, 2006 ISSN:0098-3500 http://doi.acm.org/10.1145/1141885.1141888Item Open Access Jacobian Code Generated by Source Transformation and Vertex Elimination can be as Efficient as Hand-Coding(ACM Association for Computing Machinery, 2004-09-01T00:00:00Z) Forth, Shaun A.; Tadjouddine, Mohamed; Pryce, John D.; Reid, John K.This article presents the first extended set of results from ELIAD, a source- transformation implementation of the vertex-elimination Automatic Differentiation approach to calculating the Jacobians of functions defined by Fortran code (Griewank and Reese, Automatic Differentiation of Algorithms: Theory, Implementation, and Application, 1991, pp. 126-135). We introduce the necessary theory in terms of well known algorithms of numerical linear algebra applied to the linear, extended Jacobian system that prescribes the relationship between the derivatives of all variables in the function code. Using an example, we highlight the potential for numerical instability in vertex-elimination. We describe the source transformation implementation of our tool ELIAD and present results from five test cases, four of which are taken from the MINPACK- 2 collection (Averick et al, Report ANL/MCS-TM-150, 1692) and for which hand- coded Jacobian codes are available. On five computer/compiler platforms, we show that the Jacobian code obtained by ELIAD is as efficient as hand-coded Jacobian code. It is also between 2 to 20 times more efficient than that produced by current, state of the art, Automatic Differentiation tools even when such tools make use of sophisticated techniques such as sparse Jacobian compression. We demonstrate the effectiveness of reverse-ordered pre-elimination from the (successively updated) extended Jacobian system of all intermediate variables used once. Thereafter, the monotonic forward/reverse ordered eliminations of all other intermediates is shown to be very efficient. On only one test case were orderings determined by the Markowitz or related VLR heuristics found superior. A re-ordering of the statements of the Jacobian code, with the aim of reducing reads and writes of data from cache to registers, was found to have mixed effects but could be very beneficial.