[ADOL-C] conditional assignments in tapeless mode
Alfonso Callejo Goena
alcallejo at gmail.com
Mon Sep 20 05:43:30 EDT 2010
Thank you very much for your prompt reply.
I thought the "jacobian" and "sparse_jac" drivers, which are the ones I use,
worked in forward mode. Anyhow, I would like to try the tapeless mode.
After transforming the "condassign" calls into regular conditional
statements, the new errors are related to the "<<=" and ">>=" operators.
Can't they be used in the tapeless mode?
2010/9/17 Kshitij Kulshreshtha <kshitij at math.upb.de>
> As on 2010-09-17 16:29, Alfonso Callejo Goena did write:
> > Hi all,
> > I have already implemented ADOL-C in a multibody simulation program, and
> > now I'm trying to test the tapeless mode to see if it improves the
> > program efficiency.
> > The thing is that the "condassign" functions, which solve the problem of
> > having conditional statements in the code, seem to work only with the
> > tape mode. In fact, if one looks into adouble.h, the "condassign"
> > functions aren't declared if the tapeless macro ADOLC_TAPELESS is
> > set. By the way, the compiler throws a "condassign: identifier not
> > found" error.
> > Am I overlooking something?
> Hello Alfonso,
> the tapeless mode is forward only, so if your code needs reverse mode it
> is not recommended to use tapeless. In forward mode tapeless will bring
> some gain only if the tape is too large and must be written to disk. You
> may try tweaking the buffer sizes in ADOL-C/src/usrparms.h file before
> compiling ADOL-C and see if that brings you some speed. These
> buffersizes may be in total as big as the physical memory your system
> has free.
> In the tapeless mode you really don't need any condassign calls at all.
> You can simply use the form
> var = cond ? val1 : val2;
> The condassign is used in the taped version internally to write these
> condition checks onto the tape since the operator ?: cannot be
> overloaded. In tapeless mode this is not required as nothing extra needs
> to be done.
> Kshitij Kulshreshtha
> Institut für Mathematik,
> Universität Paderborn,
> Warburger Straße 100,
> 33098 Paderborn.
> Büro: A3.235
> Arnikaweg 62
> 33100 Paderborn.
> ADOL-C mailing list
> ADOL-C at list.coin-or.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ADOL-C