Prev Next whats_new_13

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
CppAD Changes and Additions During 2013

This section contains a list of the changes to CppAD during 2013 (in reverse order by date). The purpose of this section is to assist you in learning about changes between various versions of CppAD.

  1. The include file cppad_eigen.hpp now automatically includes cppad.hpp.
  2. There was a problem with this automation when eigen was used for the cppad testvector . This has been fixed.
  3. There was a problem with deprecated autotools (created when optional implicit constructor from any type was added). This has been fixed by adding the --with-implicit_ctor option (later removed on 2017-02-10 .)

The constructor from an arbitrary type to AD<Base> was implicit, but there was no specification to this effect. The caused problems when using CppAD with eigen 3.2 (scheduled to be fixed in 3.3). The default for this constructor has been changed to be explicit . In addition, other implicit constructors are now listed in the documentation.

If you get a compiler error on an constructor / assignment of the form
Base> x = y
(that used to work) try changing the constructor call to
Base>( y )
A deprecated alternative is to make this constructor implicit using the cppad_deprecated option during the install procedure.

Document fact that monthly versions of the CppAD compressed tar file last till the end of the year.

The interface to eigen defined a function
     NumTraits< CppAD::AD<
Base> >::dummy_epsilon()
that should have been named dummy_precision(). This has been fixed.

  1. Fix bug when using optimize with an ADFun object containing the sign function.
  2. Add atomic_norm_sq.cpp , an atomic function example with domain dimension two and range dimension one.

It used to be that one had to define the std::set version of atomic_rev_sparse_jac for each atomic function that was part of an ADFun object that was optimized . Now the current atomic_sparsity setting is used to determine if the bool or std::set version of rev_sparse_jac is used by the optimization process.

Error detection and reporting (when NDEBUG is not defined) has been added for the following case: Using optimize with atomic_base functions that have not defined rev_sparse_jac .

The optimization now handles nested conditional expressions. For example, give the code
     x = CondExpLt(left_x, right_x, true_x, false_x)
     y = CondExpGt(left_y, right_y, true_y, false_y)
     z = CondExpEq(left_z, right_z, x, y)
only two of the conditional expressions will be evaluated (one will be skipped depending on the result of left_z == right_z). For more details, see optimize_nest_conditional.cpp .

  1. Fix a bug in the optimization of calls to atomic functions. This bug existed before recent change to optimizing conditional expressions. This required adding the dependency argument to the reverse Jacobian sparsity pattern calculation.
  2. Fix the deprecated autotools install (see autotools ) which was broken by the changes on 10-22. To be specific, the example for number_skip was not being included.

  1. Add optimization of conditional expressions; see CondExp .
  2. Add a phantom argument at the beginning of the operations sequence; size_op_arg and seq_property.cpp . (This helps with the optimization mentioned above.)
  3. Add the function number_skip to measure how much optimization of the conditional expressions there is.

Fix bug in Tracing atomic functions.

The documentation for the class vectorBool was improved.

The script was added (for downloading and installing ADOL-C ) in the build directory. Note that this local install of Adolc requires ColPack; see . In addition, the requirement that ColPack and Adolc are installed with the same prefix was added.

Make sure that all of the preprocessor symbols , that are not part of the CppAD API, are undefined when the <cppad/cppad.hpp> file concludes.

  1. Change so that it will reuse install information when it is present. In addition document reuse for , , and .
  2. Fix following g++ error on OSX system:
    error: no match for 'operator|=' (operand types are
    'std::vector<bool>::reference {aka std::_Bit_reference}' and 'bool')
        Check[i * n + j] |= F2[i * n + k] & r[ k * n + j];

  1. Add lines for atomic_base function documentation to both the definition and use of each operation. This required adding sub-headings in the example usages corresponding to the function documentation sections. For example; see atomic forward examples .
  2. Improve the documentation for atomic_base_clear and remove its use from the atomic_base examples (because it is not needed).

