Prev Next whats_new_07

Changes and Additions to CppAD During 2007

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

License conversions missed the copyright message at the top in the following special cases:,, and omh/license.omh.

The install instructions have been improved.

The --with-Documentation option on the configure command line caused an error on some systems because it attempted to copy to many files. This has been fixed by copying the directory instead of the individual files.

By mistake, the documentation License statement for the GPL distribution was the same as for the CPL distribution. This has been fixed.

Change the name of the spec file from cppad-yyyymmdd.spec to cppad.spec.

Add the capability for the RPM spec file to use a different prefix directory.

This is the first version with the rpm spec file cppad.spec.

Add the DESTDIR=directory option on the make install command line.

The std_math_ad function sqrt did not link properly when Base was AD<double>. This has been fixed.

The routines nan and isnan were failing for some systems because they use nan and or isnan as preprocessor symbols. This has been fixed; see macros . In addition, the example and test nan.cpp has been added.

Speed tests for tape_values branch were not better than trunk, so the good parts of that branch (but not all) were merged into the trunk.

The interface specifications for base type requirements have been changed so that CppAD would compile with gcc 4.1.1 (which requires more definitions before use in template functions). This changed of requirements is demonstrated by the base_complex.hpp and base_adolc.hpp examples.

The problem with newer C++ compilers requiring more definitions before use also required the user to know about float and double definitions for the standard math functions in the CppAD namespace; see base_std_math .

The example/ and test_more/ scripts were modified so that one only need specify the test file name (does not also need the test routine name). Some of the test routine declarations were changed from name() to name(void) to make this possible.

The program test_more/test_more was changed to always report the memory leak test results (same as example/example).

The PrintFor function was putting an unused variable in the tape. This has been fixed.

Added the -DRAD_EQ_ALIAS compiler flag to the Sacado speed tests . In addition, compiler flag documentation was included for Sacado and all the other speed tests.

MS project files have been added for running the cppad and double speed tests.

The cppad/config.h file was not compatible with the Windows install procedure and the Windows project's could not find a certain include file. This has been fixed.

The unix install procedure has been modified so that the one configure flag --with-Speed builds all the possible executables related to the speed testing.

Improve the speed_main documentation and output (as well as the title for other sections under speed ).

The subversion copy of the configure script was not executable. This has been fixed.

The instructions for downloading the current version using subversion have changed. The user should now directly edit the file
in order to set the correct date for the installation and to build the corresponding documentation.

The speed section has been slightly reorganized (the main program and utilities have been separated).

Add speed_double for testing the speed of evaluating functions in double as apposed to gradients using AD types.

The instructions for downloading the current version using subversion have changed. The user must now execute the command
	./ version
in order to set the correct version number for her (or his) installation.

Add the return status for all the correctness tests to the documentation; see make test.

The download instructions did not update current version number and this broke the links to the current tarballs. This has been fixed.

The documentation for det_by_minor and det_by_lu has been improved. The order of the elements in det_of_minor has been corrected (they were transposed but this did not really matter because determinants of transposes are equal).

The makefiles in the distribution have been changed so that one can run configure from a directory other than the distribution directory.

A subversion method for downloading CppAD has been added.

The installation was broken on some systems because the configure command tried to run the autoconf and automake programs. This has been fixed by adding AM_MAINTAINER_MODE to the autoconf input file.

Extend the subversion methods to include a full installation and old versions.

The cxx_flags environment variable has been changed from CPP_ERROR_WARN to CXX_FLAGS.

The command configure --help now prints a description of the environment variables ADOLC_DIR, FADBAD_DIR, SACADO_DIR, BOOST_DIR, and CXX_FLAGS. In addition, if the environment variables POSTFIX_DIR or CPP_ERROR_WARN are used, an message is printed saying that are not longer valid.

The correctness checks and speed test wrappers were moved from the individual package directories to speed_main . This way they do not have to be reproduced for each package. This makes it easier to add a new package, but it requires the prototype for compute_test_name to be the same for all packages.

The Sacado package was added to the list of speed tests. In addition, the discussion about how to run each of the speed tests was corrected to include the seed argument.

The postfix_dir option was removed on 2006-12-05 but it was not removed from the configure documentation. This has been fixed.

