Prev Next whats_new_17

@(@\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}} }@)@
Changes and Additions to CppAD During 2017

API Changes
Speed tests no longer automatically compile in release mode; see debug_which

Add the subgraph_hes2jac.cpp example which computes sparse Hessians using subgraphs and Jacobians.

  1. A wish list item for a new API for user defined atomic functions.
  2. A multi-threading wish list item was added.

A wish_list item to enable one to iterate through a const ADFun operation sequence was completed. In addition, the f argument to the abs_normal operation was converted to be const.

The internal data object used to represent sparsity patterns as vectors of integers was improved; see internal_bool in for_jac_sparsity and other preferred sparsity pattern routines.

Back out the hold_reverse_memory option.

The hold_reverse_memory option was added.

Edit the download instructions.

The ADFun function optimizer was not handling hash code collisions properly. To be specific, only the arguments that were variables where checked for a complete match. The arguments that are constants need to also be checked. This has been fixed.

  1. Add the subgraph_jac_rev method for computing sparse Jacobians.
  2. Add the subgraph option to the CppAD speed tests.

Add the subgraph_reverse method for computing sparse derivatives. This was inspired by the TMB package.

  1. Add wish list item for subgraph_sparsity when atomic functions are present.
  2. Fix cmake_check when ipopt_prefix is not present on the cmake command line (make was trying to build some of the ipopt tests).

  1. Add the hes2jac option to the CppAD speed tests.
  2. Implement the subsparsity option for the CppAD sparse_hessian test.
  3. Fix detection of invalid options in the speed test programs; see the global and sparsity options.

Add the subsparsity option to the CppAD speed tests.

Add the subgraph_sparsity method for computing dependency and sparsity. This was inspired by the TMB package.

More information has been added to the operation sequence. To be specific, the extra amount of
f.size_op() * sizeof(tape_addr_type)
was added to the value returned by size_op_seq .

The method for iterating through the tape has been changed. It now includes an extra data structure that makes it faster, but also requires slightly more memory. To be specific, the term
f.size_op() * sizeof(tape_addr_type) * 2
was added to the value returned by size_op_seq . In addition, some minor corrections were made to the tape_addr_type requirements.

  1. Require cmake.3.1 or greater and fix a cmake warning by always using the new CMP0054 policy.
  2. Fix a g++ 7.2.1 warning about a possibly uninitialized value in the file cppad/local/optimize/hash_code.hpp.

An optimization memory entry was added to the wish list and the check_finite entry was modified.

  1. If colpack_prefix was not specified, one would get the following waring during the cmake command:
         Policy CMP0046 is not set: Error on non-existent dependency in
    This has been fixed by not adding the dependency when it is not needed.
  2. There was a problem running make check when cppad_cxx_flags was not specified. This has been fixed. This was probably introduced on 05-29 .

There was a problem on some systems that created an error when specializing the is_pod template function in the CppAD::local namespace. This has been fixed by testing for compatibility at during the cmake command and creating the file cppad/local/is_pod.hpp.

Add the test_boolofvoid wish list item.

  1. The eigen_plugin.hpp was put back in the cppad_eigen.hpp definitions. This makes CppAD incompatible with older versions of eigen; e.g., eigen-3.2.9. The plugin was removed on 05-12 .
  2. Fix some minor typos in the documentation. To be specific: The font, in the sparse_rc and sparse_rcv syntax, for the text
    target = pattern
    The font, in capacity_order , for the text
    xq.size() == f.Domain()
    Remove a percent sign %, in CppAD_vector , in the text
         # include <cppad/utility/vector.hpp>

  1. Fix warnings related to type conversions that occurred when one used -Wconversion with g++ version 6.3.1.
  2. The warning were not fixed for complex AD types; e.g., complex_poly.cpp . The wno_conversion include file was added to deal with cases like this.

  1. The min_nso_linear abs-normal example was added.
  2. Fix bug in abs_normal_fun , to be specific, the multiplication of a variable on the left by a parameter was not handled.

the abs_normal examples were converted from using quadratic programming problems to using linear programming problems.

