[ADOL-C] conditional assignments in tapeless mode
Alfonso Callejo Goena
alcallejo at gmail.com
Mon Sep 20 05:43:30 EDT 2010
Hi Kshitij,
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?
Regards,
Alfonso
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.
>
> Regards.
> --
> Kshitij Kulshreshtha
>
> Institut für Mathematik,
> Universität Paderborn,
> Warburger Straße 100,
> 33098 Paderborn.
>
> Büro: A3.235
>
> Privatanschrift:
> Arnikaweg 62
> 33100 Paderborn.
>
> _______________________________________________
> ADOL-C mailing list
> ADOL-C at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/adol-c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/adol-c/attachments/20100920/69901242/attachment.html
More information about the ADOL-C
mailing list