The routine CheckSimpleVector was changed. It used to require conversion of the form
where i was 0 or 1. This does not work with when Scalar is Sacado::Tay::Taylor<double>. This requirement has been changed (see restrictions ) to support of
x = i
where x has type Scalar and i has type int.

Fix include directives in speed_fadbad programs det_lu, det_minor, and poly, to use FADBAD++ instead of Fadbad++ directory.

Add ADOLC_DIR, FADBAD_DIR, SACADO_DIR, and BOOST_DIR to the configure help string.

Add seed argument and improve speed_main documentation.

Fix the title in adolc_det_lu.cpp . Add the package name to each test case result printed by speed_main .

Added and example using complex calculations for a function that is not complex differentiable (not_complex_ad.cpp ).

Extend the pow function to work for any case where one argument is AD<Base> and the other is double (as do the binary operators).

If the method.step function returned nan (not a number), it was possible for OdeErrControl to drop into an infinite loop. This has been fixed.

Let user detect and handel the case where an ODE initial vector xi contains not a number nan (see Runge45 , Rosen34 , and OdeErrControl ).

Use the || operation instead of | operator in the nan function (The Ginac library seems to use an alias for the type bool and does not have | defined for this alias).

The file test_more/ode_err_control.cpp was using the wrong include file name since the change on 08/07. This has been fixed.

Sometimes an ODE solver takes to large a step and this results in invalid values for the variables being integrated. The ODE solvers Runge45 and Rosen34 have been modified to abort and return nan when it is returned by the differential equation evaluation. The solver OdeErrControl have been modified to try smaller steps when this happens.

Fix an Sequence Constructor referenced to Dependent in documentation (was using the FunDeprecated one argument syntax).

Add comment about mixing debug and non-debug versions of CppAD in TrackDelVec error message.

and CppADCreateUnaryBool have been replaced by CPPAD_BOOL_BINARY and CPPAD_BOOL_UNARY respectively. In addition, the WishList item for conversion of all preprocessor macros to upper case been completed and removed.

The preprocessor macros CppADUsageError and CppADUnknownError have been replaced by CPPAD_ASSERT_KNOWN and CPPAD_ASSERT_UNKNOWN respectively. The meaning for these macros has been included in the cppad_assert section. In addition, the known argument to ErrorHandler was wrong for the unknown case.

The WishList item for conversion of all preprocessor macros to upper case has been changes (to an item that was previous missing).

The preprocessor macro CPPAD_DISCRETE_FUNCTIOIN was defined as a replacement for CppADCreateDiscrete which has been deprecated.

Merge in changes made in branches/test_vector.

Change all occurrences of CppADvector, in the files test_more/*.cpp and speed/*/*.cpp , where changed to CPPAD_TEST_VECTOR. All occurrences of the CppADvector in the documentation were edited to reflect that fact that it has been deprecated. The documentation index and search for deprecated items has been improved.

Deprecate the preprocessor symbol CppADvector and start changing it to CPPAD_TEST_VECTOR .

