source: trunk/bin/speed_new.sh @ 3607

Last change on this file since 3607 was 3607, checked in by bradbell, 5 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: f4baab0ea7c2679ba9351b0439b6efebfa77ba04
end hash code: 894d554a00ceec8a3545f05eca62708a7b5cb43d

commit 894d554a00ceec8a3545f05eca62708a7b5cb43d
Author: Brad Bell <bradbell@…>
Date: Tue Jan 20 09:06:10 2015 -0700

Fix copyright end date.


whats_new_15.omh: Add comment about date of deprecation.

commit 611e982000168db91aba22b763c14bb78d57da47
Author: Brad Bell <bradbell@…>
Date: Tue Jan 20 08:53:00 2015 -0700

Squashed commit from old/compare_op to master:


In addition, fix copyright end date for some files, and add note about
deprecated date in whats_new_15.omh.


commit 6e46df5c850ecd58d7a886db4043bc3f2d4579d1
Author: Brad Bell <bradbell@…>
Date: Tue Jan 20 08:16:57 2015 -0700


Always return f.compare_change_op_index() == 0 after f.optimize().


checkpoint.hpp: ignore comparison operators.
fun_construct.hpp: remove double initilaization of values.
compare_change.cpp: demonstrate more features of new interface.
whats_new_15.omh: prepare for merging this branch into master.
wish_list.omh: update wish list item to new compare_change interface.


commit 45315907c70e5b383d984fb9498b54a474001af0
Author: Brad Bell <bradbell@…>
Date: Tue Jan 20 05:04:37 2015 -0700


Use the new f.compare_change_count(0) option in speed tests.


commit bb6e72befd6d01f1fb62c43b9b19471ffaa7cc2c
Author: Brad Bell <bradbell@…>
Date: Tue Jan 20 04:51:16 2015 -0700


Move CompareChange? -> deprecated and plan -> compare_change.


forward0sweep.hpp: skip comparison operator when count is zero.
forward1sweep.hpp: skip comparison operator when count is zero.
compare_change.cpp: demonstrate count == 0 case.


commit 622a13c568c612d9dfe9ccd1a01f4ac5f74ba824
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 23:17:42 2015 -0700


Add example and test of new compare change user API.


ad_fun.hpp: fix f.compare_change_op_index.
compare_change.cpp: Change example to use new API.
compare_change.cpp: Move old example here (just test now).


commit ec4c1613eae8df56fbf31e7b8711ce69cc41df83
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 21:12:11 2015 -0700


Implement the compare change plan, still needs an example and test.
Also have the change from 'plan' to just plain documentation.


commit a81a46f27011bee08ba072551044dc9f4a99a906
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 17:49:05 2015 -0700


Change name of compare_change functions and partially implement this new plan.


commit 146faad48a700a56362e74f9c3a3c39144a79738
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 14:22:40 2015 -0700


Branch: compare_op
plan.omh: change name of count function.


commit 35d91d126765d1a0ab4bfe9e2b006bbf535cd648
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 13:19:07 2015 -0700


Add deprecation date for some more cases.


commit 5bb65a8c48fae4263b66fcd04520e10e66febc11
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 13:13:51 2015 -0700


Add date of deprecation for some more cases.


commit e95ee6b209601cd9a075d2e37c602e73c32fb6ab
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 12:58:44 2015 -0700


Add date of deprecation for some more cases.


commit 0ea84ccd87383edc62a6ae1711da104b12e8c444
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 12:47:01 2015 -0700


Add date of deprecation for some cases.


commit 17755e609ea8e03472b08dcc2fb5ad347eb723cb
Author: Brad Bell <bradbell@…>
Date: Mon Jan 19 08:20:45 2015 -0700


plan.omh: changs some names.


commit 29f369c06d4d0ee284c4c668d52d8461613066dc
Author: Brad Bell <bradbell@…>
Date: Fri Jan 16 06:39:45 2015 -0700


Document the plan for compare_change user API.


compare_change.omh: fix minor typo.
plan.txt: change to the omhelp file plan.omh.


commit a3a2f4dedd202a722812b6eb2714851b40726e6e
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 21:03:44 2015 -0700


new_branch.sh: remove unused variable.
push_git2svn.py: move repository from github/bradbell to coin-or/bradbell.


commit 3751a197ab2897e76616f9d9b0915148bd855356
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 20:56:17 2015 -0700


plan.txt: plan for this branches API will go here.


commit 76013ec2ad7baacdeab5e761812d542867910174
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 18:04:33 2015 -0700


Store the operator index for the first comparision change in the ADFun object.


commit 9caf25014079a60df5de17bcac76775daf8ee201
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 12:45:56 2015 -0700


Make compare_change a parameter (so will be easy to add compare_first).


commit 2246d22fe82b8909d432f82ab0d783ce3351a02f
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 09:12:40 2015 -0700