Add links from the atomic_base functions documentation to the corresponding examples. This required adding headings in the examples that correspond to the function documentation sections. For example; see atomic forward examples .

  1. A segmentation fault would occur if an ADFun object used an atomic function that had been deleted. This has been fixed so that when NDEBUG is not defined, an error message is generated.
  2. A mistake in the documentation for Memory and Parallel Mode has been fixed. This corresponds to the change in the specifications for CppAD::vector::resize made on 2012-07-30
  3. There was a bug during the checking for nan during reverse mode. This has been fixed.
  4. It appears, from inspecting the Ipopt source file Ipopt/src/Algorithm/IpIpoptAlg.cpp that the option sb to yes suppress the printing of the Ipopt banner. The Ipopt examples and tests have been changed to use this option (although it is not in the ipopt documentation).
  5. Fix the a typo in the documentation for ipopt_solve Integer options (Numeric was changed to Integer).

There was a bug in the cumulative sum operator (which is used by optimize ) for Forward orders greater than zero. This was detected by the checkpoint tests when optimize was used to make the checkpoint functions faster. The bug has been fixed and the checkpoint functions now use optimize (and hence should be faster).

  1. The ability to turn on and off checking for nan in Forward mode results has been added; see check_for_nan .
  2. Use this option to remove the need to handel nan as a special case in checkpoint functions that atomic functions in within another function is optimized.
  3. Check reverse mode results when check_for_nan is true. (It used to be the case that only forward results were checked for nan.)

If an atomic function had arguments that did not affect the final dependent variables in f , f.optimize() would fail. This has been fixed. In addition, documentation about using optimize with atomic functions has been added.

Fix a case where the test test_more/num_limits.cpp failed because
     double inf   = std::numeric_limits<double>::infinity();
     double check = std::complex<double>(inf) / std::complex<float>(1.)
can result in the imaginary part of check being - nan.

Allow for use of const::string& as a possible type for name in the atomic_base constructor.

Remove ok return flag from checkpoint algo and checkpoint atom_fun .

  1. Deprecate the old_atomic interface and replace it by the atomic_base and checkpoint interfaces.
  2. There was a problem with the cmake command if the cppad_cxx_flags was not specified. This has been fixed.

  1. Add the transpose option to ForSparseJac .
  2. Add the transpose option to RevSparseHes .

Change RevSparseJac parameter names to be closer to the ForSparseJac names so the difference is clearer.

  1. The checkpoint class has been added. This is a much easier way to do checkpointing than the old checkpoint example. The old checkpointing example is now the reverse_checkpoint.cpp example.
  2. Fix bug in RevSparseJac for case when q was not equal to m (range dimension) and sparsity pattern was a vector of bool.
  3. Add the transpose option to RevSparseJac .

The sparse hessian example in old_reciprocal.cpp was not being run. This has been fixed.

The old_atomic examples names were all changed to begin with user.

The option to compute multiple orders was added. The old_usead_2.cpp example shows the need for this. The problem is that a new atomic function interface needs to be designed with checkpointing as a particular application. Multiple order forward mode is the first step in this direction.

  1. The scripts and were added. If you are using Unix, and you do not have Eigen or Sacado installed on your system, you can use the corresponding script to download and install a local copy for use when testing CppAD.
  2. The code std::cout << X , would generate a compile error when X was an Eigen matrix with CppAD::AD<Base> elements. This has been fixed.

There was a problem using the output operator << with and eigen matrix of AD elements. This has been fixed using a template partial specialization of
     template<typename Scalar, bool IsInteger>
     struct significant_decimals_default_impl
because the original template requires definition of a implicit conversion from the scalar type to an int and this is dangerous for AD types (note that Integer is used for explicit conversions).

  1. The example old_usead_2.cpp was completed. This is a more realistic, but also more complicated, example of using AD to computed derivatives inside an atomic function.
  2. The script has been added. If you are using Unix, and you do not have FADBAD installed on your system, you can use this script to download and install a local copy for use when testing CppAD.

Input File: omh/appendix/whats_new/whats_new_13.omh