[Trilinos-Users] Sacado reverse mode

Phipps, Eric T etphipp at sandia.gov
Mon Mar 2 09:54:00 MST 2009


Hi Nik,

The reverse mode in Sacado (called RAD) does use a temporary buffer that is somewhat similar to ADOL-C, but not exactly the same.  In the forward evaluation, RAD creates a temporary buffer that stores the value and partial derivatives of each intermediate operation that are accumulated during the reverse sweep.  ADOL-C on the other hand stores values and a functional representation of each operation.  The operation partials are then only implicitly generated and used during the reverse accumulation.  Since RAD stores the partials up-front, there is less interpretation of the temporary buffer/tape as compared to ADOL-C leading to a generally more efficient derivative computation.  Note however that RAD doesn't provide any capability for re-evaluating this temporary buffer at a new set of independent values (this isn't possible since RAD doesn't store functional information), nor any branch switching capabilities.  Instead you should re-create the buffer when evaluating at a new point, and RAD makes use of a custom memory management scheme to make this efficient.

As far as I understand, ADOL-C can't in fact recreate a tape for you, rather if there are branches in the code, you replace the conditionals with a special ADOL-C function that represents the branch in the tape.  Then the appropriate branch will be evaluated from the tape depending on the value of the conditional (essentially all possible paths through the code are taped).  This only works if all of your branches through the code can be evaluated together and have no conflicts.

Unfortunately the documentation for Sacado is lacking as you pointed out.  That is something we hope to rectify in the future.  The README_RAD file in sacado/src describes some usage tips for RAD.  More information about RAD is also provided in a paper available on Dave Gay's website: http://www.cs.sandia.gov/~dmgay/ad04_paper.pdf.

I hope this helps.  Please let us know if you have any further questions.

-Eric


On 2/27/09 4:35 PM, "Nikhil Kriplani" <nkriplani at gmail.com> wrote:

Hi,

About the reverse mode in Sacado: Does it use a temporary buffer or
tape like some AD packages (like ADOL-C) do when operating in reverse
mode or does it perform code evaluations everytime the function is
called, for example in a loop? I am somewhat familiar with ADOL-C and
I know that when there is a branch switch detected in ADOL-C, the tape
is recreated.

I couldn't find any documentation on Sacado apart from looking at code
examples. Is there a place I can get some documentation and usage
tips?

Thanks,
Nik

_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20090302/f5f374e8/attachment.html 


More information about the Trilinos-Users mailing list