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

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

revert back to explicit for ctor from any type as default

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