[CppAD] overflow of tape id when using many tapes
Brad Bell
bradbell at seanet.com
Sun Jul 1 11:56:39 EDT 2012
Thanks for the bug report I wondered if this would ever happen, and now
it has.
I think that a good solution will be to maintain a list of active tapes.
I will look into it and get back to you.
Brad.
On 07/01/2012 03:25 AM, Stefan Vigerske wrote:
> Hi, .
>
> in my code I use CppAD to evaluate function values and derivatives in
> many different places.
> For that, it is easier to create a new tape for each function.
> When the program runs a while (say, 8 hours), I seem to get an
> overflow in the tape_id, because CppAD seem to assign the id's with
> increasing numbers but does not reuse id's of tapes that are no longer
> in use.
>
> Originally, I had set CPPAD_MAX_NUM_THREADS to 48, which already gave
> a failure after 4 hours. When setting it to a power of 2, it works
> better, because after an overflow the tapeid is at a 0 again.
> However, changing CPPAD_MAX_NUM_THREADS to 1 does not seem to help much.
> Actually, the last tape id before I get a segmentation fault is
> 8173126, which is even far below the maximum for an unsigned int.
> I'm now trying with CPPAD_TAPE_ID_TYPE changed to size_t.
>
> Anyhow, is there some better solution on how to use many tapes (but
> not all at the same time) in a longrunning program?
> If I were able to remember which tape id's are still in use, is there
> a way I can tell CppAD which id to use next?
>
> Best,
> Stefan
> _______________________________________________
> CppAD mailing list
> CppAD at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cppad
>
More information about the CppAD
mailing list