source: trunk/bin/check_all.sh @ 3949

Last change on this file since 3949 was 3949, checked in by bradbell, 2 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 30776c87f14a67adf1e65d733fa0596dff0e637e
end hash code: 69e04f14acd147b2771ac15c04ec3923627cf60d

commit 69e04f14acd147b2771ac15c04ec3923627cf60d
Author: Brad Bell <bradbell@…>
Date: Wed Jun 7 22:04:24 2017 -0600

check_all.sh: fix name of print_for and multi_thead examples / tests.
makefile.in: autotools automatic update.
makefile.in: autotools automatic update.

commit 57f604558a1b45b44a422894044fc67f4c6ed1fb
Author: Brad Bell <bradbell@…>
Date: Wed Jun 7 20:35:53 2017 -0600

Move all source code for multi-thread Newton method into multi_newton.cpp.

commit a159c2f3a2d8e5ddf6c324e650665253a777fe52
Author: Brad Bell <bradbell@…>
Date: Wed Jun 7 17:09:32 2017 -0600

harmonic.cpp: move mega_sum_ next to num_threads_.
whats_new_17.omh: user's view of recent changes.

commit 5740cfe03b34a1f9fa8dcb60551705a94bd58260
Author: Brad Bell <bradbell@…>
Date: Wed Jun 7 09:00:37 2017 -0600

  1. Move all source for harmonic multi-threadind example into harmonic.cpp
  2. Advance to cppad-20170607. batch_edit.sh: add another entry to future plan.

commit eaf7da5364a10d6120bcc6332803b6f68a582be2
Author: Brad Bell <bradbell@…>
Date: Tue Jun 6 07:10:32 2017 -0600

ode_evaluate.hpp: minor edit (remove italic and).

commit bb5b3bb5f53c63d09c08946b3e2bbb0018701c80
Author: Brad Bell <bradbell@…>
Date: Tue Jun 6 06:32:15 2017 -0600

  1. Fix missing test_time argument in documentation.
  2. Advance to cppad-20170604. team_example.cpp: minor edit of purpose.

commit 4222731da124fa98f1aa14f71f1caa38b1c83f44
Author: Brad Bell <bradbell@…>
Date: Sun Jun 4 18:24:42 2017 -0600

Add more entries to checked for deprecated features in examples.

commit 3ea873dd35d25c3953d666c0548be64e98b66594
Author: Brad Bell <bradbell@…>
Date: Sun Jun 4 08:47:13 2017 -0600

Make sure the following deprecated names to not appear in examples:

cppad_ipopt, epsilon, CPPAD_TESTVECTOR, memory_leak to deprecated

commit c6b5ef691e5ab4d975fe265a3c3bdf0d59fd1d17
Author: Brad Bell <bradbell@…>
Date: Sun Jun 4 08:20:19 2017 -0600

Advance to cppad-20170604.


check_deprecated.sh: check for more cases.
print_for.cpp: remove use of omp_alloc (deprecated).

commit baeac2543ae35bcca92a01d4d11f04da39fb00d8
Author: Brad Bell <bradbell@…>
Date: Sun Jun 4 07:44:57 2017 -0600

check_deprecated.sh: under construction.
compare_op.cpp: remove use of CompareChange? (it has been deprecated).

commit f5424b19997c0a7475cd52f3194e594e7ecc2539
Author: Brad Bell <bradbell@…>
Date: Sun Jun 4 07:13:38 2017 -0600

hes_lagrangian.cpp: remove use of Dependent(y) because it is deprecated.

commit 2bb1188fa814d718bd75c41a5be8718f9b170f4c
Author: Brad Bell <bradbell@…>
Date: Sun Jun 4 06:40:01 2017 -0600

wish_list.omh: remove debug/release item (completed).

commit c61ce7f717a07b153271e7ea5bc088886513a11e
Author: Brad Bell <bradbell@…>
Date: Sat Jun 3 06:31:11 2017 -0600

  1. Advance to cppad-20170603.


speed_branch.sh: Need to specify new cmake argument (debug_which).
link_sparse_hessian.cpp: Add lower triangular to specifications.

commit 253c9ecf28f5e46df883d770648b5cf0574c1115
Author: Brad Bell <bradbell@…>
Date: Fri Jun 2 21:30:54 2017 -0600