The abs-normal representation of non-smooth functions has been added. Examples and utilities that use this representation have also been included, see abs_normal .

The user atomic functions base class atomic_base makes more of an effort to avoid false sharing cache misses. This may the speed of multi-threaded applications with user atomic functions; e.g., see multi_atomic.cpp .

  1. Add the multi-threading user atomic function example multi_atomic.cpp .
  2. The example/multi_thread/test_multi directory used to have an example using the deprecated old_atomic functions in a multi-threading setting (that only built with the deprecated autotools ). This have been removed.

The multi-threading examples harmonic.cpp and multi_newton.cpp were re-organized. To be specific, the source code for each example was moved to one file. In addition, for each example, the documentation for each of the routines has been separated and placed next to its source code.

Most all the deprecated features have been removed from the examples with the exception of those in the example/deprecated directory.

Add the fact that the pair ( row , col ) is lower triangular to the speed test link_sparse_hessian routine.

  1. There was a bug in the sparse_hes routine and it was using the general coloring algorithm when cppad.symmetric was specified. This has been fixed and improves the efficiency in this case.
  2. Some bugs were fixed in the use of colpack as the coloring algorithm for sparse Jacobian and Hessian calculations. This has improved the efficiency of Colpack colorings for computing Hessians (when colpack.symmetric is used).
  3. The coloring method for sparse Hessians has been deprecated; see sparse_hes and sparse_hessian . Use the colpack.symmetric method instead; see sparse_hes and sparse_hes .

  1. Add the capability to compile so that CppAD debug and release mode can be mixed; see CPPAD_DEBUG_AND_RELEASE .
  2. Add the cppad_debug_which flags that determines which files are compiled for debugging versus release during the CppAD testing; see cmake_check .
  3. There was a problem linking the proper libraries for using newer versions of sacado . This has been fixed.