speed_branch.sh: fix directory (before cd).


commit b3910de86558a97749741bfb728e45c5a86d1c73
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 05:14:01 2015 -0700


search.sh: use git to get list of source files.
ad_fun.hpp: imporve doxygen doc for compare_change_.
ad_tape.hpp: remove RecordCompare? (no longer used).
atomic_base.hpp: minor edit to user documentation.


commit dd74f331386cadc9cc272c264296e575691aa3f8
Author: Brad Bell <bradbell@…>
Date: Thu Jan 15 04:12:34 2015 -0700


Change Leq..Op -> Le..Op and leq.._op -> le.._op.


commit ae729296323eb7f4f4a7c0e90a303a8d7f4ed42a
Author: Brad Bell <bradbell@…>
Date: Wed Jan 14 21:19:55 2015 -0700


comp_op.hpp: Add doxygen documentaiton for compare operators.
compare.hpp: avoid an extra branch.


commit b064d59a5ad01dff5c708cc8c02f628f58c863ec
Author: Brad Bell <bradbell@…>
Date: Wed Jan 14 16:11:25 2015 -0700


Remove ComOp?, replaced by specific cases Eq..Op, Ne..Op, Leq..Op, Lt..Op,
which should run faster.


forward0sweep.hpp: Remove out-dated comment about CompOp?.
forward1sweep.hpp: Remove out-dated comment about CompOp?.


commit 5bb0a70d1151e9086b88024050cea6cf11e83aa7
Author: Brad Bell <bradbell@…>
Date: Wed Jan 14 09:02:17 2015 -0700


Use Eq..Op, Ne..Op to implement == and !=.


commit 0ebeec61bc040a00c50db41ca5da31fb87194f93
Author: Brad Bell <bradbell@…>
Date: Wed Jan 14 07:19:26 2015 -0700


compare.hpp: Finish folding < <= > >= into Lt..Op and Leq..Op.


commit c949e5b72158b98cbab61c8aea98e76008e9c2f4
Author: Brad Bell <bradbell@…>
Date: Wed Jan 14 06:28:41 2015 -0700


  1. Change plan to fold all compare operations into Leq..Op and Lt..Op cases.
  2. Fix alphabetical order between Ld and Leq.


commit 6ffee88b68b682359d62bc75a8c2ba3e28d012ac
Author: Brad Bell <bradbell@…>
Date: Tue Jan 13 22:40:18 2015 -0700


Splite parameter <= variable and parameter > variable as separate compare
operators.


commit 0841014db4ead690d1c2358f5e09494030ae1e5f
Author: Brad Bell <bradbell@…>
Date: Tue Jan 13 21:12:57 2015 -0700


Attempting to recording and playback of compare operators faster:
Split variable <= variable and variable > variable out as separate cases.


compare.hpp: remove white space at end of lines.


commit cfd3afceebd4b3383b3042cbca98caf82ff77670
Author: Brad Bell <bradbell@…>
Date: Tue Jan 13 08:39:12 2015 -0700


speed_branch.sh: compare speed_cppad between two git branches.
speed_new.sh: correct list of options, remove unused variable.
wish_list.omh: correct discussion of effect of keeping compare operators.


commit 9ed03e1ee2c258ca38561ad083067e235d032e14
Author: Brad Bell <bradbell@…>
Date: Tue Jan 13 05:54:30 2015 -0700


Change test so it corresponds to optimization keeping compare operators.


commit 5c418d477d58984b094bba027ebb0794e759e557
Author: Brad Bell <bradbell@…>
Date: Tue Jan 13 05:12:50 2015 -0700


Include example and test of using CompareChange? with optimized tape.


commit c1b48edfa56ca096ce8c2db1dbadb2658cb13fe3
Author: Brad Bell <bradbell@…>
Date: Tue Jan 13 04:24:54 2015 -0700


Fix optimization so variables used in compare opertions are alwasy available.


commit 6fe607ca30db07b356fd3a9fe9779fa2dfd382d8
Author: Brad Bell <bradbell@…>
Date: Mon Jan 12 07:56:41 2015 -0700


Keep CompareChange? in optimized versions of tape and when NDEBUG is defined.

commit b4c0e51489cc0878499a331b4af4875b2781d8d8
Author: Brad Bell <bradbell@…>
Date: Sun Jan 11 17:01:59 2015 -0700

