Changeset 2939


Ignore:
Timestamp:
Oct 14, 2013 7:06:18 AM (6 years ago)
Author:
bradbell
Message:
  1. Make sure all '# defines' have an '# undef' and vise-verser.
  2. Add adolc tests to jenkins.sh.

check_define.sh: New reoutine that check defines have matching undef.
package.sh: run check_define.sh.
search.sh: add missing source directory to search.
configure.hpp.in: fix bug in speed tests (name of preprocessor macro).
pow.hpp: fix comment.
thread_alloc.hpp: fix spelling in comment.
jenkins.sh: Automatically set LD_LIBRARY_PATH.
base_adolc.hpp: fix problem when using ADOL-C-2.4.1
adolc_prefix.omh: add link to get_adolc.sh.

Location:
trunk
Files:
3 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/jenkins.sh

    r2933 r2939  
    5353        exit 1
    5454fi
     55# --------------------------------------------------------------------------
     56if [ -e /usr/lib64 ]
     57then
     58        libdir='lib64'
     59else
     60        libdir='lib'
     61fi
    5562# -----------------------------------------------------------------------
    56 # Running bin/get_fadbad.sh will install include files in
    57 #       trunk_dir/build/prefix/include/FADBAD++
    58 log_eval bin/get_fadbad.sh
     63# The following test can be used to skip install of other packages
     64skip='false'
     65if [ "$skip" != 'true' ]
     66then
     67        # ----------------------------------------------------------------------
     68        # Running bin/get_fadbad.sh will install include files in
     69        #       $trunk_dir/build/prefix/include/FADBAD++
     70        log_eval bin/get_fadbad.sh
     71        # ----------------------------------------------------------------------
     72        # Running bin/get_eigen.sh will install include files in
     73        #       $trunk_dir/build/prefix/include/Eigen
     74        log_eval bin/get_eigen.sh
     75        # ----------------------------------------------------------------------
     76        # Running bin/get_ipopt.sh will install include files in
     77        #       $trunk_dir/build/prefix/include/coin
     78        # and library files in
     79        #       $trunk_dir/build/prefix/$libdir
     80        # where $libdir is 'lib64' if /usr/lib64 exists and just 'lib' otherwise.
     81        log_eval bin/get_ipopt.sh
     82        # ----------------------------------------------------------------------
     83        # Running bin/get_sacado.sh will install include files in
     84        #       $trunk_dir/build/prefix/include
     85        # and library files in
     86        #       $trunk_dir/build/prefix/$libdir
     87        log_eval bin/get_sacado.sh
     88        # ----------------------------------------------------------------------
     89        # Running bin/get_acolc.sh will install include files in
     90        #       $trunk_dir/build/prefix/include/adolc
     91        # and library files in
     92        #       $trunk_dir/build/prefix/$libdir
     93        log_eval bin/get_colpack.sh
     94        log_eval bin/get_adolc.sh
     95        # ----------------------------------------------------------------------
     96fi
    5997# -----------------------------------------------------------------------
    60 # Running bin/get_eigen.sh will install include files in
    61 #       trunk_dir/build/prefix/include/Eigen
    62 log_eval bin/get_eigen.sh
    63 # -----------------------------------------------------------------------
    64 # Running bin/get_ipopt.sh will install include files in
    65 #       trunk_dir/build/prefix/include/coin
    66 # and library files in
    67 #       trunk_dir/build/prefix/$libdir
    68 # where $libdir is 'lib64' if /usr/lib64 exists and just 'lib' otherwise.
    69 log_eval bin/get_ipopt.sh
    70 # -----------------------------------------------------------------------
    71 # Running bin/get_sacado.sh will install include files in
    72 #       trunk_dir/build/prefix/include
    73 # and library files in
    74 #       trunk_dir/build/prefix/$libdir
    75 log_eval bin/get_sacado.sh
     98system_name=`uname | sed -e 's|\(......\).*|\1|'`
     99if [ "$system_name" == 'CYGWIN' ]
     100then
     101        export PATH="$trunk_dir/build/prefix/bin:$PATH"
     102else
     103        export LD_LIBRARY_PATH="$trunk_dir/build/prefix/$libdir"
     104fi
    76105# -----------------------------------------------------------------------
    77106# Use trunk_dir/../build to build and test CppAD (no reuse)
     
    100129EOF
    101130if ! $trunk_dir/configure $build_type \
     131        ADOLC_DIR="$trunk_dir/build/prefix" \
    102132        SACADO_DIR="$trunk_dir/build/prefix" \
    103133        EIGEN_DIR="$trunk_dir/build/prefix" \
  • trunk/bin/package.sh

    r2903 r2939  
    6363# (check_include_omh.sh uses files built by cmake)
    6464list="
     65        check_define.sh
    6566        check_example.sh
    6667        check_if_0.sh
  • trunk/bin/search.sh

    r2859 r2939  
    4848        omh
    4949        omh/deprecated
     50        omh/install
    5051        omh/whats_new
    5152        pkgconfig
  • trunk/cppad/configure.hpp.in

    r2769 r2939  
    9898
    9999/*!
    100 \def CPPAD_GETTIMEOFDAY
     100\def CPPAD_HAS_GETTIMEOFDAY
    101101If this symbol is one, and _MSC_VER is not defined,
    102102this system supports the gettimeofday funcgtion.
    103103Otherwise, this smybol should be zero.
    104104*/
    105 # define CPPAD_GETTIMEOFDAY @cppad_has_gettimeofday@
     105# define CPPAD_HAS_GETTIMEOFDAY @cppad_has_gettimeofday@
    106106
    107107/*!
  • trunk/cppad/example/base_adolc.hpp

    r2506 r2939  
    33# define CPPAD_BASE_ADOLC_INCLUDED
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
     
    222222namespace CppAD {
    223223        inline adouble sign(const adouble& x)
    224         {       adouble s_plus, s_minus;
     224        {       adouble s_plus, s_minus, half(.5);
    225225                // set s_plus to sign(x)/2,  except for case x == 0, s_plus = -.5
    226                 condassign(s_plus,  +x, -.5, .5);
     226                condassign(s_plus,  +x, -half, +half);
    227227                // set s_minus to -sign(x)/2, except for case x == 0, s_minus = -.5
    228                 condassign(s_minus, -x, -.5, .5);
     228                condassign(s_minus, -x, -half, +half);
    229229                // set s to sign(x)
    230230                return s_plus - s_minus;
  • trunk/cppad/local/pow.hpp

    r2506 r2939  
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
     
    173173}
    174174// =========================================================================
    175 // Fold operations in same way as CPPAD_FOLD_AD_VALUED_BINARY_OPERATION(Op)
     175// Fold operations in same way as CPPAD_FOLD_AD_VALUED_BINARY_OPERATOR(Op)
    176176// -------------------------------------------------------------------------
    177177// Operations with VecAD_reference<Base> and AD<Base> only
  • trunk/cppad/local/undef.hpp

    r2938 r2939  
    2121# undef CPPAD_ASSERT_KNOWN needed by cppad_ipopt
    2222# undef CPPAD_ASSERT_UNKNOWN needed by cppad_ipopt
    23 # undef CPPAD_BOOL_BINARY in user api
    24 # undef CPPAD_BOOL_UNARY in user api
    25 # undef CPPAD_DISCRETE_FUNCTION
    26 # undef CPPAD_END_NAMESPACE needed by cppad_ipopt
    2723# undef CPPAD_HASH_TABLE_SIZE used by test_more/optimize.cpp
    28 # undef CPPAD_MAX_NUM_THREADS in user api
    29 # undef CPPAD_NULL is in user api
    30 # undef CPPAD_PACKAGE_STRING in user api
    31 # undef CPPAD_TAPE_ADDR_TYPE in user api
    32 # undef CPPAD_TAPE_ID_TYPE in user api
    33 # undef CPPAD_TESTVECTOR in user api
    34 # undef CPPAD_TRACK_COUNT in deprecated api
    35 # undef CPPAD_TRACK_DEL_VEC in deprecated api
    36 # undef CPPAD_TRACK_EXTEND in deprecated api
    37 # undef CPPAD_TRACK_NEW_VEC in deprecated api
    38 # undef CPPAD_USER_ATOMIC
     24# undef EIGEN_MATRIXBASE_PLUGIN example use of Eigen with CppAD
     25
     26# undef CPPAD_BOOL_BINARY         in user api
     27# undef CPPAD_BOOL_UNARY          in user api
     28# undef CPPAD_DISCRETE_FUNCTION   in user api
     29# undef CPPAD_EIGENVECTOR         in user api
     30# undef CPPAD_INTERNAL_SPARSE_SET in user api
     31# undef CPPAD_MAX_NUM_THREADS     in user api
     32# undef CPPAD_NULL                in user api
     33# undef CPPAD_PACKAGE_STRING      in user api
     34# undef CPPAD_TAPE_ADDR_TYPE      in user api
     35# undef CPPAD_TAPE_ID_TYPE        in user api
     36# undef CPPAD_TESTVECTOR          in user api
     37
     38# undef CPPAD_TRACK_COUNT    in deprecated api
     39# undef CPPAD_TRACK_DEL_VEC  in deprecated api
     40# undef CPPAD_TRACK_EXTEND   in deprecated api
     41# undef CPPAD_TRACK_NEW_VEC  in deprecated api
     42# undef CPPAD_USER_ATOMIC    in deprecated api
     43
     44# undef CPPAD_TEST_VECTOR     deprecated verssion of CPPAD_TESTVECTOR
     45# undef CppADCreateBinaryBool deprecated version of CPPAD_BOOL_BINARY
     46# undef CppADCreateDiscrete   deprecated version of CPPAD_DISCRETE_FUNCTION
     47# undef CppADCreateUnaryBool  deprecated version of CPPAD_BOOL_UNARY
     48# undef CppADTrackCount       deprecated version of CPPAD_TRACK_COUNT
     49# undef CppADTrackDelVec      deprecated version of CPPAD_TRACK_DEL_VEC
     50# undef CppADTrackExtend      deprecated version of CPPAD_TRACK_EXTEND
     51# undef CppADTrackNewVec      deprecated version of CPPAD_TRACK_NEW_VEC
     52# undef CppADvector           deprecated version of CPPAD_TEST_VECTOR
    3953-----------------------------------------------------------------------------
    4054*/
     
    4761# undef CPPAD_COND_EXP_REL
    4862# undef CPPAD_CPPADVECTOR
    49 # undef CPPAD_FOLD_AD_VALUED_BINARY_OPERATION
    5063# undef CPPAD_FOLD_AD_VALUED_BINARY_OPERATOR
    5164# undef CPPAD_FOLD_ASSIGNMENT_OPERATOR
    5265# undef CPPAD_FOLD_BOOL_VALUED_BINARY_OPERATOR
    5366# undef CPPAD_FOR_JAC_SWEEP_TRACE
    54 # undef CPPAD_FORWARD0SWEEP
    55 # undef CPPAD_FORWARD0SWEEP_TRACE
    56 # undef CPPAD_FORWARD_SWEEP_TRACE
    5767# undef CPPAD_HAS_GETTIMEOFDAY
     68# undef CPPAD_HAS_NULLPTR
    5869# undef CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    59 # undef CPPAD_MAX_NUM_CAPACITIES
    6070# undef CPPAD_MAX_NUM_CAPACITY
    6171# undef CPPAD_MIN_DOUBLE_CAPACITY
    62 # undef CPPAD_NUL
    6372# undef CPPAD_OP_CODE_TYPE
    6473# undef CPPAD_REVERSE_SWEEP_TRACE
     
    7079# undef CPPAD_STDVECTOR
    7180# undef CPPAD_TRACE_CAPACITY
    72 # undef CPPAD_TRACE_THEAD
    7381# undef CPPAD_TRACE_THREAD
    7482# undef CPPAD_TRACK_DEBUG
    75 # undef CPPAD_TYPE_ADDR_TYPE
    7683# undef CPPAD_USE_FORWARD0SWEEP
    7784# undef CPPAD_USER_MACRO
  • trunk/cppad/nan.hpp

    r2870 r2939  
    153153# include <cppad/thread_alloc.hpp>
    154154
     155/*
     156# define nan There must be a define for every CppAD undef
     157*/
    155158# ifdef nan
    156159# undef nan
    157160# endif
     161
     162/*
     163# define isnan There must be a define for every CppAD undef
     164*/
    158165# ifdef isnan
    159166# undef isnan
  • trunk/cppad/thread_alloc.hpp

    r2910 r2939  
    5252\def CPPAD_TRACE_CAPACITY
    5353If NDEBUG is not defined, print all calls to \c get_memory and \c return_memory
    54 that correspond to this capacity and thread CPPAD_TRACE_THEAD.
     54that correspond to this capacity and thread CPPAD_TRACE_THREAD.
    5555(Note that if CPPAD_TRACE_CAPACITY is zero, or any other value not in the list
    5656of capacities, no tracing will be done.)
  • trunk/multi_thread/pthread/a11c_pthread.cpp

    r2794 r2939  
    4141# include <cmath>
    4242# include <cassert>
    43 //
     43
     44// define CPPAD_NULPTR
    4445# include <cppad/configure.hpp>
    4546# if CPPAD_HAS_NULLPTR
  • trunk/omh/install/adolc_prefix.omh

    r2740 r2939  
    4343$rref mul_level_adolc_ode.cpp$$
    4444$tend
    45 
    4645
    4746$head adolc_prefix$$
     
    128127$code /cygdrive/d/adolc_base$$ should be used for $icode adolc_prefix$$.
    129128
     129$children%
     130        bin/get_adolc.sh
     131%$$
     132$head get_adolc$$
     133$index get, adolc$$
     134$index adolc, get$$
     135If you are using Unix, you can download and install
     136a copy of Adolc using $cref get_adolc.sh$$.
     137The corresponding $icode adolc_prefix$$ would be
     138$code build/prefix$$.
     139
    130140$end
  • trunk/omh/preprocessor.omh

    r2859 r2939  
    4646$head Documented Elsewhere$$
    4747$table
     48$cref/CPPAD_BOOL_BINARY/BoolFun/Create Binary/$$
     49$rnext
    4850$cref/CPPAD_BOOL_UNARY/BoolFun/Create Unary/$$
    49 $rnext
    50 $cref/CPPAD_BOOL_UNARY/BoolFun/Create Binary/$$
    5151$rnext
    5252$cref/CPPAD_DISCRETE_FUNCTION/Discrete/$$
     
    5959$rnext
    6060$cref/CPPAD_TESTVECTOR/testvector/$$
    61 $rnext
    62 $cref/CPPAD_USER_ATOMIC/old_atomic/$$
    6361$tend
    6462
     
    7977$cref/CPPAD_TRACK_COUNT/TrackNewDel/TrackCount/Macro/$$
    8078$rnext
     79$cref/CPPAD_USER_ATOMIC/old_atomic/$$
     80$rnext
    8181$cref/CppADTrackNewVec/TrackNewDel/TrackNewVec/Previously Deprecated/$$
    8282$rnext
  • trunk/omh/whats_new/whats_new_13.omh

    r2935 r2939  
    5555assist you in learning about changes between various versions of CppAD.
    5656
     57$head 10-14$$
     58The script $cref get_adolc.sh$$ was added
     59(for downloading and installing
     60$href%https://projects.coin-or.org/ADOL-C%ADOL-C%$$) in the
     61$code build$$ directory.
     62Note that this local install of Adolc requires ColPack; see
     63$cref get_colpack.sh$$.
     64
     65$head 10-13$$
     66Make sure that all of the
     67$cref/preprocessor symbols/cppad/Preprocessor Symbols/$$,
     68that are not part of the CppAD API, are undefined when the
     69$code <cppad/cppad.hpp>$$ file concludes.
     70
    5771$head 10-12$$
    5872$list number$$
  • trunk/omh/wish_list.omh

    r2926 r2939  
    136136not need to compute the requested derivative of the original expression.
    137137
     138$head Preprocessor Symbols$$
     139Make sure all the user API preprocessor symbols are list in
     140the $cref preprocessor$$ section.
     141
    138142$head Software Guidelines$$
    139143
Note: See TracChangeset for help on using the changeset viewer.