Most all the examples have been moved to example directory and grouped as sub-directories; e.g., the ipopt_solve examples are in the example/ipopt_solve directory.

  1. The file was moved to bin/, and `auto tools' has been changed to autotools .
  2. The README file was replace by and AUTHORS was moved to authors.
  3. The NEWS, INSALL, and ChangeLog files are no longer necessary for autotools build and have been removed.
  4. The file test_more/sparse_jacobian.cpp generated a warning under some gcc compiler options. This has been fixed.
  5. Specifications were added so that to_string yields exact results for integer types and machine precision for floating point types.
  6. Some editing was done to the autotools instructions.

  1. The Faq has been updated.
  2. Remove includes of cppad/cppad.hpp from the cppad/speed/*.hpp files. This avoids an incompatibility between sacado and newer versions of eigen, when eigen is used for the test vector .
  3. The eigen package changed its requirements for defining Scalar types (some where between eigen-3.2.9 and eigen-3.3.3). The member variable digit10 was added to the numeric_limits to accommodate this change.
  4. Note that this fix required adding digits10 to the user defined Base type requirements ; see base_limits .
  5. In addition, it is no longer necessary to add the typedef
         typedef Scalar value_type;
    so the file cppad/example/eigen_plugin.hpp has been removed. (This type definition was previously necessary for eigen vectors to be simple vectors .)

The optimization , with a large number of conditional expressions , was performing many memory allocations and deallocations. This has been reduced.

Fix a bug in the optimization of conditional expressions; see, no_conditional_skip .

Fix some valgrind errors that occurred while running the CppAD test set.

The following valgrind error might occur when the optimize skipped setting values that did not affect the dependent variables:
     Conditional jump or move depends on uninitialised value(s)
This was not a bug, the code has been changed to avoid this error in order to make it easier to use valgrind with CppAD.

  1. The sparse_hes function was more efficient if there were more entries in each row of the requested subset . This has been changed to more entries in each column, and documentation to this effect was included.
  2. The optimize routine was using to much memory when it was optimizing conditional skip operations; see no_conditional_skip . This has been fixed.

There was a mistake in sparse_jac that caused the following assert to mistakenly occur:
sparse_jac_rev: work is non-empty and conditions have changed
Error detected by false result for
    color.size() == 0 || color.size() == n
A test that using a previously stores work vector has been added to sparse_jac_rev.cpp and this bug has been fixed.

The documentation for the Hessian in rev_hes_sparsity was transposed; i.e., the sense of transpose was reversed.

Add sparse assignment statements; see target for sparse_rc and sparse_rcv .

Add the a sizing constructor to the sparse_rc syntax ; i.e., a constructor that sets the number of row, number of columns, and number of possibly non-zero values in the sparsity pattern.

Fix a bug in the sparsity computation using the internal representation for vectors of sets ; i.e., when internal_bool was false in any of the sparsity_pattern calculations; e.g., for_jac_sparsity .

Fix a bug in the optimization of conditional expressions; see no_conditional_skip .

  1. Fix warning during cmake command, on cygwin systems, about WIN32 not being defined.
  2. Add element-wise operations to the wish list.

  1. Minor improvements to syntax and documentation for sparse_rc and sparse_rcv .
  2. Separate preferred sparsity versions in sparsity_pattern and sparse_derivative .

  1. Remove the bool_sparsity.cpp example and add the rc_sparsity.cpp example.
  2. Check for duplicate entries during row_major and col_major in sparse_rc.

Fix bug when using ForSparseHes with atomic functions; i.e., atomic_for_sparse_hes .

Improve for_sparse_jac calculation in eigen_mat_mul.hpp example. It now checks for the parameter zero and does not propagate any sparsity in this case (because the result is always zero).

  1. Remove the 'Under Construction' heading from the sparse_rc and sparse_rcv documentation; i.e., they are ready for public use (part of the CppAD API).
  2. Fix some warning that occur when using eigen for the CppAD test vector. (The Eigen vector size() function returns an int instead of size_t.)
  3. Fix a bug in sparse_jac_rev .

  1. The subset of deprecated features corresponding to cppad_deprecated=YES have been completely removed.
  2. Fix problems with autotools build (started near 02-01 while working on sparsity branch).
  3. Reorder (better organize) the ADFun documentation section.

  1. Remove the sparsity pattern wish list item. For sparsity patterns, this was completed by sparse_rc and the sparsity pattern routines that used it; e.g., for_jac_sparsity . For sparse matrices, it was completed by sparse_rcv and the sparse matrix routines that use it; e.g., sparse_jac .
  2. Add the Deprecated and example items to the wish list. (The Deprecated item was partially completed and partially removed.)

  1. Make coloring a separate argument to sparse_jac and sparse_hes .
  2. Add the group_max argument to the sparse_jac_for function.

  1. Add the sparse_jac_for routine which uses sparse_rc sparsity patterns and sparse_rcv matrix subsets.
  2. Order for sparse_rc row-major and column-major was switched. This has been fixed.

Add the rev_jac_sparsity rev_hes_sparsity , and for_hes_sparsity interfaces to sparsity calculations. These use sparse_rc sparsity patterns.

Change size_forward_bool and Change size_forward_set so that they are a better approximation of the number of bytes (unsigned characters) being used. The exact same sparsity pattern might use different memory in two different function objects (because memory is allocated in chunks). The fun_assign.cpp example has been changed to reflect this fact.

Add the for_jac_sparsity interface for the sparse Jacobian calculations. This is the first use of sparse_rc , a sparsity pattern class that uses row and column index vectors .

Move the sparsity_pattern examples from example to example/sparse subdirectory. This included the sparse driver examples.

Move the utility examples from example to example/utility subdirectory.

Add a addon link to cppad_swig , a C++ AD object library and swig interface to Perl, Octave, and Python.

Convert more examples / tests to use a multiple of machine epsilon instead of 1e-10.

  1. Fix developer doxydoc documentation so that it works with newer version of doxygen.
  2. Fix a Visual C++ 2015 compilation problem in friend declarations in the file cppad/local/ad_tape.hpp.

Change computed assignment to compound assignment .
Input File: omh/appendix/whats_new/whats_new_17.omh