source: trunk/omh/whats_new/whats_new_13.omh @ 3071

Last change on this file since 3071 was 3071, checked in by bradbell, 6 years ago

test_one.sh.in: update choices when compiling eigen versus not.
whats_new_13.omh: improve discussion of eigen.
mul_level.cpp: test conversion from double to AD<AD<double>>.
test_one.sh.in: update choices when compiling eigen versus not.

  • Property svn:keywords set to Id
File size: 17.1 KB
Line 
1$Id: whats_new_13.omh 3071 2014-01-01 04:02:27Z bradbell $
2/* --------------------------------------------------------------------------
3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
4
5CppAD is distributed under multiple licenses. This distribution is under
6the terms of the
7                    Eclipse Public License Version 1.0.
8
9A copy of this license is included in the COPYING file of this distribution.
10Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11-------------------------------------------------------------------------- */
12
13$begin whats_new_13$$
14$dollar @$$
15$spell
16        ctor
17        Num
18        autotools
19        nz
20        Jacobian
21        CondExp Lt Gt Eq
22        op_arg
23        Adolc
24        aka
25        sacado
26        resize
27        sb
28        IpIpoptAlg.cpp
29        inf
30        const
31        algo
32        afun
33        cxx
34        checkpointing
35        cout
36        typename
37        bool
38        struct
39        impl
40        std
41        alloc
42        ptr
43        isnan
44        cmake
45        namespace
46        testvector
47        eigen
48        microsoft
49        src
50        jac
51        hpp
52        Wunused
53        Cpp
54        cppad
55$$
56
57$section CppAD Changes and Additions During 2013$$
58
59$head Introduction$$
60This section contains a list of the changes to CppAD during 2013
61(in reverse order by date).
62The purpose of this section is to
63assist you in learning about changes between various versions of CppAD.
64
65$head 12-29$$
66$list number$$
67The include file
68$cref cppad_eigen.hpp$$ now automatically includes $code cppad.hpp$$.
69$lnext
70There was a problem with this automation
71when $code eigen$$ was used for the cppad $cref testvector$$.
72This has been fixed.
73$lnext
74There was a problem with deprecated $cref InstallUnix$$
75(created when optional implicit constructor from any type was added).
76This has been fixed by adding the
77$cref/--with-implicit_ctor/InstallUnix/--with-implicit_ctor/$$ option.
78$lend
79
80$head 12-27$$
81The constructor from an arbitrary type to $codei%AD<%Base%>%$$ was
82implicit, but there was no specification to this effect.
83The caused problems when using CppAD with
84$cref/eigen 3.2/eigen_prefix/$$ (scheduled to be fixed in 3.3).
85The default for this constructor has been changed to be
86$cref/explicit/ad_ctor/x/explicit/$$.
87In addition, other
88$cref/implicit/ad_ctor/x/implicit/$$ constructors
89are now listed in the documentation.
90$pre
91
92$$
93If you get a compiler error on an constructor / assignment of the form
94$codei%
95        AD<%Base%> x = %y%
96%$$
97(that used to work) try changing the constructor call to
98$codei%
99        AD<%Base%>( %y% )
100%$$
101A deprecated alternative is to make this constructor implicit using the
102$cref/cppad_implicit_ctor_from_any_type
103        /cmake
104        /cppad_implicit_ctor_from_any_type
105/$$
106option during the install procedure.
107
108$head 12-26$$
109Document fact that
110$cref/monthly versions/download/Compressed Tar File/Monthly Versions/$$
111of the CppAD compressed tar file last till the end of the year.
112
113$head 12-24$$
114The interface to $cref/eigen/cppad_eigen.hpp/$$ defined a function
115$codei%
116        NumTraits< CppAD::AD<%Base%> >::dummy_epsilon()
117%$$
118that should have been named $code dummy_precision()$$.
119This has been fixed.
120
121$head 11-27$$
122$list number$$
123Fix bug when using $cref optimize$$ with an $cref ADFun$$ object containing
124the $cref sign$$ function.
125$lnext
126Add $cref atomic_norm_sq.cpp$$, an atomic function example
127with domain dimension two and range dimension one.
128$lend
129
130$head 11-13$$
131It used to be that one had to define the $code std::set$$ version of
132$cref atomic_rev_sparse_jac$$ for each atomic function that was
133part of an $cref ADFun$$ object that was $cref/optimized/optimize/$$.
134Now the current
135$cref/atomic_sparsity/atomic_option/atomic_sparsity/$$ setting is used
136to determine if the $code bool$$ or $code std::set$$ version of
137$code rev_sparse_jac$$ is used by the optimization process.
138
139$head 11-12$$
140Error detection and reporting (when $code NDEBUG$$ is not defined)
141has been added for the following case:
142Using $cref optimize$$
143with $cref atomic_base$$ functions that have not defined
144$cref/rev_sparse_jac/optimize/Atomic Functions/rev_sparse_jac/$$.
145
146$head 10-29$$
147The $cref/optimization/CondExp/Optimize/$$
148now handles nested conditional expressions.
149For example, give the code
150$codep
151        x = CondExpLt(left_x, right_x, true_x, false_x)
152        y = CondExpGt(left_y, right_y, true_y, false_y)
153        z = CondExpEq(left_z, right_z, x, y)
154$$
155only two of the conditional expressions will be evaluated
156(one will be skipped depending on the result of $code left_z == right_z$$).
157For more details, see
158$cref/nesting conditional expressions/
159WishList/Conditional Expressions/Nesting/$$
160
161$head 10-23$$
162$list number$$
163Fix a bug in the optimization of calls to $cref atomic$$ functions.
164This bug existed before recent change to optimizing conditional expressions.
165This required adding the
166$cref/nz_compare/RevSparseJac/nz_compare/$$ argument to the
167reverse Jacobian sparsity pattern calculation.
168For further details; see sparsity heading under conditional expressions in the
169$cref/whish list/WishList/Conditional Expressions/Sparsity/$$.
170$lnext
171Fix the deprecated autotools install (see $cref InstallUnix$$)
172which was broken by the changes on 10-22.
173To be specific, the
174example for $cref number_skip$$ was not being included.
175$lend
176
177$head 10-22$$
178$list number$$
179Add $cref/optimization/optimize/$$ of conditional expressions; see
180$cref/CondExp/CondExp/Optimize/$$.
181$lnext
182Add a phantom argument at the beginning of the operations sequence;
183$cref/size_op_arg/seq_property/size_op_arg/$$ and $cref seq_property.cpp$$.
184(This helps with the optimization mentioned above.)
185$lnext
186Add the function $cref number_skip$$ to measure how much optimization
187of the conditional expressions there is.
188$lend
189
190$head 10-16$$
191Fix bug in $cref/Tracing/WishList/Tracing/$$ $cref atomic$$ functions.
192
193$head 10-15$$
194The documentation for the class
195$cref/vectorBool/CppAD_vector/vectorBool/$$ was improved.
196
197$head 10-14$$
198The script $cref get_adolc.sh$$ was added
199(for downloading and installing
200$href%https://projects.coin-or.org/ADOL-C%ADOL-C%$$) in the
201$code build$$ directory.
202Note that this local install of Adolc requires ColPack; see
203$cref get_colpack.sh$$.
204In addition, the requirement that ColPack and Adolc are installed
205with the same prefix was added.
206
207$head 10-13$$
208Make sure that all of the
209$cref/preprocessor symbols/cppad/Preprocessor Symbols/$$,
210that are not part of the CppAD API, are undefined when the
211$code <cppad/cppad.hpp>$$ file concludes.
212
213$head 10-12$$
214$list number$$
215Change $cref get_eigen.sh$$ so that it will reuse install information
216when it is present.
217In addition document reuse for
218$cref/get_eigen.sh/get_eigen.sh/Reuse/$$,
219$cref/get_ipopt.sh/get_ipopt.sh/Reuse/$$, and
220$cref/get_sacado.sh/get_sacado.sh/Reuse/$$.
221$lnext
222Fix following $code g++$$ error on OSX system:
223$codep
224error: no match for 'operator|=' (operand types are
225'std::vector<bool>::reference {aka std::_Bit_reference}' and 'bool')
226    Check[i * n + j] |= F2[i * n + k] & r[ k * n + j];
227                     ^
228$$
229$lend
230
231$head 09-20$$
232$list number$$
233Add lines for $cref atomic_base$$ function documentation
234to both the definition and use of each operation.
235This required adding sub-headings in the example usages
236corresponding to the function documentation sections.
237For example; see
238$cref/atomic forward examples/atomic_forward/Examples/$$.
239$lnext
240Improve the documentation for $cref atomic_base_clear$$
241and remove its use from the
242$cref/atomic_base examples/atomic_base/Examples/$$
243(because it is not needed).
244$lend
245
246$head 09-19$$
247Add links from the $cref atomic_base$$ functions documentation
248to the corresponding examples.
249This required adding headings in the examples that
250correspond to the function documentation sections.
251For example; see
252$cref/atomic forward examples/atomic_forward/Examples/$$.
253
254$head 09-18$$
255$list number$$
256A segmentation fault would occur if
257an $cref ADFun$$ object used an $cref atomic$$
258function that had been deleted.
259This has been fixed so that when $code NDEBUG$$ is not defined,
260an error message is generated.
261$lnext
262A mistake in the documentation for
263$cref/Memory and Parallel Mode/CppAD_vector/Memory and Parallel Mode/$$
264has been fixed.
265This corresponds to the change in the specifications for
266$cref/CppAD::vector::resize/CppAD_vector/resize/$$ made on
267$cref/2012-07-30/whats_new_12/07-30/$$
268$lnext
269There was a bug during the
270$cref/checking for nan/check_for_nan/$$ during
271$cref reverse$$ mode.
272This has been fixed.
273$lnext
274It appears, from inspecting the Ipopt source file
275$code Ipopt/src/Algorithm/IpIpoptAlg.cpp$$ that the option $code sb$$
276to $code yes$$ suppress the printing of the Ipopt banner.
277The Ipopt examples and tests have been changed to use this option
278(although it is not in the ipopt documentation).
279$lnext
280Fix the a typo in the documentation for $code ipopt_solve$$
281$cref/Integer/ipopt_solve/options/Integer/$$ options
282($code Numeric$$ was changed to $code Integer$$).
283$lend
284
285$head 09-07$$
286There was a bug in the cumulative sum operator
287(which is used by $cref optimize$$ )
288for $cref Forward$$ orders greater than zero.
289This was detected by the $cref checkpoint$$ tests
290when $code optimize$$ was used to make the
291checkpoint functions faster.
292The bug has been fixed and the checkpoint functions now use
293optimize (and hence should be faster).
294
295$head 08-12$$
296$list number$$
297The ability to turn on and off checking for $cref nan$$ in
298$cref Forward$$ mode results has been added; see $cref check_for_nan$$.
299$lnext
300Use this option to remove the need to handel $code nan$$ as a special
301case in $cref checkpoint$$ functions that
302$cref/atomic functions/optimize/Atomic Functions/$$ in within
303another function is optimized.
304$lnext
305Check $cref/reverse/reverse_any/$$  mode results when
306$cref check_for_nan$$ is true.
307(It used to be the case that only $cref/forward/ForwardAny/$$ results
308were checked for $code nan$$.)
309$lend
310
311$head 08-11$$
312If an $cref atomic$$ function had arguments that did not affect
313the final dependent variables in $icode f$$,
314$cref/f.optimize()/optimize/$$ would fail.
315This has been fixed.
316In addition, documentation about using $code optimize$$
317with $cref/atomic functions/optimize/Atomic Functions/$$ has been added.
318
319$head 08-06$$
320Fix a case where the test $code test_more/limits.cpp$$ failed because
321$codep
322        double inf   = std::numeric_limits<double>::infinity();
323        double check = std::complex<double>(inf) / std::complex<float>(1.)
324$$
325can result in the imaginary part of $code check$$ being $code - nan$$.
326
327$head 07-26$$
328Allow for use of $code const::string&$$ as a possible type for
329$cref/name/atomic_ctor/atomic_base/name/$$ in the $code atomic_base$$
330constructor.
331
332$head 05-28$$
333Remove $icode ok$$ return flag from
334$cref/checkpoint algo/checkpoint/algo/$$
335and
336$cref/checkpoint afun/checkpoint/afun/$$.
337
338$head 05-21$$
339$list number$$
340Deprecate the $cref old_atomic$$ interface and replace it by the
341$cref atomic_base$$ and $cref checkpoint$$ interfaces.
342$lnext
343There was a problem with the $cref cmake$$ command
344if the $cref/cppad_cxx_flags/cmake/cppad_cxx_flags/$$ was not specified.
345This has been fixed.
346$lend
347
348
349$head 05-17$$
350$list number$$
351Add the $cref/transpose/ForSparseJac/transpose/$$ option to
352$cref/ForSparseJac/$$.
353$lnext
354Add the $cref/transpose/RevSparseHes/transpose/$$ option to
355$cref/RevSparseHes/$$.
356$lend
357
358$head 05-15$$
359Change $cref RevSparseJac$$ parameter names to be closer to the
360$cref ForSparseJac$$ names so the difference is clearer.
361
362$head 05-14$$
363$list number$$
364The $cref checkpoint$$ class has been added.
365This is a much easier way to do checkpointing than the
366old checkpoint example.
367The old checkpointing example is now the $cref reverse_any.cpp$$ example.
368$lnext
369Fix bug in $cref RevSparseJac$$ for case when $cref/q/RevSparseJac/q/$$
370was not equal to $icode m$$ (range dimension) and sparsity pattern was a
371vector of $code bool$$.
372$lnext
373Add the $cref/transpose/RevSparseJac/transpose/$$ option to
374$cref/RevSparseJac/$$.
375$lend
376
377$head 05-12$$
378The sparse hessian example in $cref old_reciprocal.cpp$$ was not
379being run. This has been fixed.
380
381$head 05-11$$
382The $cref/old_atomic examples/old_atomic/Example/$$
383names were all changed to begin with $code user$$.
384
385$head 05-04$$
386The option to compute
387$cref/multiple orders/ForwardAny/x_p/Multiple Orders/$$ was added.
388The $cref old_usead_2.cpp$$ example shows the need for this.
389The problem is that a new atomic function interface needs to be designed
390with checkpointing as a particular application.
391Multiple order forward mode is the first step in this direction.
392
393$head 04-28$$
394$list number$$
395The scripts $cref get_eigen.sh$$ and $cref get_sacado.sh$$ were added.
396If you are using Unix, and you do not have
397$href%http://eigen.tuxfamily.org%Eigen%$$ or
398$href%http://trilinos.sandia.gov/packages/sacado%Sacado%$$
399installed on your system, you can use the corresponding script
400to download and install a local copy for use when testing CppAD.
401$lnext
402The code $codei%std::cout << %X%$$,
403would generate a compile error when $icode X$$ was an Eigen matrix
404with $codei%CppAD::AD<%Base%>%$$ elements.
405This has been fixed.
406$lend
407
408
409$head 04-27$$
410There was a problem using the output operator $code <<$$ with
411and $cref/eigen/cppad_eigen.hpp/$$ matrix of $code AD$$ elements.
412This has been fixed using a template partial specialization of
413$codep
414        template<typename Scalar, bool IsInteger>
415        struct significant_decimals_default_impl
416$$
417because the original template requires definition of a implicit conversion
418from the scalar type to an $code int$$ and this is dangerous for AD types
419(note that $cref Integer$$ is used for explicit conversions).
420
421
422$head 04-26$$
423$list number$$
424The example $cref old_usead_2.cpp$$ was completed.
425This is a more realistic, but also more complicated, example of
426using AD to computed derivatives inside an atomic function.
427$lnext
428The script $cref get_fadbad.sh$$ has been added.
429If you are using Unix, and you do not have
430$href%http://www.fadbad.com%FADBAD%$$
431installed on your system, you can use this script
432to download and install a local copy for use when testing CppAD.
433$lend
434
435$end
436
437$head 04-20$$
438The example $cref old_usead_1.cpp$$ was added.
439
440$head 04-16$$
441The script $cref get_ipopt.sh$$ has been added.
442If you are using Unix, and you do not have
443$href%http://www.coin-or.org/projects/Ipopt.xml%Ipopt%$$ 
444installed on your system, you can use this script
445to download and install a local copy for use when testing CppAD.
446
447$head 04-14$$
448The following program,
449when executed, would cause a CppAD assertion with an unknown source:
450$codep
451        # include <cppad/cppad.hpp>
452        int main(void)
453        {       size_t min_bytes = static_cast<size_t>(-1);
454                size_t cap_bytes;
455                void *v_ptr = CppAD::thread_alloc::get_memory(min_bytes, cap_bytes);
456                return 0;
457        }
458$$
459It now generates the following message,
460(when compiled without $cref/NDEBUG/faq/Speed/NDEBUG/$$)"
461$codep
462        get_memory(min_bytes, cap_bytes): min_bytes is too large
463        Error detected by false result for
464                min_bytes < std::numeric_limits<size_t>::max() / 2
465$$
466
467
468$head 03-02$$
469The function $cref/isnan/nan/$$ no longer allows for systems
470that return false for $icode%x% != %x%$$ when $icode x$$ is $code NaN$$.
471This makes the $code isnan$$ function faster.
472In addition, it removes the need to store a static value
473which causes complications for parallel execution (as well as other problems).
474Thus, it is no longer necessary for the first call to $code isnan$$
475to be during sequential execution and it has been removed from the
476multi-threading $cref/initialization/multi_thread/Initialization/$$ list.
477
478$head 03-01$$
479Remove the $cref cmake$$ $code cppad_c11_flag$$ and instead
480automatically detect if the compiler supports specific c++11 features.
481
482$head 02-27$$
483The test $cref limits.cpp$$ was failing during testing of Fedora-19; see
484$href%https://bugzilla.redhat.com/show_bug.cgi?id=913929% Bug 913929%$$.
485This has been fixed.
486
487$head 02-20$$
488$list number$$
489The documentation for the $cref cmake$$ install option
490$code cppad_test_vector_namespace$$ was fixed to be
491$cref/cppad_testvector/cmake/cppad_testvector/$$.
492This was also fixed for the
493$cref/eigen test vector/eigen_prefix/Test Vector/$$ documentation.
494$lnext
495An option to specify that the compiler supports c++11 constructs,
496$code cppad_c11_flag$$, was added
497to the $code cmake$$ command line.
498$lend
499$head 01-07$$
500Fix undefined $code microsoft_timer$$ when building the
501$cref speed_example.cpp$$ program.
502
503$head 01-06$$
504$list number$$
505The $cref limits$$ documentation was corrected an improved.
506$lnext
507The $cref limits.cpp$$ example was simplified and restricted to just testing
508for $code AD<double>$$.
509$lnext
510Testing for types other than $code AD<double>$$
511was moved to $code test_more/limits.cpp$$.
512In addition, $code test_more/limits.cpp$$ was modified to avoid the
513use of guard digits (and hence test failure) on more machines.
514$lend
515
516$head 01-05$$
517$list number$$
518The $cref limits.cpp$$ example was failing on some machines
519because they were using guard digits during calculations.
520This has been fixed by using vectors instead of scalars
521for storing values.
522$lnext
523The $cref speed_example.cpp$$ was not linking when using a shared
524object library for the code in $code speed/src$$.
525This has been fixed by not including the library when linking
526the speed examples.
527$lend
528
529$head 01-02$$
530$list number$$
531A new stable version of CppAD, for 2013, was created
532and its first release $code cppad-20130000.0$$ is available
533for download at
534$pre
535        $$
536$href%http://www.coin-or.org/download/source/CppAD/%$$
537$lnext
538Advance version number for trunk to $code 20130102$$.
539$lend
540
541$head 01-01$$
542When compiling with $cref/NDEBUG/Faq/Speed/NDEBUG/$$ defined,
543the following warning could be generated:
544$codei%
545%...%rev_sparse_jac.hpp:315:9: warning: unused variable 'm' [-Wunused-variable]
546%$$
547This has been fixed.
548
549
550$end
Note: See TracBrowser for help on using the repository browser.