Prev Next whats_new_11

@(@\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 2011

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

12-30
  1. There was a bug when using abs with an AD< AD<double> > argument, whereby the corresponding AD<double> operation sequence depended on the value of the argument to the abs function.
  2. Change the specifications for the derivative of the abs function to be the sign function instead of a directional derivative.
  3. Add the sign function to the AD<Base> list of available functions. In addition, add the sign function to the list of base type requirements .


12-28
The file time_test.hpp was not being included by cppad/cppad.hpp. This has been fixed.

12-21
The types SizeVector, NumberVector, ADNumber, and ADVector, were in the global namespace and this was causing warnings about the shadowing of these declarations. The cppad_ipopt namespace was created to avoid these problems. The simplest way to make old cppad_ipopt_nlp code work with this change is to use the command
 
     using namespace cppad_ipopt;

12-20
  1. Change team_start to team_create and team_stop to team_destroy .
  2. Change NDEBUG mentions to include link to NDEBUG .
  3. Improve memory_leak documentation.


11-29
THe time_test routine was still executing the test at least twice, even if that was not necessary for the specified minimum time. This has been fixed.

11-27
Move multi_thread.cpp to thread_test.cpp and fix its running instructions.

11-24
Create preprocessor section with pointers to all the preprocessor symbols that are in the CppAD API.

11-21
Separate --with-boostvector for boost_dir . This enables one to specify boost_dir for team_bthread.cpp with out using boost vectors.

11-20
  1. Move sum_i_inv.cpp to harmonic.cpp .
  2. Include the date, time, CppAD version, and team_name in the thread_test.cpp output.


11-18
  1. The thread_test.cpp program was truncating test_time to the nearest integer. This has been fixed.
  2. The time_test routine has been made more efficient and now check for the case where only one execution of the test is necessary to achieve the desired test_time (it used to always run at least two).
  3. The sum_i_inv_time.cpp and multi_newton.cpp routines were calling the test an extra time at the end to check for correctness. The results of the last test are now cached and used for the correctness test so that an extra call is not necessary (to make the tests run faster when only a few repetitions are necessary).


11-17
  1. Create another speed testing routine time_test which is like speed_test but it returns the time instead of rate and as a double instead of a size_t. The use it for the timing tests in sum_i_inv_time.cpp and multi_newton_time .
  2. Add test_time as a command line argument to the multi-threading sum_i_inv and multi_newton timing tests.


11-09
Change thread_team.hpp to team_thread.hpp and do the same for all other names that ended in _team; e.g., team_openmp.cpp .

11-07
The users choice for test_vector was not actually changing the tests that the user ran. This have been fixed.

11-06
Make all the output generated by multi_newton.cpp valid matlab and octave input so it is easy to plot the results.

11-04
Use thread specific data to simplify team_openmp.cpp .

11-01
Make team_bthread.cpp more similar to team_pthread.cpp .

10-30
  1. Reorganize and improve the multi_thread section and its subsections.
  2. There was a bug in multi_newton.cpp that only showed up when the number of threads was greater than or equal 4. This has been fixed. In addition, CPPAD_MAX_NUM_THREADS was increased from 2 to 4 (to enable testing for this bug).
  3. The accuracy expected in the sum_i_inv.cpp results were failing when mega_sum was large. This check has been modified to include a correction for mega_sum .


10-29
The following changes were merged in from branches/thread:
  1. Move openmp to example/multi_thread/openmp. and create example/multi_thread/bthread, multi_thread/pthread with similar tests.
  2. Put multi-threading common code in multi_thread directory and threading system specific code in example/multi_thread/threading for threading equal to openmp, bthread, and pthread.
  3. Update the README file.
  4. Remove the bug/optimize.sh file (no longer a bug).
  5. Make arc_tan.cpp utility that can be used by multiple multi-threading tests.
  6. Create team_thread.hpp specifications, move OpenMP management to team_openmp.cpp , Boost thread management to team_bthread.cpp , and pthread management to team_pthread.cpp .
  7. All of the make files were modified so that the command
     
         make test
    
    would run the tests for the current directory.
  8. Extend the multi-threading speed tests sum_i_inv.cpp and multi_newton.cpp so they run using Boost threads and pthreads (as well as OpenMP threads).


10-14
Fix some compiler warnings about shadowed variables that were detected by g++ version 4.6.1 20110908.

10-12
  1. The MAC version of the pthread library does not include the pthread_barrier_wait function; i.e., is not compliant with the IEEE Std 1003.1, 2004 Edition for pthread. This caused the pthread_simple_ad.cpp to fail to compile on the MAC. This has been fixed by not compiling the pthread examples unless pthread_barrier_wait is present.
  2. The cppad_ipopt_nlp routine has been changed to optimize the functions @(@ r_k (u) @)@ such that retape(k) is false.


09-06
  1. Add the boost multi-threading examples a11c_bthread.cpp and bthread_simple_ad.cpp.
  2. Improve documentation for thread_num argument to parallel_setup.
  3. More simplification of bthread_simple_ad.cpp example.


09-05
Simply and fix some problems with pthread_simple_ad.cpp, including avoiding a Bug in Cygwin .

09-02
  1. The OpenMP speed test program openmp/run.cpp was not setting the number of threads for the one thread case (so dynamic thread adjustment was used). This has been fixed.
  2. The thread_alloc.cpp example was missing from the Microsoft example/example.vcproj file and a attempt was made to link to missing OpenMP routines (this has been fixed). In addition, some Microsoft compiler warning have been fixed; see the examples and tests in the Windows install instructions.
  3. There was an oversight, and CPPAD_MAX_NUM_THREAD was being set to 2 when _OPENMP was not defined. This has been fixed and CPPAD_MAX_NUM_THREADS has been documented and is now part of the CppAD API.
  4. The pthread_simple_ad.cpp test failed under cygwin. This was because the previous test openmp_ad.cpp was set up calls to OpenMP routines that were still in effect when pthread/simple_ad ran. This has been fixed by making num_threads == 1 a special case in parallel_setup .


09-01
  1. Modify the CppAD trunk using the changes from svn revision 2060 to revision 2081 in the branch
     
         https://projects.coin-or.org/svn/CppAD/branches/pthread
    
    These changes are described below under the headings 08-21 through 08-31 .
  2. There was a bug in the old_atomic functions in the case where none of the elements of the argument to the function was a variable . This has been fixed. In addition, old_tan.cpp generated an assert for this case and this has also been fixed (in addition to including an example for this case).


08-31
  1. Move the sum_i_inv_time.cpp test from openmp/run.sh to openmp/run.cpp.
  2. Change --with-openmp to OPENMP_FLAGS=openmp_flags configure command line argument.


08-30
  1. Create the openmp/run.cpp program and move the openmp_multi_newton.cpp test from openmp/run.sh to openmp/run.cpp. This uses configure information for building the tests.
  2. Document the --with-openmp configure command line argument.
  3. Move openmp/multi_newton.hpp to openmp/newton_method.hpp and openmp/multi_newton.cpp to openmp/newton_example.cpp.


08-25
  1. Replace omp_alloc by thread_alloc in multi_thread , the section on how to use CppAD in parallel.
  2. Implement omp_alloc as links to corresponding thread_alloc sections.
  3. Create the pthread_simple_ad.cpp example that does AD using the pthread library. In addition, fix some problems in openmp_simple_ad.cpp
  4. Move openmp/example_a11c.cpp to example/a11c_openmp.cpp .
  5. Move openmp/parallel_ad.cpp to openmp_simple_ad.cpp.


08-23
Beginning steps in replacing omp_alloc by thread_alloc :
  1. Replace omp_alloc by thread_alloc in the utilities .
  2. move omp_alloc to the deprecated section of the documentation.
  3. Change all omp_alloc section names to begin with omp_, and change all thread_alloc section names to begin with new_.
  4. Convert CppAD_vector from using omp_alloc to using thread_alloc for memory allocation.
  5. Extend the memory_leak routine to also check the thread_alloc allocator.


08-21
Create the OpenMP and pthread examples a11c_openmp.cpp , a11c_pthread.cpp , and openmp_simple_ad.cpp. These OpenMP examples were originally in the openmp directory, and have been moved, and modified to conform, to the normal example directory.

08-11
Modify the CppAD trunk using the changes from svn revision 2044 to revision 2056 in the branch
 
     https://projects.coin-or.org/svn/CppAD/branches/base_require
These changes are described below under the headings 08-04 through 08-10 .

08-10
  1. Add the output stream optional argument s in
         
    f.Forward(0, xs)
    See zero order forward mode and PrintFor .
  2. Improve omp_alloc.cpp example.


08-09
  1. base_require : Add epsilon to the Base type requirements.
  2. Extend epsilon to AD types.


08-08
  1. Improve the base_require documentation for standard math functions .
  2. base_require : Add abs_geq to the requirements for a user defined Base type.
  3. Check that zero order forward mode results are approximately equal, instead of exactly equal, after an optimize operation. This fixes a bug in the optimize correctness check (The order of operations can be changed by optimize and hence the zero order forward mode results may not be exactly the same.)


08-07
Improve the base_require documentation for EqualOpSeq , Identical Integer , and Ordered operations.

08-06
Add the CondExpRel paragraph to the base requirements documentation. This was missing and are required for CondExp to work with AD<Base> arguments and a non-standard Base type.

08-04
  1. base_require : Change the include file name to base_require.hpp .
  2. Use base_float.hpp and base_double.hpp as additional examples for the CondExp Base requirements requirements.


08-03
Change PrintFor condition from less than or equal zero to not greater than zero;i.e., not positive. This makes nan print because it results in false for all comparisons.

08-02
  1. Change PrintFor so it no longer aborts execution when there is no operation sequence being recording; see start recording .
  2. Improve the print_for_cout.cpp example.


07-31
Add a conditional version of the PrintFor command
     PrintFor(
textyz)
which only prints when z <= 0 . This is useful for error reporting during forward mode; i.e., reporting when the argument to the log function is not valid.

07-29
  1. The routines set_max_num_threads and get_max_num_threads were created. User's will need to replace calls to max_num_threads by calls to set_max_num_threads.
  2. The functions omp_efficient was deprecated because it has not been shown to be useful.


07-28
  1. Change omp_return_memory so that if omp_max_num_threads is one (the default), omp_alloc does not hold onto memory (keep it available for the corresponding thread).
  2. Add files that were missing from the Microsoft Visual Studio example and test_more subdirectory project files.
  3. Fix some warnings generated by Microsoft Visual Studio 2010 build.


07-27
Make tan and tanh atomic operations; see tan_forward and tan_reverse .

07-25
Finish the old_atomic example old_tan.cpp . This is also a design and implementation of the routines necessary to make tan and tanh CppAD atomic operations.

07-18
The reverse mode formulas for @(@ Z(t) @)@ need to involve the lower order Taylor coefficients for @(@ Y(t) @)@. This has been fixed in tan_reverse .

07-17
  1. Fix bug in old_atomic functions. To be specific, the Taylor coefficients for @(@ y @)@, of order less than k , were not passed into the old_atomic forward callback function.
  2. Derive the theory for including the tangent and hyperbolic tangent as CppAD atomic operations tan_forward and tan_reverse ; see the wish list item Tan and Tanh.
  3. Implement and test forward mode calculation of derivative for the tangent and hyperbolic tangent functions; see the new old_atomic example old_tan.cpp .


07-14
  1. The autotools instructions for running the individual correctness and speed tests were out of date. This has been fixed; see example and tests .
  2. Move parallel_ad.cpp from example directory to openmp directory (and convert it from a function to a program).
  3. Simplify example_a11c.cpp by making it just a correctness test.
  4. Change openmp/run.sh so that it runs correctness tests with the compiler debugging flags.


07-13
  1. static hash code data that was begin used by multiple threads when recording AD<Base> operations omp_in_parallel execution mode. This has been fixed.
  2. Make the sparse calculations safe for use during omp_in_parallel execution mode.
  3. Add the parallel_ad.cpp example.
  4. Change example_a11c.cpp example so that is just a correctness (not speed) test.


07-11
  1. Change the upper limit for omp_max_num_threads from 32 to 48.
  2. Add parallel documentation for, nan, Rosen34 , and Runge45 .
  3. Fix CheckNumericType and CheckSimpleVector so they work properly when used in parallel mode.


openmp/run.sh
The following changes were made to openmp/run.sh:
  1. Change to openmp/run.sh maximum number of threads instead of specifying the entire set of values to be tested.
  2. Change settings for newton_example so that n_gird is a multiple of the maximum number of threads.
  3. Report dynamic number of thread results as a separate result in the summary output line.
  4. Fix automatic removal of executables from openmp directory (was commented out).
  5. The documentation for openmp/run.sh was moved to the multi_thread section.


07-10
  1. Add link to Discrete AD Functions in multi_thread .
  2. Make use of the TrackNewDel routines omp_in_parallel execution mode an error (it never worked properly); see TrackNewDel multi-threading .
  3. Change memory_leak so that it checks for a leak in all threads. This is what openmp_newton_example.cpp and sum_i_inv_time.cpp assumed was being done.


07-09
All the OpenMP parallel execution requirements have been grouped in the section multi_thread .

07-07
Add the routine parallel_ad to fix bug when using AD<Base> in parallel execution mode.

06-23
  1. Fix a bug whereby the assert
         Error detected by false result for
              ! omp_in_parallel()
         at line 
    n in the file
         
    prefix/include/cppad/omp_alloc.hpp
    sometimes occurred.
  2. The routine omp_max_thread was deprecated, use the routine omp_max_num_threads instead.
  3. The deprecated routines have been grouped together in the deprecated section of the CppAD manual.


06-21
  1. The openmp/run.sh routine was changed to use zero, instead of automatic, for automatic choice of openmp/run.sh number of repeats and maximum number of threads.
  2. The output of each of the OpenMP examples / speed tests (run by openmp/run.sh) was changed to be valid matlab / octave assignment statements.
  3. In the case where OpenMP is enabled during compilation, a summary for the different number of threads as added at the end of the openmp/run.sh output.


06-18
  1. The tape_addr_type option was added to the configure command line.
  2. The function size_op_seq results uses sizeof(CppAD_TAPE_ADDR_TYPE) where it used to use sizeof(size_t).
  3. Remove cppad/config.h from CppAD distribution, (put the information in cppad/configure.hpp.) This removes the need to undefine symbols that were defined by cppad/config.h and that did not begin with CPPAD_.
  4. Change adolc library linkage so it works with version ADOL-C-2.2.0.


05-29
Fix bug (introduced on 05-22 ) whereby constructor might not be called (but required) when the base type is not plain old data.

05-28
  1. Add the omp_efficient routine to the omp_alloc system.
  2. Improve the omp_alloc tracing so it prints the same pointer as returned to the user (not an offset version of that pointer).


05-26
Fix Visual Studio project files that were broken during the change on 05-22. In addition, in the file cppad/omp_alloc.hpp, suppress the following Microsoft Visual Studio warning
 
     warning C4345: behavior change: an object of POD type constructed with
     an initializer of the form () will be default-initialized

05-22
  1. The old memory tracking routines TrackNewDel have been deprecated. Their use should be replaced using the omp_alloc a memory allocator which is designed to work well in a multi-threading OpenMP environment; see purpose .
  2. The replacement of TrackNewDel by omp_alloc has been throughout the CppAD source code, including the examples that used TrackNewDel; namely, mul_level_adolc.cpp , mul_level_adolc_ode.cpp .
  3. The CppAD vector template class and the vectorBool class were modified to use the omp_alloc memory manager. This should improves its speed of memory allocation omp_in_parallel sections of a program.
  4. The speed_test argument size_vec call was by value, instead of by reference (as documented). This has been fixed and the call is now by reference.
  5. The capacity function has been added to the CppAD vector class.
  6. The simple vector element constructor and destructor description has been changed to explicitly specify that the default constructor is used to initialize elements of the array.
  7. The size_op_seq documentation has been improved to mention that the allocated memory may be larger.


05-11
  1. Avoid ambiguity in the definition of the complex isnan function.
  2. Errors during make test were not being detected. This has been fixed.


05-03
  1. If NDEBUG is not defined, the hasnan function is used to make sure that the results of any Forward operation does not contain a nan (not a number). If so, an error message is generated and the program terminates. This error message and termination can be caught; see ErrorHandler .
  2. In the event that the cppad_ipopt_nlp objective function, the constraints, or their derivatives are infinite, an error message is generated and the program terminates (proved that NDEBUG is not defined and the default error handler has not been replaced).


04-29
  1. The Microsoft Visual Studio 2003 project files for the Windows examples and tests no longer worked because the current version of CppAD uses local types in template instantiation; see Compiler Error C2918 . These project files were converted to Visual Studio 2008 where they do work (if you use a later version, Visual Studio should automatically convert them for you).
  2. The old speed test directory was moved to speed_cppad before the new speed test organization was created on 2006-12-11 (revision 715 of the repository). The old speed tests have not been used for years and so have been deleted.


04-20
The openmp/run.sh script what changed to take an argument that specifies which tests is run (it no longer runs all the tests). Also improve the openmp test program output formatting.

04-19
The use_ad option was added to the openmp_newton_example.cpp test case.

03-19
The subversion write protected directory bin/.svn was mistakenly part of the compressed tar file . It has been removed.

03-11
The vector of sets argument r to the old_atomic function rev_hes_sparse must have size greater than or equal to n . There was a check that its size was greater than or equal q . This was incorrect and has been fixed.

03-05
Add the conjugate gradient example.

02-22
Add the atomic option to the speed test program and use old_mat_mul.hpp during the cppad_mat_mul.cpp speed test when the atomic option is specified.

02-19
There was a bug when omp_max_thread was set to one, and NDEBUG was not defined, the thread corresponding to parameters was one, but the only valid thread number was zero (only one thread) and an CPPAD stopped with an assertion error. This has been fixed.

02-17
There was a mistake in openmp/run.sh where it attempted to remove a non-existent file in the case where openmp/run.sh openmp_flag was not "". This has been fixed.

02-15
A matrix multiply speed test has been added. So far, this has only implemented for the cppad and double cases. (For the time being this test is not available for the other speed comparison cases.)

02-09
A variable in old_atomic.hpp was declare of type Base when it should have been declared of type size_t. It caused the old_atomic feature to fail with some base types. This has been fixed.

The old_mat_mul.hpp example has been improved by caching the @(@ x @)@ variable information and using it during reverse Hessian sparsity calculations.

Some of the old_atomic documentation was extended to include more explanation.

02-06
The use can now define complex atomic operations and store them in a CppAD ADFun object. This item has been remove from the wish list .

The documentation for RevSparseHes had a dimension error. This has been fixed.

A faster set operations item was added to the wish list. This has since been satisfied by cppad_sparse_list choice during the install process (since removed).

02-02
The documentation for ForSparseJac had some formatting errors. The errors have been fix and the documentation has been improved.

02-01
The subversion install instructions were brought up to date. They have since been replaced by just separate subversion instructions.

01-19
The directory where the pkgconfig file cppad.pc is stored has been moved from prefixdir/lib/pkgconfig/cppad.pc to prefixdir/share/pkgconfig/cppad.pc ; see devel@lists.fedoraproject.org .

01-16
The following have been fixed:
  1. The install of the documentation failed when it was done from a directory other than the top source directory.
  2. The GPL distribution had the output of the configure command in it.
  3. Since the change on 01-09, the file omh/appendix/whats_new_11.omh has been required to build the documentation (and it has been missing from the distribution).
  4. Fadbad was generating warnings due to the -Wshadow flag with the g++ compiler. The Fadbad speed tests have a special flag with this warning removed from the cxx_flags .


01-09
There were some problems running make test in the releases
http://www.coin-or.org/download/source/CppAD/cppad-20110101.0.
license.tgz
where license is gpl or cpl.
  1. The version of automake used to build the corresponding makefile.in files did not define abs_top_builddir.
  2. The include file cppad_ipopt_nlp.hpp was always installed, even if ipopt_dir was not defined on the configure command line.
  3. The speed test library libspeed.a was being installed (it is only intended for testing).
These problems are fixed in the trunk and these fixes will be copied to the corresponding stable and release versions; i.e.,
http://www.coin-or.org/download/source/CppAD/cppad-20110101.1.
license.tgz
will not have this problem.
Input File: omh/appendix/whats_new/whats_new_11.omh