Changeset 11323
- Timestamp:
- Jan 26, 2007, 1:39:42 PM (19 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 9 edited
-
detrend.norm.pro (modified) (16 diffs)
-
detrend.process.pro (modified) (13 diffs)
-
detrend.reject.pro (modified) (6 diffs)
-
detrend.resid.pro (modified) (11 diffs)
-
detrend.stack.pro (modified) (6 diffs)
-
pantasks.pro (modified) (2 diffs)
-
phase0.pro (modified) (10 diffs)
-
phase2.pro (modified) (6 diffs)
-
phase3.pro (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.norm.pro
r11235 r11323 29 29 book listbook detPendingNormExp 30 30 end 31 32 # these variables will cycle through the known database names 33 $detPendingNormStatImfile_DB = 0 34 $detPendingNormImfile_DB = 0 35 $detPendingNormExp_DB = 0 31 36 32 37 # select images ready for copy … … 44 49 45 50 task.exec 46 command dettool -tonormalizedstat -limit 20 51 if ($DB:n == 0) 52 option DEFAULT 53 command dettool -tonormalizedstat -limit 20 54 else 55 # save the DB name for the exit tasks 56 option $DB:$detPendingNormStatImfile_DB 57 command dettool -tonormalizedstat -limit 20 -dbname $DB:$detPendingNormStatImfile_DB 58 $detPendingNormStatImfile_DB ++ 59 if ($detPendingNormStatImfile_DB >= $DB:n) set detPendingNormStatImfile_DB = 0 60 end 47 61 end 48 62 … … 50 64 task.exit 0 51 65 # convert 'stdout' to book format 52 ipptool2book stdout detPendingNormStatImfile -key det_id:iteration -uniq 66 ipptool2book stdout detPendingNormStatImfile -key det_id:iteration -uniq -setword dbname $options:0 53 67 if ($VERBOSE > 2) 54 68 book listbook detPendingNormStatImfile … … 57 71 # delete existing entries which are DONE 58 72 book delpage detPendingNormStatImfile -key state DONE 73 book delpage detPendingNormStatImfile -key state DATA_ERR 59 74 end 60 75 … … 90 105 book getword detPendingNormStatImfile $pageName iteration -var ITERATION 91 106 book getword detPendingNormStatImfile $pageName camera -var CAMERA 107 book getword detPendingNormStatImfile $pageName workdir -var WORKDIR 108 book getword detPendingNormStatImfile $pageName dbname -var DBNAME 109 set_standard_args 92 110 93 111 # specify choice of remote host: … … 108 126 # create example job options as a demonstration 109 127 if ($VERBOSE > 1) 110 echo command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE 111 end 112 command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE 128 echo command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE $ARGS 129 end 130 command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE $ARGS 113 131 end 114 132 … … 139 157 140 158 task.exec 141 command dettool -tonormalize -limit 20 159 if ($DB:n == 0) 160 option DEFAULT 161 command dettool -tonormalize -limit 20 162 else 163 # save the DB name for the exit tasks 164 option $DB:$detPendingNormImfile_DB 165 command dettool -tonormalize -limit 20 -dbname $DB:$detPendingNormImfile_DB 166 $detPendingNormImfile_DB ++ 167 if ($detPendingNormImfile_DB >= $DB:n) set detPendingNormImfile_DB = 0 168 end 142 169 end 143 170 … … 145 172 task.exit 0 146 173 # convert 'stdout' to book format 147 ipptool2book stdout detPendingNormImfile -key det_id:iteration -uniq 174 ipptool2book stdout detPendingNormImfile -key det_id:iteration -uniq -setword dbname $options:0 148 175 if ($VERBOSE > 2) 149 176 book listbook detPendingNormImfile … … 152 179 # delete existing entries which are DONE 153 180 book delpage detPendingNormImfile -key state DONE 181 book delpage detPendingNormImfile -key state DATA_ERR 154 182 end 155 183 … … 188 216 book getword detPendingNormImfile $pageName class_id -var CLASS_ID 189 217 book getword detPendingNormImfile $pageName norm -var NORM 218 book getword detPendingNormImfile $pageName workdir -var WORKDIR 219 book getword detPendingNormImfile $pageName dbname -var DBNAME 220 set_standard_args 190 221 191 222 # specify choice of remote host: … … 205 236 # create example job options as a demonstration 206 237 if ($VERBOSE > 1) 207 echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE 208 end 209 command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE 238 echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE $ARGS 239 end 240 command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE $ARGS 210 241 end 211 242 … … 236 267 237 268 task.exec 238 command dettool -tonormalizedexp -limit 20 269 if ($DB:n == 0) 270 option DEFAULT 271 command dettool -tonormalizedexp -limit 20 272 else 273 # save the DB name for the exit tasks 274 option $DB:$detPendingNormExp_DB 275 command dettool -tonormalizedexp -limit 20 -dbname $DB:$detPendingNormExp_DB 276 $detPendingNormExp_DB ++ 277 if ($detPendingNormExp_DB >= $DB:n) set detPendingNormExp_DB = 0 278 end 239 279 end 240 280 … … 242 282 task.exit 0 243 283 # convert 'stdout' to book format 244 ipptool2book stdout detPendingNormExp -key det_id:iteration -uniq 284 ipptool2book stdout detPendingNormExp -key det_id:iteration -uniq -setword dbname $options:0 245 285 if ($VERBOSE > 2) 246 286 book listbook detPendingNormExp … … 249 289 # delete existing entries which are DONE 250 290 book delpage detPendingNormExp -key state DONE 291 book delpage detPendingNormExp -key state DATA_ERR 251 292 end 252 293 … … 282 323 book getword detPendingNormExp $pageName det_type -var DET_TYPE 283 324 book getword detPendingNormExp $pageName camera -var CAMERA 325 book getword detPendingNormExp $pageName workdir -var WORKDIR 326 book getword detPendingNormExp $pageName dbname -var DBNAME 327 set_standard_args 284 328 285 329 # specify choice of remote host: … … 299 343 # create example job options as a demonstration 300 344 if ($VERBOSE > 1) 301 echo command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE 302 end 303 command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE 345 echo command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE $ARGS 346 end 347 command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE $ARGS 304 348 end 305 349 -
trunk/ippTasks/detrend.process.pro
r11210 r11323 27 27 book listbook detPendingProcessedExp 28 28 end 29 30 # these variables will cycle through the known database names 31 $detPendingProcessedImfile_DB = 0 32 $detPendingProcessedExp_DB = 0 29 33 30 34 # select images ready for copy … … 42 46 43 47 task.exec 44 command dettool -toprocessedimfile -limit 20 48 if ($DB:n == 0) 49 option DEFAULT 50 command dettool -toprocessedimfile -limit 20 51 else 52 # save the DB name for the exit tasks 53 option $DB:$detPendingProcessedImfile_DB 54 command dettool -toprocessedimfile -limit 20 -dbname $DB:$detPendingProcessedImfile_DB 55 $detPendingProcessedImfile_DB ++ 56 if ($detPendingProcessedImfile_DB >= $DB:n) set detPendingProcessedImfile_DB = 0 57 end 45 58 end 46 59 … … 48 61 task.exit 0 49 62 # convert 'stdout' to book format 50 ipptool2book stdout detPendingProcessedImfile -key det_id:exp_tag:class_id -uniq 63 ipptool2book stdout detPendingProcessedImfile -key det_id:exp_tag:class_id -uniq -setword dbname $options:0 51 64 if ($VERBOSE > 2) 52 65 book listbook detPendingProcessedImfile … … 55 68 # delete existing entries which are DONE 56 69 book delpage detPendingProcessedImfile -key state DONE 70 book delpage detPendingProcessedImfile -key state DATA_ERR 57 71 end 58 72 … … 91 105 book getword detPendingProcessedImfile $pageName uri -var URI 92 106 book getword detPendingProcessedImfile $pageName camera -var CAMERA 107 book getword detPendingProcessedImfile $pageName workdir -var WORKDIR 108 book getword detPendingProcessedImfile $pageName dbname -var DBNAME 109 set_standard_args 93 110 94 111 # specify choice of remote host: … … 100 117 101 118 ## generate output log based on filerule 102 ## XXX use OUTPATH from db to set output path 103 ## XXX use ipp_filename.pl DETPROC.LOG $outroot $CLASS_ID` 104 $word = `basename $EXP_TAG | tr '.' ' '` 105 list word -split $word 106 $base = $word:0 107 stdout $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 108 stderr $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 109 exec mkdir -p $LOGSUBDIR/$base 119 $outroot = $WORKDIR/$EXP_TAG 120 $logfile = `ipp_filename.pl DETPROC.LOG $outroot $CLASS_ID` 121 stdout $logfile 122 stderr $logfile 123 exec mkdir -p $WORKDIR 110 124 111 125 # save the pageName for future reference below … … 114 128 # create example job options as a demonstration 115 129 if ($VERBOSE > 1) 116 echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA 117 end 118 command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA 130 echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS 131 end 132 command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS 119 133 end 120 134 … … 145 159 146 160 task.exec 147 command dettool -toprocessedexp -limit 20 161 if ($DB:n == 0) 162 command dettool -toprocessedexp -limit 20 163 else 164 # save the DB name for the exit tasks 165 option $DB:$detPendingProcessedExp_DB 166 command dettool -toprocessedexp -limit 20 -dbname $DB:$detPendingProcessedExp_DB 167 $detPendingProcessedExp_DB ++ 168 if ($detPendingProcessedExp_DB >= $DB:n) set detPendingProcessedExp_DB = 0 169 end 148 170 end 149 171 … … 151 173 task.exit 0 152 174 # convert 'stdout' to book format 153 ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq 175 if ($options:n == 0) 176 ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq 177 else 178 ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq -setword DBNAME $options:0 179 end 154 180 if ($VERBOSE > 2) 155 181 book listbook detPendingProcessedExp … … 158 184 # delete existing entries which are DONE 159 185 book delpage detPendingProcessedExp -key state DONE 186 book delpage detPendingProcessedExp -key state DATA_ERR 160 187 end 161 188 … … 192 219 book getword detPendingProcessedExp $pageName exp_tag -var EXP_TAG 193 220 book getword detPendingProcessedExp $pageName camera -var CAMERA 221 book getword detPendingProcessedExp $pageName workdir -var WORKDIR 222 book getword detPendingProcessedExp $pageName dbname -var DBNAME 223 set_standard_args 194 224 195 225 # specify choice of remote host: … … 200 230 end 201 231 202 # XXX this is still a lame rule 203 $word = `basename $EXP_TAG | tr '.' ' '` 204 list word -split $word 205 $base = $word:0 206 stdout $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.log 207 stderr $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.log 208 exec mkdir -p $LOGSUBDIR/$base 232 # XXX push this into the filerules? 233 $outroot = $WORKDIR/$EXP_TAG 234 $logfile = $outroot/$EXP_TAG.detproc.$DET_ID.log 235 stdout $logfile 236 stderr $logfile 237 exec mkdir -p $outroot 209 238 210 239 # save the pageName for future reference below … … 213 242 # create example job options as a demonstration 214 243 if ($VERBOSE > 1) 215 echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 216 end 217 command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 244 echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS 245 end 246 command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS 218 247 end 219 248 -
trunk/ippTasks/detrend.reject.pro
r11235 r11323 26 26 end 27 27 28 # this variable will cycle through the known database names 29 $detRejectExp_DB = 0 30 28 31 # select images ready for copy 29 32 # new entries are added to detRejectExp … … 40 43 41 44 task.exec 42 command dettool -residdetrun -limit 20 45 if ($DB:n == 0) 46 option DEFAULT 47 command dettool -residdetrun -limit 20 48 else 49 # save the DB name for the exit tasks 50 option $DB:$detRejectExp_DB 51 command dettool -residdetrun -limit 20 -dbname $DB:$detRejectExp_DB 52 $detRejectExp_DB ++ 53 if ($detRejectExp_DB >= $DB:n) set detRejectExp_DB = 0 54 end 43 55 end 44 56 … … 46 58 task.exit 0 47 59 # convert 'stdout' to book format 48 ipptool2book stdout detRejectExp -key det_id:iteration -uniq 60 ipptool2book stdout detRejectExp -key det_id:iteration -uniq -setword dbname $options:0 49 61 if ($VERBOSE > 2) 50 62 book listbook detRejectExp … … 53 65 # delete existing entries which are DONE 54 66 book delpage detRejectExp -key state DONE 67 book delpage detRejectExp -key state DATA_ERR 55 68 end 56 69 … … 87 100 book getword detRejectExp $pageName mode -var MODE 88 101 book getword detRejectExp $pageName camera -var CAMERA 102 book getword detRejectExp $pageName workdir -var WORKDIR 103 book getword detRejectExp $pageName dbname -var DBNAME 104 set_standard_args 89 105 90 106 # specify choice of remote host: … … 104 120 # create example job options as a demonstration 105 121 if ($VERBOSE > 1) 106 echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA 122 echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA $ARGS 107 123 end 108 command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA 124 command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA $ARGS 109 125 end 110 126 -
trunk/ippTasks/detrend.resid.pro
r11210 r11323 27 27 book listbook detPendingResidExp 28 28 end 29 30 # these variables will cycle through the known database names 31 $detPendingResidImfile_DB = 0 32 $detPendingResidExp_DB = 0 29 33 30 34 # select images ready for copy … … 42 46 43 47 task.exec 44 command dettool -toresidimfile -limit 20 48 if ($DB:n == 0) 49 option DEFAULT 50 command dettool -toresidimfile -limit 20 51 else 52 # save the DB name for the exit tasks 53 option $DB:$detPendingResidImfile_DB 54 command dettool -toresidimfile -limit 20 -dbname $DB:$detPendingResidImfile_DB 55 $detPendingResidImfile_DB ++ 56 if ($detPendingResidImfile_DB >= $DB:n) set detPendingResidImfile_DB = 0 57 end 45 58 end 46 59 … … 48 61 task.exit 0 49 62 # convert 'stdout' to book format 50 ipptool2book stdout detPendingResidImfile -key det_id:iteration:exp_tag:class_id -uniq 63 ipptool2book stdout detPendingResidImfile -key det_id:iteration:exp_tag:class_id -uniq -setword dbname $options:0 51 64 if ($VERBOSE > 2) 52 65 book listbook detPendingResidImfile … … 55 68 # delete existing entries which are DONE 56 69 book delpage detPendingResidImfile -key state DONE 70 book delpage detPendingResidImfile -key state DATA_ERR 57 71 end 58 72 … … 93 107 book getword detPendingResidImfile $pageName det_uri -var DET_URI 94 108 book getword detPendingResidImfile $pageName camera -var CAMERA 109 book getword detPendingResidImfile $pageName workdir -var WORKDIR 110 book getword detPendingResidImfile $pageName dbname -var DBNAME 111 set_standard_args 95 112 96 113 # specify choice of remote host: … … 114 131 # create command 115 132 if ($VERBOSE > 1) 116 echo command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE 117 end 118 command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE 133 echo command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE $ARGS 134 end 135 command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE $ARGS 119 136 end 120 137 … … 145 162 146 163 task.exec 147 command dettool -toresidexp -limit 20 164 if ($DB:n == 0) 165 option DEFAULT 166 command dettool -toresidexp -limit 20 167 else 168 # save the DB name for the exit tasks 169 option $DB:$detPendingResidExp_DB 170 command dettool -toresidexp -limit 20 -dbname $DB:$detPendingResidExp_DB 171 $detPendingResidExp_DB ++ 172 if ($detPendingResidExp_DB >= $DB:n) set detPendingResidExp_DB = 0 173 end 148 174 end 149 175 … … 151 177 task.exit 0 152 178 # convert 'stdout' to book format 153 ipptool2book stdout detPendingResidExp -key det_id:iteration:exp_tag -uniq 179 ipptool2book stdout detPendingResidExp -key det_id:iteration:exp_tag -uniq -setword dbname $options:0 154 180 if ($VERBOSE > 2) 155 181 book listbook detPendingResidExp … … 158 184 # delete existing entries which are DONE 159 185 book delpage detPendingResidExp -key state DONE 186 book delpage detPendingResidExp -key state DATA_ERR 160 187 end 161 188 … … 194 221 book getword detPendingResidExp $pageName include -var INCLUDE 195 222 book getword detPendingResidExp $pageName camera -var CAMERA 223 book getword detPendingResidExp $pageName workdir -var WORKDIR 224 book getword detPendingResidExp $pageName dbname -var DBNAME 225 set_standard_args 196 226 197 227 # specify choice of remote host: … … 215 245 # create example job options as a demonstration 216 246 if ($VERBOSE > 1) 217 echo command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 218 end 219 command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 247 echo command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA $ARGS 248 end 249 command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA $ARGS 220 250 end 221 251 -
trunk/ippTasks/detrend.stack.pro
r11210 r11323 26 26 end 27 27 28 # this variable will cycle through the known database names 29 $detPendingStackedImfile_DB = 0 30 28 31 # select images ready for detrend_stack.pl 29 32 # new entries are added to detPendingStackedImfile … … 40 43 41 44 task.exec 42 command dettool -tostacked -limit 20 45 if ($DB:n == 0) 46 option DEFAULT 47 command dettool -tostacked -limit 20 48 else 49 # save the DB name for the exit tasks 50 option $DB:$detPendingStackedImfile_DB 51 command dettool -tostacked -limit 20 -dbname $DB:$detPendingStackedImfile_DB 52 $detPendingStackedImfile_DB ++ 53 if ($detPendingStackedImfile_DB >= $DB:n) set detPendingStackedImfile_DB = 0 54 end 43 55 end 44 56 … … 46 58 task.exit 0 47 59 # convert 'stdout' to book format 48 ipptool2book stdout detPendingStackedImfile -key det_id:iteration:class_id -uniq 60 ipptool2book stdout detPendingStackedImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 49 61 if ($VERBOSE > 2) 50 62 book listbook detPendingStackedImfile … … 53 65 # delete existing entries which are DONE 54 66 book delpage detPendingStackedImfile -key state DONE 67 book delpage detPendingStackedImfile -key state DATA_ERR 55 68 end 56 69 … … 87 100 book getword detPendingStackedImfile $pageName class_id -var CLASS_ID 88 101 book getword detPendingStackedImfile $pageName camera -var CAMERA 102 book getword detPendingStackedImfile $pageName workdir -var WORKDIR 103 book getword detPendingStackedImfile $pageName dbname -var DBNAME 104 set_standard_args 89 105 90 106 # specify choice of remote host: … … 105 121 # create the command line 106 122 if ($VERBOSE > 1) 107 echo command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA 123 echo command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA $ARGS 108 124 end 109 command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA 125 command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA $ARGS 110 126 end 111 127 -
trunk/ippTasks/pantasks.pro
r11210 r11323 25 25 $EXIT_DATA_ERR = 5 26 26 27 # DB lists the database names in use; the default ipprc database 28 # is only used if DB:n is 0 27 29 $DB:n = 0 30 31 macro init.simtest.defDB 32 $LOGDIR = `ipp_datapath.pl path://SIMTEST` 33 $LOGDIR = $LOGDIR/logs 34 exec mkdir -p $LOGDIR 35 36 if ($parallel) 37 controller exit true 38 controller host add alala 39 end 40 end 28 41 29 42 macro init.simtest … … 109 122 end 110 123 124 macro set_standard_args 125 $ARGS = "" 126 if ("$DBNAME" != "DEFAULT") 127 $ARGS = $ARGS --dbname $DBNAME 128 end 129 if ("$WORKDIR" != "") 130 $ARGS = $ARGS --workdir $WORKDIR 131 else 132 echo WORKDIR not set 133 end 134 end 135 111 136 macro process_exit 112 137 if ($0 != 4) -
trunk/ippTasks/phase0.pro
r11236 r11323 28 28 end 29 29 30 $phase0_DB = 0 30 # these variables will cycle through the known database names 31 $p0PendingImfile_DB = 0 32 $p0PendingExp_DB = 0 31 33 32 34 # select images ready for phase0 analysis … … 39 41 periods -exec $loadexec 40 42 periods -timeout 30 41 42 # XXX test that this option works 43 # npending 1 43 npending 1 44 44 45 45 # silently drop stdout … … 48 48 49 49 # select entries from the current DB; cycle to the next DB, if it exists 50 # if the DB list is not set, use the value defined in .ipprc50 # iff the DB list is not set, use the value defined in .ipprc 51 51 task.exec 52 52 if ($DB:n == 0) 53 option DEFAULT 53 54 command p0tool -pendingimfile -limit 20 54 55 else 55 command p0tool -pendingimfile -limit 20 -dbname $DB:$phase0_DB 56 $phase0_DB ++ 57 if ($phase0_DB >= $DB:n) set phase0_DB = 0 56 # save the DB name for the exit tasks 57 option $DB:$p0PendingImfile_DB 58 command p0tool -pendingimfile -limit 20 -dbname $DB:$p0PendingImfile_DB 59 $p0PendingImfile_DB ++ 60 if ($p0PendingImfile_DB >= $DB:n) set p0PendingImfile_DB = 0 58 61 end 59 62 end … … 62 65 task.exit $EXIT_SUCCESS 63 66 # convert 'stdout' to book format 64 ipptool2book stdout p0PendingImfile -key exp_tag -uniq 67 ipptool2book stdout p0PendingImfile -key exp_tag -uniq -setword dbname $options:0 65 68 if ($VERBOSE > 2) 66 69 book listbook p0PendingImfile … … 105 108 book getword p0PendingImfile $pageName uri -var URI 106 109 book getword p0PendingImfile $pageName workdir -var WORKDIR 107 # book getword p0PendingImfile $pageName dbname -var DBNAME 110 book getword p0PendingImfile $pageName dbname -var DBNAME 111 set_standard_args 108 112 109 113 # specify choice of remote host … … 114 118 end 115 119 116 ## generate output log based on filerule 120 ## generate output log based on filerule XXX put this in a function? 117 121 $outroot = $WORKDIR/$EXP_TAG 118 122 $logfile = `ipp_filename.pl PHASE0.LOG $outroot $CLASS_ID` … … 126 130 # create the command line 127 131 if ($VERBOSE > 1) 128 echo command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI 129 end 130 command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI 132 echo command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI $ARGS 133 end 134 command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI $ARGS 131 135 end 132 136 … … 155 159 156 160 task.exec 157 command p0tool -pendingexp -limit 20 161 if ($DB:n == 0) 162 option DEFAULT 163 command p0tool -pendingexp -limit 20 164 else 165 # save the DB name for the exit tasks 166 option $DB:$p0PendingExp_DB 167 command p0tool -pendingexp -limit 20 -dbname $DB:$p0PendingExp_DB 168 $p0PendingExp_DB ++ 169 if ($p0PendingExp_DB >= $DB:n) set p0PendingExp_DB = 0 170 end 158 171 end 159 172 160 173 # success 161 task.exit 0174 task.exit $EXIT_SUCCESS 162 175 # convert 'stdout' to book format 163 ipptool2book stdout p0PendingExp -key exp_tag -uniq 176 ipptool2book stdout p0PendingExp -key exp_tag -uniq -setword dbname $options:0 164 177 if ($VERBOSE > 2) 165 178 book listbook p0PendingExp … … 200 213 book getword p0PendingExp $pageName exp_tag -var EXP_TAG 201 214 book getword p0PendingExp $pageName workdir -var WORKDIR 215 book getword p0PendingExp $pageName dbname -var DBNAME 216 set_standard_args 202 217 203 218 # specify choice of remote host:(need to choose based on chips) … … 220 235 # create the command line 221 236 if ($VERBOSE > 1) 222 echo command phase0_exp.pl --exp_tag $EXP_TAG 223 end 224 command phase0_exp.pl --exp_tag $EXP_TAG 237 echo command phase0_exp.pl --exp_tag $EXP_TAG $ARGS 238 end 239 command phase0_exp.pl --exp_tag $EXP_TAG $ARGS 225 240 end 226 241 -
trunk/ippTasks/phase2.pro
r11236 r11323 26 26 end 27 27 28 # this variable will cycle through the known database names 29 $phase2_DB = 0 30 28 31 # select images ready for phase2 analysis 29 32 # new entries are added to p2PendingImfile … … 40 43 41 44 task.exec 42 command p2tool -pendingimfile -limit 20 45 if ($DB:n == 0) 46 option DEFAULT 47 command p2tool -pendingimfile -limit 20 48 else 49 # save the DB name for the exit tasks 50 option $DB:$phase2_DB 51 command p2tool -pendingimfile -limit 20 -dbname $DB:$phase2_DB 52 $phase2_DB ++ 53 if ($phase2_DB >= $DB:n) set phase2_DB = 0 54 end 43 55 end 44 56 … … 46 58 task.exit 0 47 59 # convert 'stdout' to book format 48 ipptool2book stdout p2PendingImfile -key exp_tag:class_id -uniq 60 ipptool2book stdout p2PendingImfile -key exp_tag:class_id -uniq -setword dbname $options:0 49 61 if ($VERBOSE > 2) 50 62 book listbook p2PendingImfile … … 53 65 # delete existing entries which are DONE 54 66 book delpage p2PendingImfile -key state DONE 67 book delpage p2PendingImfile -key state DATA_ERR 55 68 end 56 69 … … 87 100 book getword p2PendingImfile $pageName class_id -var CLASS_ID 88 101 book getword p2PendingImfile $pageName uri -var URI 102 book getword p2PendingImfile $pageName workdir -var WORKDIR 103 book getword p2PendingImfile $pageName dbname -var DBNAME 104 set_standard_args 89 105 90 106 # specify choice of remote host … … 108 124 # create the command line 109 125 if ($VERBOSE > 1) 110 echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA 126 echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA $ARGS 111 127 end 112 command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA --workdir $WORKDIR128 command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA $ARGS 113 129 end 114 130 -
trunk/ippTasks/phase3.pro
r11210 r11323 26 26 end 27 27 28 # this variable will cycle through the known database names 29 $phase3_DB = 0 30 28 31 # select images ready for phase3 analysis 29 32 # new entries are added to p3PendingExp … … 40 43 41 44 task.exec 42 command p3tool -pendingexp -limit 20 45 if ($DB:n == 0) 46 option DEFAULT 47 command p3tool -pendingexp -limit 20 48 else 49 # save the DB name for the exit tasks 50 option $DB:$phase3_DB 51 command p3tool -pendingexp -limit 20 -dbname $DB:$phase3_DB 52 $phase3_DB ++ 53 if ($phase3_DB >= $DB:n) set phase3_DB = 0 54 end 43 55 end 44 56 … … 46 58 task.exit 0 47 59 # convert 'stdout' to book format 48 ipptool2book stdout p3PendingExp -key exp_tag -uniq 60 ipptool2book stdout p3PendingExp -key exp_tag -uniq -setword dbname $options:0 49 61 if ($VERBOSE > 2) 50 62 book listbook p3PendingExp … … 53 65 # delete existing entries which are DONE 54 66 book delpage p3PendingExp -key state DONE 67 book delpage p3PendingExp -key state DATA_ERR 55 68 end 56 69 … … 70 83 periods -poll $runpoll 71 84 periods -exec $runexec 72 periods -timeout 585 periods -timeout 10 73 86 74 87 task.exec … … 84 97 book getword p3PendingExp $pageName camera -var CAMERA 85 98 book getword p3PendingExp $pageName exp_tag -var EXP_TAG 99 book getword p3PendingExp $pageName workdir -var WORKDIR 100 book getword p3PendingExp $pageName dbname -var DBNAME 101 set_standard_args 86 102 87 103 # specify choice of remote host:(need to choose based on chips) … … 92 108 end 93 109 94 # XXX this is still a lame rule 95 $word = `basename $EXP_TAG | tr '.' ' '` 96 list word -split $word 97 $base = $word:0 98 stdout $LOGSUBDIR/$base/$EXP_TAG.log 99 stderr $LOGSUBDIR/$base/$EXP_TAG.log 100 exec mkdir -p $LOGSUBDIR/$base 110 # output log from filerule 111 $outroot = $WORKDIR/$EXP_TAG 112 $logfile = `ipp_filename.pl PHASE3.LOG $outroot $CLASS_ID` 113 stdout $logfile 114 stderr $logfile 115 exec mkdir -p $WORKDIR 101 116 102 117 # save the pageName for future reference below … … 105 120 # create the command line 106 121 if ($VERBOSE > 1) 107 echo command phase3.pl --exp_tag $EXP_TAG 122 echo command phase3.pl --exp_tag $EXP_TAG $ARGS 108 123 end 109 command phase3.pl --exp_tag $EXP_TAG --camera $CAMERA 124 command phase3.pl --exp_tag $EXP_TAG --camera $CAMERA $ARGS 110 125 end 111 126 112 127 # success 113 task.exit 0 114 # phase3exp.pl updates DB tables, here we just update the page 115 book setword p3PendingExp $options:0 state DONE 116 end 117 118 # default exit status 119 task.exit default 120 showcommand failure 121 book setword p3PendingExp $options:0 state FAIL 128 task.exit default 129 process_exit p3PendingExp $options:0 $JOB_STATUS 122 130 end 123 131
Note:
See TracChangeset
for help on using the changeset viewer.
