1 | $Id$ |
---|
2 | /* -------------------------------------------------------------------------- |
---|
3 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell |
---|
4 | |
---|
5 | CppAD is distributed under multiple licenses. This distribution is under |
---|
6 | the terms of the |
---|
7 | Eclipse Public License Version 1.0. |
---|
8 | |
---|
9 | A copy of this license is included in the COPYING file of this distribution. |
---|
10 | Please visit http://www.coin-or.org/CppAD/ for information on other licenses. |
---|
11 | -------------------------------------------------------------------------- */ |
---|
12 | |
---|
13 | $begin whats_new_15$$ |
---|
14 | $dollar @$$ |
---|
15 | $spell |
---|
16 | acosh |
---|
17 | asinh |
---|
18 | src |
---|
19 | op |
---|
20 | onetape |
---|
21 | CppAD |
---|
22 | colpack |
---|
23 | hes |
---|
24 | cppad |
---|
25 | Jacobian |
---|
26 | gettimeofday |
---|
27 | cmake |
---|
28 | hpp |
---|
29 | dir |
---|
30 | includedirs |
---|
31 | libdirs |
---|
32 | datadir |
---|
33 | docdir |
---|
34 | std |
---|
35 | cxx |
---|
36 | erf |
---|
37 | var |
---|
38 | NumRes |
---|
39 | chrono |
---|
40 | aeps |
---|
41 | CondExpGt |
---|
42 | hasnan |
---|
43 | $$ |
---|
44 | |
---|
45 | $section CppAD Changes and Additions During 2015$$ |
---|
46 | |
---|
47 | $head Introduction$$ |
---|
48 | This section contains a list of the changes to CppAD during 2015 |
---|
49 | (in reverse order by date). |
---|
50 | The purpose of this section is to |
---|
51 | assist you in learning about changes between various versions of CppAD. |
---|
52 | |
---|
53 | $head 05-07$$ |
---|
54 | Add the inverse hyperbolic sine function $cref acosh$$. |
---|
55 | If you are defining your own base type, |
---|
56 | note that $cref/acosh/base_std_math/erf, asinh, acosh/$$ |
---|
57 | was added to the base type requirements. |
---|
58 | |
---|
59 | $head 05-05$$ |
---|
60 | Add the inverse hyperbolic sine function $cref asinh$$. |
---|
61 | If you are defining your own base type, |
---|
62 | note that $cref/asinh/base_std_math/erf, asinh, acosh/$$ |
---|
63 | was added to the base type requirements. |
---|
64 | |
---|
65 | $head 04-18$$ |
---|
66 | In the sparse jacobian and sparse hessian calculations, |
---|
67 | If $icode work$$ is present, and has already been computed, |
---|
68 | the sparsity pattern $icode p$$ is not used. |
---|
69 | This has been added to the documentation; see |
---|
70 | $cref/sparse jacobian/sparse_jacobian/work/p/$$ and |
---|
71 | $cref/sparse hessian/sparse_hessian/work/p/$$ documentation |
---|
72 | for $icode work$$ and $icode p$$. |
---|
73 | |
---|
74 | $head 03-13$$ |
---|
75 | Remove the syntax |
---|
76 | $codei% |
---|
77 | AD<%Base%> %y% = %x% |
---|
78 | %$$ |
---|
79 | for the $cref/AD constructor/ad_ctor/$$ documentation because it does not |
---|
80 | work when the constructor is $cref/explicit/ad_ctor/x/explicit/$$. |
---|
81 | Also document the restriction that the constructor in the |
---|
82 | $cref/assignment/ad_assign/$$ must be implicit. |
---|
83 | |
---|
84 | $head 03-06$$ |
---|
85 | The developers of the |
---|
86 | $href%https://github.com/kaskr/adcomp%TMB%$$ package reported that |
---|
87 | for large $cref ADFun$$ tapes, the $cref optimize$$ routine uses |
---|
88 | a large amount of memory because it allocates a standard set for |
---|
89 | each variable on the tape. These sets are only necessary for variables in |
---|
90 | $cref/conditional expressions/condexp/$$ that can be skipped once |
---|
91 | the independent variables have a set value. |
---|
92 | The problem has been reduced by using a NULL pointer for the empty set |
---|
93 | and similar changes. It still needs more work. |
---|
94 | |
---|
95 | $head 02-28$$ |
---|
96 | It used to be the case that the |
---|
97 | $cref/Reverse mode/reverse/$$ would propagate $cref nan$$ |
---|
98 | through the $cref/conditional expression/condexp/$$ |
---|
99 | case that is not used. |
---|
100 | For example, if |
---|
101 | $codep |
---|
102 | Independent(ax); |
---|
103 | AD<double> aeps = 1e-10; |
---|
104 | ay[0] = CondExpGt( ax[0], aeps, 1.0/ax[0], 1.0/aeps ); |
---|
105 | ADFun<double> f(ax, ay); |
---|
106 | $$ |
---|
107 | The corresponding reverse mode calculation, |
---|
108 | at $code x[0] = 0.0$$, would result in |
---|
109 | $codep |
---|
110 | Error detected by false result for |
---|
111 | ! ( hasnan(value) && check_for_nan_ ) |
---|
112 | $$ |
---|
113 | This has been fixed so that only the conditional expression case that is used |
---|
114 | affects the reverse mode results. |
---|
115 | The example $cref cond_exp.cpp$$ was changed to reflect this |
---|
116 | (a check for $code nan$$ was changed to a check for zero). |
---|
117 | Note that this fix only works when |
---|
118 | $cref/IdenticalPar/base_identical/Identical/IdenticalPar/$$ is true for the |
---|
119 | base type of the result in the conditional expression; e.g., |
---|
120 | one can still get a $code nan$$ effect from the case that is not selected |
---|
121 | when using $code AD< AD<double> >$$ conditional expressions. |
---|
122 | |
---|
123 | $head 02-18$$ |
---|
124 | If the compiler supports the c++11 feature |
---|
125 | $code std::chrono:high_resolution_clock$$ then use it for |
---|
126 | the $cref elapsed_seconds$$ function. |
---|
127 | |
---|
128 | $head 02-16$$ |
---|
129 | The new example $cref sub_sparse_hes.cpp$$ shows one way to |
---|
130 | compute a Hessian for a subset of variables without having to compute |
---|
131 | the sparsity pattern for the entire functions. |
---|
132 | |
---|
133 | $head 02-14$$ |
---|
134 | Fix another bug in the derivative calculations for the |
---|
135 | c++11 version of the error function; see |
---|
136 | $cref/CPPAD_COMPILER_HAS_ERF/erf/Method/CPPAD_COMPILER_HAS_ERF/$$. |
---|
137 | |
---|
138 | $head 02-11$$ |
---|
139 | Fix a bug in the optimization of conditional expressions. To be specific, |
---|
140 | if $cref/NDEBUG/faq/Speed/NDEBUG/$$ is not defined, one could get |
---|
141 | an assert with the message: |
---|
142 | $codep |
---|
143 | Error detected by false result for |
---|
144 | var_index_ >= NumRes(op_) |
---|
145 | $$ |
---|
146 | |
---|
147 | $head 02-10$$ |
---|
148 | The change on $cref/2014-12-23/whats_new_14/12-23/$$ introduced a |
---|
149 | bug when the c++11 version of the error function was used with |
---|
150 | an $cref/optimized/optimize/$$ function. see |
---|
151 | $cref/CPPAD_COMPILER_HAS_ERF/erf/Method/CPPAD_COMPILER_HAS_ERF/$$. |
---|
152 | There was also a bug in the sparsity calculations for when |
---|
153 | this erf function was included. |
---|
154 | These bugs have been fixed. |
---|
155 | |
---|
156 | $head 02-09$$ |
---|
157 | The test $code test_more/optimize.cpp$$ was failing on some systems |
---|
158 | because an exactly equality check should have been a near equal check. |
---|
159 | This has been fixed. |
---|
160 | |
---|
161 | $head 02-07$$ |
---|
162 | On some systems, the library |
---|
163 | corresponding to $code speed/src$$ could not be found. |
---|
164 | This library is only used for testing and so has been changed to always be |
---|
165 | static (hence does not need to be found at run time). |
---|
166 | |
---|
167 | $head 02-06$$ |
---|
168 | There was a bug in the coloring method change on |
---|
169 | $cref/2015-01-07/whats_new_15/01-07/$$. |
---|
170 | To be specific, $icode%work%.color_method%$$ was not being set |
---|
171 | to $code "cppad.symmetric"$$ after $icode%work%.color_method.clear()%$$. |
---|
172 | This has been fixed. |
---|
173 | |
---|
174 | $head 02-04$$ |
---|
175 | $list number$$ |
---|
176 | Enable the same install of CppAD to be used both with and without C++11 |
---|
177 | features; e.g., with both $code g++ --std=c++11$$ and with |
---|
178 | $code g++ --std=c++98$$. Previously if the |
---|
179 | $cref/cppad_cxx_flags/cmake/cppad_cxx_flags/$$ specified C++11, |
---|
180 | then it could only be used in that way. |
---|
181 | $lnext |
---|
182 | The $cref/cmake command/cmake/CMake Command/$$ now requires the version |
---|
183 | of $code cmake$$ to be greater than or equal 2.8 |
---|
184 | (due a bug in $code cmake$$ version 2.6). |
---|
185 | $lend |
---|
186 | |
---|
187 | $head 02-03$$ |
---|
188 | Improved the searching for the boost multi-threading library |
---|
189 | which is used for by the $cref team_bthread.cpp$$ case of the |
---|
190 | $cref thread_test.cpp$$ example and test. |
---|
191 | |
---|
192 | $head 02-02$$ |
---|
193 | Improve the documentation for the |
---|
194 | $cref/cmake command/cmake/CMake Command/$$ line options |
---|
195 | $codei% |
---|
196 | cmake_install_%dir% |
---|
197 | %$$ |
---|
198 | for $icode dir$$ equal to |
---|
199 | $code prefix$$, $code postfix$$, $code includedirs$$, $code libdirs$$, |
---|
200 | $code datadir$$, and $code docdir$$. |
---|
201 | |
---|
202 | $head 01-30$$ |
---|
203 | Fix bug in $cref link_sparse_hessian$$ speed test introduced on |
---|
204 | $cref/01-09/whats_new_15/01-09/$$ below. |
---|
205 | |
---|
206 | $head 01-29$$ |
---|
207 | Fix some warnings generated by $code g++ 4.9.2$$. |
---|
208 | |
---|
209 | $head 01-26$$ |
---|
210 | The change of global variables to local in |
---|
211 | $code cppad/local/op_code.hpp$$ on $cref/2014-50-14/whats_new_14/05-14/$$ |
---|
212 | created a bug in $cref parallel_ad$$ (some local statics needed to |
---|
213 | be initialized). This has been fixed. |
---|
214 | |
---|
215 | $head 01-23$$ |
---|
216 | There was a bug in the $cref cmake$$ install detection of compiler features. |
---|
217 | One symptom of this bug was that on systems that had the $code gettimeofday$$ |
---|
218 | function, the cmake install would sometimes report |
---|
219 | $codei% |
---|
220 | cppad_has_gettimeofday = 0 |
---|
221 | %$$ |
---|
222 | This has been fixed. |
---|
223 | |
---|
224 | $head 01-21$$ |
---|
225 | The deprecated $cref auto_tools$$ procedure had a bug in the |
---|
226 | detection of when the size of an $code unsigned int$$ |
---|
227 | was the same as the size of a $code size_t$$. This has been fixed. |
---|
228 | |
---|
229 | $head 01-20$$ |
---|
230 | $list number$$ |
---|
231 | The new $cref compare_change$$ interface has been created |
---|
232 | and the old $cref CompareChange$$ function has been deprecated; |
---|
233 | see the $cref compare_change.cpp$$ example. |
---|
234 | This enables one to determine the source code during taping |
---|
235 | that corresponds to changes in the comparisons during |
---|
236 | $cref/zero order forward/forward_zero/$$ operations; see |
---|
237 | $cref/abort_op_index/Independent/abort_op_index/$$. |
---|
238 | |
---|
239 | $lnext |
---|
240 | This new $cref compare_change$$ interface can detect comparison changes |
---|
241 | even if $cref/NDEBUG/Faq/Speed/NDEBUG/$$ is defined and |
---|
242 | even if $cref/f.optimize()/optimize/$$ has been called. |
---|
243 | The deprecated function $code CompareChange$$ used to always return zero after |
---|
244 | $codei% |
---|
245 | %f%.optimize() |
---|
246 | %$$ |
---|
247 | and was not even defined when $code NDEBUG$$ was defined. |
---|
248 | There was a resulting speed effect for this; see the wish list |
---|
249 | $cref/compare change/WishList/Optimization/Comparison Changes/$$ entry. |
---|
250 | |
---|
251 | $lnext |
---|
252 | The date when some features where deprecated has been added to the |
---|
253 | documentation. For example, see |
---|
254 | $cref/Deprecated 2006-12-17/include_deprecated/Deprecated 2006-12-17/$$. |
---|
255 | $lend |
---|
256 | |
---|
257 | $head 01-09$$ |
---|
258 | $list number$$ |
---|
259 | The change 01-07 below included (but did not mention) using |
---|
260 | a sparse, instead of full, structure for the Hessian in the test. |
---|
261 | This has also been done for the |
---|
262 | $cref/sparse Jacobian/link_sparse_jacobian/$$ test. |
---|
263 | $lnext |
---|
264 | For both the |
---|
265 | $cref/sparse_jacobian/link_sparse_jacobian/$$ and |
---|
266 | $cref/sparse_hessian/link_sparse_hessian/$$ tests, |
---|
267 | the sparse function is only chosen once |
---|
268 | (it used to be different for every repeat). |
---|
269 | This reduced the amount of computation not connected what is being tested. |
---|
270 | It also make the $cref/onetape/speed_main/option_list/onetape/$$ a valid |
---|
271 | option for these tests. |
---|
272 | $lnext |
---|
273 | There was a bug in the |
---|
274 | $cref/multiple direction forward/forward_dir/$$ routine. |
---|
275 | Results for function values that are |
---|
276 | $cref/parameter/parvar/$$ were not being computed properly |
---|
277 | (all the derivatives are zero in this case). |
---|
278 | This has been fixed. |
---|
279 | $lend |
---|
280 | |
---|
281 | |
---|
282 | $head 01-07$$ |
---|
283 | The following changes were merged in from the $code color_hes$$ branch: |
---|
284 | $list number$$ |
---|
285 | Specify the type of |
---|
286 | $cref/coloring/sparse_hessian/work/color_method/$$ |
---|
287 | for the sparse hessian calculations. |
---|
288 | To be specific, instead of $code "cppad"$$ and $code "colpack"$$, |
---|
289 | the choices are $code "cppad.symmetric"$$, $code "cppad.general"$$, |
---|
290 | and $code "colpack.star"$$. |
---|
291 | This is not compatible with the change on |
---|
292 | $cref/01-02/whats_new_15/01-02/$$, which was so recent |
---|
293 | that this should not be a problem. |
---|
294 | $lnext |
---|
295 | The $cref/n_sweep/link_sparse_hessian/n_sweep/$$ values were |
---|
296 | not being returned properly by |
---|
297 | $cref cppad_sparse_hessian.cpp$$ and |
---|
298 | $cref adolc_sparse_hessian.cpp$$. |
---|
299 | The CppAD version has been fixed and the ADOL-C version |
---|
300 | has been set to zero. |
---|
301 | $lnext |
---|
302 | The $cref link_sparse_hessian$$ example case was to sparse for good |
---|
303 | testing (by mistake). |
---|
304 | This has been fixed. |
---|
305 | $lnext |
---|
306 | Add $icode n_sweep$$ to |
---|
307 | $cref/link_sparse_hessian/link_sparse_hessian/n_sweep/$$ and |
---|
308 | $cref/speed_main/speed_main/Speed Results/n_sweep/$$. |
---|
309 | $lnext |
---|
310 | Change the $code cppad$$ sparse Hessian |
---|
311 | $cref/color_method/sparse_hessian/work/color_method/$$ |
---|
312 | to take advantage of the symmetry of the Hessian |
---|
313 | (in a similar fashion to the $code colpack$$ coloring method). |
---|
314 | $lend |
---|
315 | |
---|
316 | $head 01-02$$ |
---|
317 | Added to option to uses |
---|
318 | $cref/colpack/colpack_prefix/$$ for the sparse Hessian |
---|
319 | $cref/coloring method/sparse_hessian/work/color_method/$$; |
---|
320 | see the example $cref colpack_hes.cpp$$. |
---|
321 | |
---|
322 | $end |
---|