new_branch.sh: final procedure (only hand tested).

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1#! /bin/bash -e
2# $Id: speed_new.sh 3607 2015-01-20 16:20:41Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
5#
6# CppAD is distributed under multiple licenses. This distribution is under
7# the terms of the
8#                     Eclipse Public License Version 1.0.
9#
10# A copy of this license is included in the COPYING file of this distribution.
11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12# -----------------------------------------------------------------------------
13if [ ! -e "bin/speed_new.sh" ]
14then
15        echo "bin/speed_new.sh: must be executed from its parent directory"
16        exit 1
17fi
18if [ "$1" == '' ]
19then
20cat << EOF
21usage: bin/speed_new.sh option_1 option_2 ...
22where the possible options are:
23        onetape, colpack, optimize, atomic, memory, boolsparsity, colpack
24Use the special value 'none' for no options
25EOF
26        exit 1
27fi
28if [ "$1" == 'none' ]
29then
30        shift
31fi
32if [ ! -d cppad/new ]
33then
34        echo "speed_new.sh: the directory cppad/new does not exist."
35        echo "It contains new source code for the cppad directory (can be empty)."
36        exit 1
37fi
38if [ ! -d cppad/local/new ]
39then
40        echo "speed_new.sh: the directory cppad/local/new does not exist"
41        echo "It contains new source code for the cppad/local (can be empty)."
42        exit 1
43fi
44# -----------------------------------------------------------------------------
45if [ -d '.git' ]
46then
47        revert_cmd='git checkout'
48elif [ -d .svn ]
49then
50        revert_cmd='svn revert'
51else
52        echo 'speed_new.sh: Cannot find ./.git or ./.svn'
53        exit 1
54fi
55# -----------------------------------------------------------------------------
56# Source code files that are changing
57new_cppad=`cd cppad/new ; ls`
58new_local=`cd cppad/local/new ; ls`
59if [ "$new_cppad" == "" ] && [ "$new_local" == "" ]
60then
61        echo "speed_new.sh: both cppad/new and cppad/local/new are empty"
62        exit 1
63fi
64# -------------------------------------------------------------------------
65#
66if [ ! -e build/speed/cppad/cur_speed.out ]
67then
68        # revert cppad source code to the current version
69        if [ "$new_cppad" != "" ]
70        then
71                for file in $new_cppad
72                do
73                        echo "$revert_cmd cppad/$file"
74                        if ! $revert_cmd cppad/$file
75                        then
76                                echo "assuming cppad/$file not in repository"
77                        fi
78                done
79        fi
80        # revert cppad/local source code to the current version
81        if [ "$new_local" != "" ]
82        then
83                for file in $new_local
84                do
85                        echo "$revert_cmd cppad/local/$file"
86                        if ! $revert_cmd cppad/local/$file
87                        then
88                                echo "assuming cppad/local/$file not in repository"
89                        fi
90                done
91        fi
92        #
93        # compile and link the current version
94        echo "cd build; make check_speed_cppad; cd speed/cppad"
95        cd build; make check_speed_cppad; cd speed/cppad
96        #
97        # run speed test for the current version
98        echo "./speed_cppad speed 123 $* > cur_speed.out"
99        ./speed_cppad speed 123 $* > cur_speed.out
100        #
101        echo "cd ../../.."
102        cd ../../..
103fi
104#
105# Convert cppad source to the new version
106for file in $new_cppad
107do
108        echo "cp cppad/new/$file cppad/$file"
109        cp cppad/new/$file cppad/$file
110done
111#
112# Convert local source to the new version
113for file in $new_local
114do
115        echo "cp cppad/local/new/$file cppad/local/$file"
116        cp cppad/local/new/$file cppad/local/$file
117done
118#
119if [ ! -e build/speed/cppad/new_speed.out ]
120then
121        # compile and link the new version
122        echo "cd build; make check_speed_cppad; cd speed/cppad"
123        cd build; make check_speed_cppad; cd speed/cppad
124        #
125        # run speed test for the new version
126        echo "./speed_cppad speed 123 $* > new_speed.out"
127        ./speed_cppad speed 123 $* > new_speed.out
128        #
129        echo "cd ../../.."
130        cd ../../..
131fi
132# compare versions
133echo "cd build/speed/cppad"
134cd build/speed/cppad
135#
136echo "sed -n -e 's|_rate|_rate_cur|' -e '/_rate_/p' \\"
137echo "       -e 's|available|available_cur|' -e '/available_cur/p' \\"
138echo "  cur_speed.out > run.out"
139sed -n -e 's|_rate|_rate_cur|' -e '/_rate_/p' \
140        -e 's|available|available_cur|' -e '/available_cur/p' \
141        cur_speed.out > run.out
142#
143echo "sed -n -e 's|_rate|_rate_new|' -e '/_rate_/p' \\"
144echo "       -e 's|available|available_new|' -e '/available_new/p' \\"
145echo "  new_speed.out >> run.out"
146sed -n -e 's|_rate|_rate_new|' -e '/_rate_/p' \
147        -e 's|available|available_new|' -e '/available_new/p' \
148        new_speed.out >> run.out
149#
150echo "cat run.out | sort -u"
151cat run.out | sort -u
Note: See TracBrowser for help on using the repository browser.