[ADOL-C] Large size advector slows down run time?

Choi Ji-Wung ji-wung.choi at scania.com
Thu Mar 15 06:45:36 EDT 2018


Dear Prof. Walther,
I appreciate your answer.
Let me ask some follow-up questions.

1) 
> If the traces are written to disc then an increase of the buffer sizes in
> adolc/internal/usrparms.h
> will help.

Which constant should I change? OBUFSIZE, LBUFSIZE, VBUFSIZE, or TBUFSIZE?

2)
> If the traces are not written to disc then the only possibility is to 
> somehow avoid the generation of that vector if it is not really necessary.

My program needs to handle dynamically changing indices of the data. 
I am wondering if there is any other way to do the task without using advector.

3) Is it possible to use advector in a sparse representation? 

Thanks.

-----Original Message-----
From: Andrea Walther [mailto:andrea.walther at uni-paderborn.de] 
Sent: Thursday, March 15, 2018 8:48 AM
To: Choi Ji-Wung <ji-wung.choi at scania.com>; adol-c at list.coin-or.org
Subject: Re: [ADOL-C] Large size advector slows down run time?

Hi,

> So it seems obvious to use advector.
> 
> But only constructing such size of advector slows down runtime, 
> significantly:
> 
>    advector vec(160000);
> 
>    // vec is not even used anywhere.
> 
>    // But, after constructing the variable, runtime of 
> IpoptApplication::OptimizeTNLP() that internally calls ADOL-C has become 
> significantly slower.

yes that fits to our expectation since internally the book keeping for
a new vector of size 160000 has to be done.

You might check whether this leads to the storage of the internally
generated traces of ADOL-C to disc. This would explain that you observe
a severe slow down.

> Do you have any suggestion to resolve this problem?

If the traces are not written to disc then the only possibility is to 
somehow avoid the generation of that vector if it is not really necessary.

If the traces are written to disc then an increase of the buffer sizes in

adolc/internal/usrparms.h

will help. Then the traces are kept in main menory and therefore the 
access  times are faster.

Hope this helps. Otherwise just send an email again.

Best regards

Andrea Walther

-- 
Prof. Dr. Andrea Walther
Lehrstuhl fuer Mathematik und ihre Anwendungen
Institut fuer Mathematik
Universitaet Paderborn
Warburger Str. 100
33098 Paderborn

Email: andrea.walther at uni-paderborn.de
Phone: ++49 5251 602721
Fax:   ++49 5251 603728

**********




More information about the ADOL-C mailing list