new_release.sh: advance to 20170000.6.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1#! /bin/bash -e
2# -----------------------------------------------------------------------------
3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
4#
5# CppAD is distributed under multiple licenses. This distribution is under
6# the terms of the
7#                     Eclipse Public License Version 1.0.
8#
9# A copy of this license is included in the COPYING file of this distribution.
10# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11# -----------------------------------------------------------------------------
12if [ ! -e "bin/check_all.sh" ]
13then
14        echo "bin/check_all.sh: must be executed from its parent directory"
15        exit 1
16fi
17echo_log_eval() {
18        echo $*
19        echo $* >> $top_srcdir/check_all.log
20        if ! eval $* >> $top_srcdir/check_all.log 2> $top_srcdir/check_all.err
21        then
22                cat $top_srcdir/check_all.err
23                echo 'Error: see check_all.log'
24                exit 1
25        fi
26        msg=`cat $top_srcdir/check_all.err`
27        if [ "$msg" != '' ]
28        then
29                echo "$msg"
30                echo 'Warning: see check_all.err'
31                exit 1
32        fi
33        rm $top_srcdir/check_all.err
34}
35log_eval() {
36        echo $* >> $top_srcdir/check_all.log
37        if ! eval $* >> $top_srcdir/check_all.log
38        then
39                echo "Error: check check_all.log"
40                exit 1
41        fi
42}
43if [ -e check_all.log ]
44then
45        echo "rm check_all.log"
46        rm check_all.log
47fi
48top_srcdir=`pwd`
49echo "top_srcdir = $top_srcdir"
50#
51if ! random_zero_one=`expr $RANDOM % 2`
52then
53        # expr exit status is 1 when the expression result is zero
54        # supress shell exit in this case
55        :
56fi
57echo "random_zero_one = $random_zero_one"
58# ---------------------------------------------------------------------------
59# circular shift program list and set program to first entry in list
60next_program() {
61        program_list=`echo "$program_list" | sed -e 's| *\([^ ]*\) *\(.*\)|\2 \1|'`
62        program=`echo "$program_list" | sed -e 's| *\([^ ]*\).*|\1|'`
63}
64# ---------------------------------------------------------------------------
65if [ -e "$HOME/prefix/cppad" ]
66then
67        echo_log_eval rm -r $HOME/prefix/cppad
68fi
69# ---------------------------------------------------------------------------
70# Create package to run test in
71echo "bin/package.sh"
72bin/package.sh
73# -----------------------------------------------------------------------------
74# choose which tarball to use for testing
75skip=''
76version=`bin/version.sh get`
77echo_log_eval cd build
78list=( `ls cppad-$version.*.tgz` )
79if [ "${#list[@]}" == '1' ]
80then
81        tarball="${list[0]}"
82        skip="$skip other_tarball"
83else
84        tarball="${list[$random_zero_one]}"
85fi
86echo_log_eval rm -rf cppad-$version
87echo_log_eval tar -xzf $tarball
88echo_log_eval cd cppad-$version
89# -----------------------------------------------------------------------------
90if [ "$random_zero_one" == '0' ]
91then
92        echo_log_eval bin/run_cmake.sh --boost_vector --debug_odd
93else
94        echo_log_eval bin/run_cmake.sh --eigen_vector --debug_even
95fi
96echo_log_eval cd build
97# -----------------------------------------------------------------------------
98echo_log_eval make check
99# -----------------------------------------------------------------------------
100for package in adolc eigen ipopt fadbad sacado
101do
102        dir=$HOME/prefix/$package
103        if [ ! -d "$dir" ]
104        then
105                skip="$skip $package"
106        fi
107done
108#
109# extra speed tests not run with option specified
110for option in onetape colpack optimize atomic memory boolsparsity
111do
112        echo_eval speed/cppad/speed_cppad correct 432 $option
113done
114echo_eval speed/adolc/speed_adolc correct         432 onetape
115echo_eval speed/adolc/speed_adolc sparse_jacobian 432 onetape colpack
116echo_eval speed/adolc/speed_adolc sparse_hessian  432 onetape colpack
117#
118# ----------------------------------------------------------------------------
119# extra multi_thread tests
120program_list=''
121for threading in bthread openmp pthread
122do
123        program="example/multi_thread/${threading}"
124        program="$program/example_multi_thread_${threading}"
125        if [ ! -e $program ]
126        then
127                skip="$skip $program"
128        else
129                program_list="$program_list $program"
130                #
131                # fast cases, test for all programs
132                echo_log_eval ./$program a11c
133                echo_log_eval ./$program simple_ad
134                echo_log_eval ./$program team_example
135        fi
136done
137if [ "$program_list" != '' ]
138then
139        # test_time=1,max_thread=4,mega_sum=1
140        next_program
141        echo_log_eval ./$program harmonic 1 4 1
142        #
143        # test_time=2,max_thread=4,num_zero=20,num_sub=30,num_sum=500,use_ad=true
144        next_program
145        echo_log_eval ./$program multi_newton 2 4 20 30 500 true
146        #
147        # case that failed in the past
148        next_program
149        echo_log_eval ./$program multi_newton 1 1 100 700 1 true
150        #
151        # case that failed in the past
152        next_program
153        echo_log_eval ./$program multi_newton 1 2 3 12 1 true
154fi
155#
156# print_for test
157program='example/print_for/example_print_for'
158if [ ! -e "$program" ]
159then
160        skip="$skip $program"
161else
162        echo_log_eval $program
163        $program | sed -e '/^Test passes/,$d' > junk.1.$$
164        $program | sed -e '1,/^Test passes/d' > junk.2.$$
165        if diff junk.1.$$ junk.2.$$
166        then
167                rm junk.1.$$ junk.2.$$
168                echo_log_eval echo "print_for: OK"
169        else
170                echo_log_eval echo "print_for: Error"
171                exit 1
172        fi
173fi
174#
175echo_log_eval make install
176#
177if [ "$skip" != '' ]
178then
179        echo_log_eval echo "check_all.sh: skip = $skip"
180        exit 1
181fi
182# ----------------------------------------------------------------------------
183echo "$0: OK"
184exit 0
Note: See TracBrowser for help on using the repository browser.