| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | # Copyright (C) 2020 Mate Soos |
| 4 | # |
| 5 | # This program is free software; you can redistribute it and/or |
| 6 | # modify it under the terms of the GNU General Public License |
| 7 | # as published by the Free Software Foundation; version 2 |
| 8 | # of the License. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 18 | # 02110-1301, USA. |
| 19 | |
| 20 | # This file wraps CMake invocation for TravisCI |
| 21 | # so we can set different configurations via environment variables. |
| 22 | |
| 23 | #set -x |
| 24 | set -e |
| 25 | |
| 26 | function generatescip-shell shell cryptominisat 5.11.21+dfsg1-3 generate().() { |
| 27 | dirname="${basename}-cut1-${cut1}-cut2-${cut2}-limit-${limit}-est${est}-xbmin${xgboostminchild}-xbmd${xboostmaxdepth}-reg${regressor}-subs${xgboostsubsample}" |
| 28 | |
| 29 | mkdirscip-shell system . . mkdir. -p ${dirname} |
| 30 | rmscip-shell system . . rm. -f ${dirname}/out_* |
| 31 | rmscip-shell system . . rm. -f ${dirname}/predictor*.json |
| 32 | rmscip-shell system . . rm. -f dirname.tar.gz |
| 33 | gitscip-shell system . . git. rev-parse HEAD > ${dirname}/out_git |
| 34 | catscip-shell system . . cat. learn.sh >> ${dirname}/out_git |
| 35 | md5sumscip-shell system . . md5sum. *.dat >> ${dirname}/out_git |
| 36 | |
| 37 | tiers=("short" "long" "forever") |
| 38 | tables=("used_later" "used_later_anc") |
| 39 | for tier in "${tiers[@]}"; do |
| 40 | mypids=() |
| 41 | for table in "${tables[@]}"; do |
| 42 | # check if DAT file exists |
| 43 | INFILE="comb-${table}-${tier}-cut1-${cut1}-cut2-${cut2}-limit-${limit}.dat" |
| 44 | if testscip-shell system . . test. -f "$INFILE"; then |
| 45 | echoscip-shell system . . echo. "$INFILE exists, OK" |
| 46 | else |
| 47 | echoscip-shell system . . echo. "ERROR: $INFILE does not exist!!" |
| 48 | exit -1 |
| 49 | fi |
| 50 | |
| 51 | /usr/bin/timescip-shell filesystem . . `/usr/bin/time`. --verbose -o "${dirname}/out_${tier}.timeout" \ |
| 52 | ../cldata_predict.py \ |
| 53 | $INFILE \ |
| 54 | --tier ${tier} --regressor $regressor \ |
| 55 | --xgboostest ${est} \ |
| 56 | --xgboostminchild $xgboostminchild --xboostmaxdepth=${xboostmaxdepth} \ |
| 57 | --basedir "${dirname}" \ |
| 58 | --features "best_only" \ |
| 59 | --table ${table} \ |
| 60 | --xgboostsubsample "$xgboostsubsample" \ |
| 61 | --bestfeatfile ${bestf} 2>&1 | teescip-shell system . . tee. "${dirname}/out-${table}-${tier}" & |
| 62 | pid=$! |
| 63 | echoscip-shell system . . echo. "PID here is $pid" |
| 64 | mypids+=("$pid") |
| 65 | done |
| 66 | |
| 67 | # wait for PIDs now |
| 68 | echoscip-shell system . . echo. "PIDS to wait for are: ${mypids[*]}" |
| 69 | for pid2 in "${mypids[@]}" |
| 70 | do |
| 71 | echoscip-shell system . . echo. "Waiting for $pid2 ..." |
| 72 | wait $pid2 |
| 73 | done |
| 74 | done |
| 75 | |
| 76 | tarscip-shell system . . tar. czvf ${dirname}.tar.gz ${dirname} |
| 77 | } |
| 78 | |
| 79 | |
| 80 | # best was: 8march-2020-3acd81dc55df3-cut1-5.0-cut2-30.0-limit-2000-est10-w0-xbmin300-xbmd4 |
| 81 | |
| 82 | #xboostmaxdepth=4 |
| 83 | #xboostminchild=300 |
| 84 | #est=10 |
| 85 | |
| 86 | # bestf="../../scripts/crystal/best_features-correlation2.txt" |
| 87 | bestf="../../scripts/crystal/best_features-kissat.txt" |
| 88 | |
| 89 | w=0 |
| 90 | xgboostsubsample="1.0" |
| 91 | #basename="15-dec-b1bd8f74bc2b42" |
| 92 | basename="15-dec-b1bd8f74bc2b42-kissat-2" |
| 93 | #basename="14-april-2021-69bad529f962c" |
| 94 | #basename="8march-2020-3acd81dc55df3-36feats" |
| 95 | #basename="aes-30-march-2020-a1e0e19be0c1" |
| 96 | #basename="orig" |
| 97 | limit=1000 |
| 98 | cut1="3.0" |
| 99 | cut2="25.0" |
| 100 | xboostmaxdepth=4 |
| 101 | xgboostminchild=300 |
| 102 | est=10 |
| 103 | |
| 104 | for xgboostsubsample in 1.0 |
| 105 | do |
| 106 | for limit in 10000 #1000 |
| 107 | do |
| 108 | for regressor in "xgb" #"lgbm" |
| 109 | do |
| 110 | for xboostmaxdepth in 4 #6 #8 10 12 |
| 111 | do |
| 112 | for xgboostminchild in 10 #300 |
| 113 | do |
| 114 | for est in 10 |
| 115 | do |
| 116 | generatescip-shell shell cryptominisat 5.11.21+dfsg1-3 generate(). |
| 117 | done |
| 118 | done |
| 119 | done |
| 120 | done |
| 121 | done |
| 122 | done |
| 123 | |
| 124 | exit 0 |
| 125 | |
| 126 | |
| 127 | # simple run: |
| 128 | |
| 129 | # ./cryptominisat5 goldb-heqc-i10mul.cnf --simdrat 1 --printsol 0 --predloc ./data/15-dec-b1bd8f74bc2b42-cut1-3.0-cut2-25.0-limit-10000-est10-xbmin10-xbmd4-regxgb-subs1.0/ --predtype py --predbestfeats ../scripts/crystal/best_features-correlation2.txt --predtables 000 |