Change all occurrences of CppADvector, in the example/*.cpp files, to CPPAD_TEST_VECTOR.

The TrackNewDel macros CppADTrackNewVec, CppADTrackDelVec, and CppADTrackExtend have been deprecated. The new macros names to use are CPPAD_TRACK_NEW_VEC, CPPAD_TRACK_DEL_VEC, and CPPAD_TRACK_EXTEND respectively. This item has been removed from the software guidelines section of the wish list.

The member variable software guideline wish list item has be brought up to date.

Minor improvements to the mul_level_adolc_ode.cpp example.

The openmp/ example programs example_a11c.cpp, openmp_newton_example.cpp, and sum_i_inv.cpp have been changed so that they run on more systems (are C++ standard compliant).

The IdenticalEqual function, in the base_require specification, was changed to IdenticalEqualPar (note the warning in the Base requirement specifications).

Implementation of the base requirements for complex types were moved into the base_complex.hpp example.

The download for CppAD was still broken. It turned out that the copyright message was missing from the file base_adolc.hpp and this stopped the creation of the download files. This has been fixed. In addition, the automated testing procedure has been modified so that missing copyright messages and test program failures will be more obvious in the test log.

The download for CppAD has been broken since the example mul_level_adolc_ode.cpp was added because the example/example program was failing. This has been fixed.

A realistic example using Adolc with CppAD mul_level_adolc_ode.cpp was added. The documentation for TrackNewDel was improved.

Add a discussion at the beginning of mul_level_ode.cpp example (and improve the notation used in the example).

Separate the include file base_adolc.hpp from the mul_level_adolc.cpp example so that it can be used by other examples.

Add mul_level_adolc.cpp , an example that demonstrates using adouble and for the Base type.

The get_started.cpp example did not build when the --with-Introduction and BOOST_DIR options were included on the configure command line. In fact, some of the speed tests also had compilation errors when BOOST_DIR was include in the configure command. This has been fixed.

There was a namespace reference missing in the files that could have caused compilation errors in the files speed/cppad/det_minor.cpp and speed/cppad/det_lu.cpp. This has been fixed.

The MS project test_more/test_more.vcproj would not build because the file test_more/fun_check.cpp was missing; this has been fixed. In addition, fix warnings generated by the MS compiler when compiling the test_more/test_more.cpp file.

Add a section defining the Base type requirements . Remove the Base type restrictions from the Faq . Make all the prototype for the default Base types agree with the specifications in the Base type requirements.

Fix the description of the tan function in std_math_ad .

The routine Rosen34 ( Runge45 ) had a division of a size_t ( int ) by a Scalar , where Scalar was any NumericType . Such an operation may not be valid for a particular numeric type. This has been fixed by explicitly converting the size_t to an int, then converting the int to a Scalar , and then preforming the division. (The conversion of an int to any numeric type must be valid.)

If the Base type is not double, the computed assignment operators did not always allow for double operands. For example, if x had type AD< AD<double> >
x += .5;
would slice the value .5 to an int and then convert it to an AD< AD<double> >. This has been fixed.

This slicing has also been fixed in the assignment operation. In addition, the assignment and copy operations have been grouped together in the documentation; see ad_ctor and ad_assign .

Document usage of double with binary arithmetic operators, and combine all those operators into one section (ad_binary ).

The documentation for all the computed assignment operators has been grouped together. In addition, a computed assignment wish list item has been added (it was completed and removed with the 05-26 update.)

Suppose that op is a binary operation and we have
left op right
where one of the operands was AD< AD<double> > and the other operand was double. There was a bug in this case that caused the double operand to be converted to int before being converted to AD< AD<double> >. This has been fixed.

The Microsoft examples and testing project file example/example.vcproj was missing a reference to the source code file example/reverse_two.cpp. This has been fixed.

Reverse mode does not work with the pow function when the base is less than or equal zero and the exponent is an integer. For this reason, the pow_int function is no longer deprecated (and is used by CppAD when the exponent has type int).

Third and fourth order derivatives were included in the routine test_more/sqrt.cpp that tests square roots.

The return value descriptions were improved for the introduction examples: exp_2_for1 , exp_2_for2 , exp_eps_for1 , and exp_eps_for2 .

The summation index in SqrtReverse was changed from  k to  \ell to make partial differentiation with respect to  z^{(k)} easier to understand. In addition, a sign error was corrected near the end of SqrtReverse .

The dimension for the notation  X in reverse_identity was corrected.

The word mega was added to the spelling exception list for openmp/

Improve connection from reverse_identity theorem to reverse_any calculations.

Improve the openmp/ script. It now runs all the test cases at once in addition to including multiple number of thread cases for each test.

Add the sum_i_inv_time.cpp OpenMP example case.

There was a typo in the second order discussion (found by Kipp Martin). It has been fixed.

Add a paragraph to reverse_identity explaining how it relates to reverse_any calculations. Add description of first and second order results in reverse_any .

Simplify the Reverse mode documentation by creating a separate reverse_two section for second order reverse, making major changes to the description in reverse_any , and creating a third order example reverse_any.cpp for reverse mode calculations.

Improve the reverse_identity proof.

Merge in changes made in branches/intro.

Add exp_eps_rev2 and its verification routine exp_eps_rev2.cpp .

Finished off exp_2_rev2 and added exp_2_rev2.cpp which verifies its calculations. Added second order calculations to exp_2_cppad . Added exp_eps_for2 and its verification routine.

Added a preliminary version of exp_2_rev2 (does not yet have verification or exercises).

Fixed a problem with the Microsoft Visual Studio project file introduction/exp_apx/exp_apx.vcproj (it did not track the file name changes of the form exp_apx/exp_2_for to exp_apx/exp_2_for1 on 04-05).

Added exp_2_for2 to introduction.

Use order expansions in introduction; e.g., the second order expansion for the exp_2 example.

Merge in changes made in branches/intro and remove the corresponding Introduction item from the wish list:

Create the a simpler exponential approximation in the introduction called exp_2 which has a different program variable for each variable in the operation sequence.

Simplify the exp_eps approximation using the  v_1 , \ldots , v_7 notation so that variables directly correspond to index in operation sequence (as with the exp_2 example).

The Microsoft project file introduction/exp_apx/exp_apx.vcproj was referencing exp_apx_ad.cpp which no longer exists. It has been changed to reference exp_apx_cppad.cpp which is the new name for that file.

Fixed entries in this file where the year was mistakenly used for the month. To be more specific, 07-dd was changed to 03-dd for some of the entries directly below.

Corrected some places where CppAD was used in stead of Adolc in the adolc_poly.cpp documentation.

Added an Introduction and Tracing entry to the wish list. (The Introduction item was completed on 03-31 .)

Example A.1.1c, example_a11c.cpp, from the OpenMP 2.5 standards document, was added to the tests that can be run using openmp/

Included the changes from openmp branch so that so CppAD does not use the OpenMP threadprivate command (some systems do not support this command).

Add command line arguments to openmp_newton_example.cpp, and modified openmp/ to allow for more flexible testing.

Fixed some Microsoft compiler warnings by explicitly converting from size_t to int.

In the Microsoft compiler case, the cppad/config.h file had the wrong setting of GETTIMEOFDAY. The setting is now overridden (and always false) when the _MSC_VER preprocessor symbol is defined.

Some minor changes were made in an effort to speed up the multi-threading case.

Started a new openmp branch and created a version of CppAD that does not use the OpenMP threadprivate command (not supported on some systems).

Included the changes from openmp branch so that OpenMP can be used with CppAD, see omp_max_thread . The changes dated between 02-15 and 03-28 below were made in the openmp branch and transferred to the trunk on 03-09.

The conditional include commands were missing on some include files; for example
was missing at the beginning of the BenderQuad include file. This has been fixed.

The speed_test routines timing was changed to use gettimeofday if it is available. (gettimeofday measures wall clock time which is better in a multi-threading environment).

Added the user multi-threading interface omp_max_thread along with its examples which are distributed in the directory openmp.

The speed/*.hpp files have been moved to cppad/speed/*.hpp and the corresponding wish list item has been removed.

The multiple tapes with the same base type wish list item have been removed (it's purpose was multi-threading which has been implemented).

The speed include files are currently being distributed above the cppad include directory. A fix this wish list item has been added.

Multiple active tapes required a lot of multi-threading access management for the tapes. This was made simpler (and faster) by having at most one tape per thread.

The include command in the speed_test documentation was
	# include <speed/speed_test.hpp>
but it should have been
	# include <cppad/speed_test.hpp>
This has been fixed.

An entry about optimizing the operation sequence in an ADFun object was added.

Change the argument syntax for Dependent and deprecate the old Dependent syntax .

Added VecAD<Base> as a valid argument type for the Parameter and Variable functions. In addition, size_t indexing is was extended to be allowed during taping so long as the VecAD object is a parameter.

Fixed the example/ script (it was using its old name one_test).

The BenderQuad documentation was improved by adding the fact that the x and y arguments to the f.dy member function are equal to the x and y arguments to BenderQuad. Hence values depending on them can be stored as private objects in f and need not be recalculated.

The method for distributing the documentation needed to be changed in the top level in order to be compatible with automake version 1.10.

The change on 02-01 had a new, saved as a static pointer, with no corresponding delete. This was not a bug, but it has been changed to avoid an error message when using CppAD with valgrind .

The change to the pow function on 06-12-10 did not include the necessary changes to the Sparsity calculations. This has been fixed.

Fix minor errors and improve profiling documentation. Also change the problem sizes used for the speed tests.

There seems to be a bug in the cygwin version of g++ version 3.4.4 with the -O2 flag whereby some static variables in static member functions sometimes do not get constructed before being used. This has been avoided by using a static pointer and the new operator in cppad/local/ad.hpp.

The copyright message was missing from some of the distribution files for some new files added on 06-12-15 . This resulted in the tarballs *.tgz and *.zip not existing for a period of time. The automated tests have been extended so that this should not happen again.
Input File: omh/whats_new/whats_new_07.omh