Changeset 1613


Ignore:
Timestamp:
Dec 23, 2009 1:33:11 AM (11 years ago)
Author:
bradbell
Message:

trunk: Update makefile.in and fixes for g++ 4.4.2.

build.sh: move checking doxygen version into check_doxygen.sh.
ad_in_c.cpp: reference printf throught standard namespace.
optimize.cpp: add missing doxygen description of structure.
csum_op.cpp: remove mistake \ in doxygen documentation.

Special changes to avoid warnings with g++ 4.4.2.


mul_level_adolc.cpp, ode_taylor.cpp, ode_taylor_adolc.cpp, base_adolc.cpp,

Transfer changes from makefile.am to makefile.in in directories:


example, test_more, introduciton/exp_apx get_started, ./,
speed/adolc, speed/cppad, speed/sacado, speed/profile, speed/fadbad,
speed/double

Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.sh

    r1592 r1613  
    115115fi
    116116# ============================================================================
    117 # check of doxygen version is >= 1.5.7.1 and set doxygen_ver_ok = "0" or "1"
    118 doxygen_ver=`doxygen --version | sed -e 's/\([^.]*\)\./\1*100 +/'`
    119 doxygen_ver=`echo $doxygen_ver     | sed -e 's/\([^.]*\)\./(\1)*100 +/'`
    120 doxygen_ver=`echo $doxygen_ver     | sed -e 's/\([^.]*\)\./(\1)*100 +/'`
    121 doxygen_ver=$((doxygen_ver))
    122 doxygen_ver_ok=$((doxygen_ver >= 1050700))
    123 #
    124117# Default values used for arguments to configure during this script.
    125118# These defaults are development system dependent and can be changed.
    126 BOOST_DIR=/usr/include/boost-1_33_1
     119BOOST_DIR=/usr/include
    127120ADOLC_DIR=$HOME/prefix/adolc
    128121FADBAD_DIR=$HOME/prefix/fadbad
     
    460453        if ! ./check_doxygen.sh
    461454        then
    462                 if [ "$doxygen_ver_ok" == 1 ]
    463                 then
    464                         dir=`pwd`
    465                         file="$dir/doxygen.log"
    466                         echo "Error: check_doxygen.sh failed; see $file."
    467                         exit 1
    468                 fi
     455                dir=`pwd`
     456                file="$dir/doxygen.log"
     457                echo "Error: check_doxygen.sh failed; see $file."
     458                exit 1
    469459        fi
    470460        #
     
    627617        if ! ./check_doxygen.sh
    628618        then
    629                 if [ "$doxygen_ver_ok" == 1 ]
    630                 then
    631                         dir=`pwd`
    632                         file="$dir/doxygen.log"
    633                         echo "Error: check_doxygen.sh failed; see $file."
    634                         exit 1
    635                 fi
    636                 msg="Warning: doxygen version is too old to check for warnings"
     619                dir=`pwd`
     620                file="$dir/doxygen.log"
     621                echo "Error: check_doxygen.sh failed; see $file."
     622                exit 1
    637623        else
    638624                msg="OK: doxygen doxyfile"
  • trunk/check_doxygen.sh

    r1612 r1613  
    1313doxygen_version=`doxygen --version  | sed -e 's|\.|*100+|' -e's|\.|*10+|'`
    1414let doxygen_version=$doxygen_version
     15if (( $doxygen_version <= 155 ))
     16then
     17        doxygen_version=`doxygen --version`
     18        echo "doxygen version $doxygen_version is less than 1.5.6."
     19        echo "Hence it is to old to check for warnings or errors."
     20        exit 0
     21fi
    1522#
    1623# classes that have been completely documented
     
    8188        then
    8289                echo "Unexpected doxygen error or warning for $file."
    83                 if (( $doxygen_version > 155 ))
    84                 then
    85                         exit 1
    86                 else
    87                         exit 0
    88                 fi
     90                exit 1
    8991        fi
    9092done
     
    9597        then
    9698                echo "Unexpected doxygen error or warning for $file."
    97                 if (( $doxygen_version > 155 ))
    98                 then
    99                         exit 1
    100                 else
    101                         exit 0
    102                 fi
     99                exit 1
    103100        fi
    104101done
     
    114111        then
    115112                echo "Unexpected doxygen error or warning for $file."
    116                 if (( $doxygen_version > 155 ))
    117                 then
    118                         exit 1
    119                 else
    120                         exit 0
    121                 fi
     113                exit 1
    122114        fi
    123115done
  • trunk/cppad/local/csum_op.hpp

    r1612 r1613  
    4848\c m.
    4949\n
    50 <tt>\parameter[ arg[2] ]</tt>
     50<tt>parameter[ arg[2] ]</tt>
    5151is the parameter value \c p in this cummunative summation.
    5252\n
     
    156156\c m.
    157157\n
    158 <tt>\parameter[ arg[2] ]</tt>
     158<tt>parameter[ arg[2] ]</tt>
    159159is the parameter value \c p in this cummunative summation.
    160160\n
     
    262262\c m.
    263263\n
    264 <tt>\parameter[ arg[2] ]</tt>
     264<tt>parameter[ arg[2] ]</tt>
    265265is the parameter value \c p in this cummunative summation.
    266266\n
     
    340340\c m.
    341341\n
    342 <tt>\parameter[ arg[2] ]</tt>
     342<tt>parameter[ arg[2] ]</tt>
    343343is the parameter value \c p in this cummunative summation.
    344344\n
     
    416416\c m.
    417417\n
    418 <tt>\parameter[ arg[2] ]</tt>
     418<tt>parameter[ arg[2] ]</tt>
    419419is the parameter value \c p in this cummunative summation.
    420420\n
  • trunk/cppad/local/optimize.hpp

    r1612 r1613  
    197197        bool                add;
    198198};
     199
     200/*!
     201Structure used to pass work space from \c optimize to \c optimize_record_csum
     202(so that stacks do not start from zero size every time).
     203*/
    199204struct optimize_csum_stacks {
    200205        /// stack of operations in the cummulative summation
  • trunk/example/ad_in_c.cpp

    r1503 r1613  
    3636*/
    3737// BEGIN PROGRAM
     38# include <cstdio>
    3839# include <cppad/cppad.hpp>
    3940# include <list>
     
    4243
    4344void debug_print(const char *label, double d)
    44 {       unsigned char *byte = reinterpret_cast<unsigned char *>(&d);
     45{       using std::printf;
     46
     47        unsigned char *byte = reinterpret_cast<unsigned char *>(&d);
    4548        size_t n_byte = sizeof(d);
    4649        printf("%s", label);
  • trunk/example/makefile.in

    r1565 r1613  
    162162CYGPATH_W = @CYGPATH_W@
    163163
    164 # $Id: makefile.am 1561 2009-10-24 15:46:25Z bradbell $
     164# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    165165# -----------------------------------------------------------------------------
    166166# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    281281        $(ADOLC_EXTRA_FILES)
    282282
    283 @CppAD_MS_COMPILER_FALSE@AM_CXXFLAGS = -g $(CXX_FLAGS) $(ADOLC_FLAGS)
    284 #
    285 @CppAD_MS_COMPILER_TRUE@AM_CXXFLAGS = -EHsc -g $(CXX_FLAGS) $(ADOLC_FLAGS)
     283@CppAD_MS_COMPILER_FALSE@AM_CXXFLAGS = -g $(ADOLC_FLAGS) $(CXX_FLAGS)
     284#
     285@CppAD_MS_COMPILER_TRUE@AM_CXXFLAGS = -EHsc -g $(ADOLC_FLAGS) $(CXX_FLAGS)
    286286#
    287287AM_CPPFLAGS = -I. \
  • trunk/example/mul_level_adolc.cpp

    r1370 r1613  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-08 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    153153        // compute the d/dx of f'(x) * v = f''(x) * v
    154154        size_t m      = n;                     // # dependent in f'(x)
    155         double *v, *ddf_v;
     155        double *v = 0, *ddf_v = 0;
    156156        v     = CPPAD_TRACK_NEW_VEC(m, v);     // track v = new double[m]
    157157        ddf_v = CPPAD_TRACK_NEW_VEC(n, ddf_v); // track ddf_v = new double[n]
  • trunk/example/ode_taylor.cpp

    r1370 r1613  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-07 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    298298
    299299        // evaluate the Jacobian of h at a
    300         CPPAD_TEST_VECTOR<double> jac = f.Jacobian(x);
     300        CPPAD_TEST_VECTOR<double> jac ( f.Jacobian(x) );
     301        // There appears to be a bug in g++ version 4.4.2 becasue it generates
     302        // a warning for the equivalent form
     303        // CPPAD_TEST_VECTOR<double> jac = f.Jacobian(x);
    301304
    302305        // check Jacobian
  • trunk/example/ode_taylor_adolc.cpp

    r1370 r1613  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-08 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    296296
    297297        // parameter vector in both double and ADdouble
    298         double *x;
     298        double *x = 0;
    299299        x = CPPAD_TRACK_NEW_VEC(n, x);  // track x = new double[n];
    300300        CPPAD_TEST_VECTOR<ADdouble> X(n);
     
    325325        // declare the differentiable fucntion f : A -> Y_FINAL
    326326        // (corresponding to the tape of adouble operations)
    327         double *y_final;
     327        double *y_final= 0;
    328328        y_final = CPPAD_TRACK_NEW_VEC(n, y_final); // y_final= new double[m]
    329329        for(i = 0; i < n; i++)
     
    340340
    341341        // memory where Jacobian will be returned
    342         double *jac_;
     342        double *jac_= 0;
    343343        jac_ = CPPAD_TRACK_NEW_VEC(n * n, jac_); // jac_ = new double[n*n]
    344         double **jac;
     344        double **jac = 0;
    345345        jac  = CPPAD_TRACK_NEW_VEC(n, jac);      // jac = new (*double)[n]
    346346        for(i = 0; i < n; i++)
  • trunk/introduction/exp_apx/makefile.in

    r1401 r1613  
    9191CYGPATH_W = @CYGPATH_W@
    9292
    93 # $Id: makefile.am 1369 2009-05-31 01:31:48Z bradbell $
     93# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    9494# -----------------------------------------------------------------------------
    95 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-07 Bradley M. Bell
     95# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
    9696#
    9797# CppAD is distributed under multiple licenses. This distribution is under
     
    202202#
    203203AM_CPPFLAGS = -I. -I$(top_srcdir) $(BOOST_INCLUDE)
    204 AM_CXXFLAGS = -g $(CPP_ERROR_WARN)
     204AM_CXXFLAGS = -g $(CXX_FLAGS)
    205205#
    206206exp_apx_SOURCES = \
  • trunk/introduction/get_started/makefile.in

    r1401 r1613  
    8181CYGPATH_W = @CYGPATH_W@
    8282
    83 # $Id: makefile.am 1369 2009-05-31 01:31:48Z bradbell $
     83# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    8484# -----------------------------------------------------------------------------
    85 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-07 Bradley M. Bell
     85# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
    8686#
    8787# CppAD is distributed under multiple licenses. This distribution is under
     
    188188#
    189189AM_CPPFLAGS = -I. -I$(top_srcdir) $(BOOST_INCLUDE)
    190 AM_CXXFLAGS = -g $(CPP_ERROR_WARN)
     190AM_CXXFLAGS = -g $(CXX_FLAGS)
    191191#
    192192get_started_SOURCES = get_started.cpp
  • trunk/makefile.in

    r1593 r1613  
    236236@CppAD_POSTFIX_FALSE@postfix_dir = .
    237237
    238 # $Id: makefile.am 1592 2009-11-28 04:03:35Z bradbell $
     238# $Id: makefile.am 1612 2009-12-22 13:51:29Z bradbell $
    239239# -----------------------------------------------------------------------------
    240240# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    332332        cppad/local/cos_op.hpp \
    333333        cppad/local/cosh_op.hpp \
     334        cppad/local/csum_op.hpp \
    334335        cppad/local/cppad_assert.hpp \
    335336        cppad/local/declare_ad.hpp \
  • trunk/speed/adolc/makefile.in

    r1539 r1613  
    8787CYGPATH_W = @CYGPATH_W@
    8888
    89 # $Id: makefile.am 1537 2009-10-01 03:52:53Z bradbell $
     89# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    9090# -----------------------------------------------------------------------------
    9191# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    193193#
    194194# BEGIN OPTIMIZE
    195 AM_CXXFLAGS = -O2 -DNDEBUG $(CXX_FLAGS) -DADOLC
     195AM_CXXFLAGS = -O2 -DNDEBUG -DADOLC $(CXX_FLAGS)
    196196# END OPTIMIZE
    197197#
  • trunk/speed/cppad/makefile.in

    r1539 r1613  
    8686CYGPATH_W = @CYGPATH_W@
    8787
    88 # $Id: makefile.am 1537 2009-10-01 03:52:53Z bradbell $
     88# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    8989# -----------------------------------------------------------------------------
    9090# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    194194#
    195195# BEGIN OPTIMIZE
    196 AM_CXXFLAGS = -O2 -DNDEBUG $(CXX_FLAGS) -DCPPAD
     196AM_CXXFLAGS = -O2 -DNDEBUG -DCPPAD $(CXX_FLAGS)
    197197# END OPTIMIZE
    198198#
  • trunk/speed/double/makefile.in

    r1539 r1613  
    8686CYGPATH_W = @CYGPATH_W@
    8787
    88 # $Id: makefile.am 1537 2009-10-01 03:52:53Z bradbell $
     88# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    8989# -----------------------------------------------------------------------------
    9090# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    194194#
    195195# BEGIN OPTIMIZE
    196 AM_CXXFLAGS = -O2 -DNDEBUG $(CXX_FLAGS) -DDOUBLE
     196AM_CXXFLAGS = -O2 -DNDEBUG -DDOUBLE $(CXX_FLAGS)
    197197# END OPTIMIZE
    198198#
  • trunk/speed/fadbad/makefile.in

    r1539 r1613  
    8686CYGPATH_W = @CYGPATH_W@
    8787
    88 # $Id: makefile.am 1537 2009-10-01 03:52:53Z bradbell $
     88# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    8989# -----------------------------------------------------------------------------
    9090# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    194194# Note that Fadbad will not compile with the -pedantic-errors flag,
    195195# so we are leaving CXX_FLAGS out of this complilation.
    196 AM_CXXFLAGS = -O2 -DNDEBUG -Wno-deprecated -DFADBAD
     196AM_CXXFLAGS = -O2 -DNDEBUG -Wno-deprecated -DFADBAD $(CXX_FLAGS)
    197197# END OPTIMIZE
    198198#
  • trunk/speed/profile/makefile.in

    r1539 r1613  
    8686CYGPATH_W = @CYGPATH_W@
    8787
    88 # $Id: makefile.am 1537 2009-10-01 03:52:53Z bradbell $
     88# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    8989# -----------------------------------------------------------------------------
    9090# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    194194#
    195195# BEGIN OPTIMIZE
    196 AM_CXXFLAGS = -pg -O2 $(CXX_FLAGS) -DPROFILE
     196AM_CXXFLAGS = -pg -O2 -DPROFILE -DNDEBUG $(CXX_FLAGS)
    197197# END OPTIMIZE
    198198#
  • trunk/speed/sacado/makefile.in

    r1539 r1613  
    8787CYGPATH_W = @CYGPATH_W@
    8888
    89 # $Id: makefile.am 1537 2009-10-01 03:52:53Z bradbell $
     89# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    9090# -----------------------------------------------------------------------------
    9191# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    193193#
    194194# BEGIN OPTIMIZE
    195 AM_CXXFLAGS = -O2 -DNDEBUG  $(CXX_FLAGS) -DSACADO \
    196         -DRAD_EQ_ALIAS -DRAD_AUTO_AD_Const
     195AM_CXXFLAGS = -O2 -DNDEBUG -DSACADO \
     196        -DRAD_EQ_ALIAS -DRAD_AUTO_AD_Const $(CXX_FLAGS)
    197197
    198198# END OPTIMIZE
  • trunk/test_more/base_adolc.cpp

    r1370 r1613  
    6464
    6565        // arrays for Adolc zos_forward
    66         double *x, *y;
     66        double *x = 0, *y = 0;
    6767        x = CPPAD_TRACK_NEW_VEC(n, x);
    6868        y = CPPAD_TRACK_NEW_VEC(m, y);
  • trunk/test_more/makefile.in

    r1561 r1613  
    130130CYGPATH_W = @CYGPATH_W@
    131131
    132 # $Id: makefile.am 1558 2009-10-23 15:46:58Z bradbell $
     132# $Id: makefile.am 1611 2009-12-20 15:50:31Z bradbell $
    133133# -----------------------------------------------------------------------------
    134134# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     
    264264
    265265#
    266 AM_CXXFLAGS = -g $(CXX_FLAGS) $(ADOLC_FLAGS) $(IPOPT_FLAGS)
     266AM_CXXFLAGS = -g $(ADOLC_FLAGS) $(IPOPT_FLAGS) $(CXX_FLAGS)
    267267#
    268268LDADD = $(ADOLC_LIB) $(IPOPT_LIB)
Note: See TracChangeset for help on using the changeset viewer.