Changeset 37281
- Timestamp:
- Aug 21, 2014, 3:37:50 PM (12 years ago)
- File:
-
- 1 edited
-
tags/ipp-pv3-20140717/ippTasks/remote.pro (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-pv3-20140717/ippTasks/remote.pro
r36972 r37281 5 5 # define chips 6 6 7 book init remotePrepCompRuns 7 8 book init remotePrepRuns 8 9 book init remoteExecRuns … … 10 11 11 12 $remote_label_iter = 0 12 $remote_label_ iter2= 013 $remote_label_warp = 0 13 14 $remote_stage_iter = 0 14 $remoteP_DB = 0 15 $remoteE_DB = 0 16 $remoteL_DB = 0 15 16 $remoteDefine_DB = 0 17 $remoteDefineWarp_DB = 0 18 $remotePrepComp_DB = 0 19 $remotePrep_DB = 0 20 $remoteExec_DB = 0 21 $remotePoll_DB = 0 17 22 18 23 list STAGES … … 30 35 active false 31 36 end 37 task remote.prepcomp.load 38 active false 39 end 40 task remote.prepcomp.run 41 active false 42 end 32 43 task remote.prep.load 33 44 active false … … 57 68 active true 58 69 end 70 task remote.prepcomp.load 71 active true 72 end 73 task remote.prepcomp.run 74 active true 75 end 59 76 task remote.prep.load 60 77 active true … … 76 93 end 77 94 end 78 79 95 80 96 task remote.define … … 84 100 periods -timeout 30 85 101 npending 1 102 active true 86 103 87 104 task.exec … … 94 111 $remote_stage_iter ++ 95 112 113 # loop over all stages x all labels 96 114 if ($remote_stage_iter >= $STAGES:n) 97 115 set remote_stage_iter = 0 … … 101 119 end 102 120 121 # min entry limit? 103 122 $run = remotetool -definebyquery -label $label -stage $stage -path_base neb://@HOST@.0/remote/$label -limit 500 104 123 if ($DB:n == 0) 105 124 option DEFAULT 106 125 else 107 option $DB:$remote P_DB108 $run = $run -dbname $DB:$remote P_DB109 $remote P_DB ++110 if ($remote P_DB >= $DB:n) set remoteP_DB = 0126 option $DB:$remoteDefine_DB 127 $run = $run -dbname $DB:$remoteDefine_DB 128 $remoteDefine_DB ++ 129 if ($remoteDefine_DB >= $DB:n) set remoteDefine_DB = 0 111 130 end 112 131 … … 137 156 periods -timeout 30 138 157 npending 1 158 active false 139 159 140 160 task.exec … … 142 162 stderr $LOGDIR/remote.define.chip 143 163 144 $label = $LABEL:$remote_label_ iter2145 146 if ($remote_label_ iter >= $LABEL:n) set remote_label_iter= 0147 echo $remote_label_iter$label warp164 $label = $LABEL:$remote_label_warp 165 166 if ($remote_label_warp >= $LABEL:n) set remote_label_warp = 0 167 echo $remote_label_warp $label warp 148 168 149 169 $run = remotetool -definebyquery -label $label -stage warp -path_base neb://@HOST@.0/remote/$label -limit 500 … … 151 171 option DEFAULT 152 172 else 153 option $DB:$remote P_DB154 $run = $run -dbname $DB:$remote P_DB155 $remote P_DB ++156 if ($remote P_DB >= $DB:n) set remoteP_DB = 0173 option $DB:$remoteDefineWarp_DB 174 $run = $run -dbname $DB:$remoteDefineWarp_DB 175 $remoteDefineWarp_DB ++ 176 if ($remoteDefineWarp_DB >= $DB:n) set remoteDefineWarp_DB = 0 157 177 end 158 178 … … 161 181 162 182 end 163 # success 183 184 # success 164 185 task.exit 0 165 186 end … … 174 195 task.exit timeout 175 196 showcommand timeout 197 end 198 end 199 200 task remote.prepcomp.load 201 host local 202 periods -poll $LOADPOLL 203 periods -exec 30 204 npending 1 205 active true 206 207 task.exec 208 stdout NULL 209 stderr $LOGDIR/remote.prepcomp.load 210 211 $run = remotetool -listcomponent -state new 212 213 if ($DB:n == 0) 214 option DEFAULT 215 else 216 option $DB:$remotePrepComp_DB 217 $run = $run -dbname $DB:$remotePrepComp_DB 218 $remotePrepComp_DB ++ 219 if ($remotePrepComp_DB >= $DB:n) set remotePrepComp_DB = 0 220 end 221 222 add_poll_args run 223 add_poll_labels run 224 command $run 225 end 226 227 # success 228 task.exit 0 229 ipptool2book stdout remotePrepCompRuns -uniq -key remote_id:stage_id -setword dbname $options:0 -setword pantaskState INIT 230 process_cleanup remotePrepCompRuns 231 232 if ($VERBOSE > 2) 233 book listbook remotePrepCompRuns 234 end 235 end 236 # locked list 237 task.exit default 238 showcommand failure 239 end 240 task.exit crash 241 showcommand crash 242 end 243 #operation times out? 244 task.exit timeout 245 showcommand timeout 246 end 247 end 248 249 # run the prep component operations in parallel 250 task remote.prepcomp.run 251 host anyhost 252 periods -poll $LOADPOLL 253 periods -exec $LOADEXEC 254 periods -timeout 600 255 active true 256 npending 10 257 258 task.exec 259 stdout $LOGDIR/remote.prepcomp.run 260 stderr $LOGDIR/remote.prepcomp.run 261 262 book npages remotePrepCompRuns -var N 263 if ($N == 0) break 264 if ($NETWORK == 0) break 265 266 book getpage remotePrepCompRuns 0 -var pageName -key pantaskState INIT 267 if ("$pageName" == "NULL") break 268 269 book setword remotePrepCompRuns $pageName pantaskState RUN 270 book getword remotePrepCompRuns $pageName remote_id -var REMOTE_ID 271 book getword remotePrepCompRuns $pageName stage_id -var STAGE_ID 272 book getword remotePrepCompRuns $pageName stage -var STAGE 273 book getword remotePrepCompRuns $pageName run_path_base -var RUN_PATH_BASE 274 book getword remotePrepCompRuns $pageName dbname -var DBNAME 275 276 sprintf outroot "%s/remote_%s.%s/stage_%s" $RUN_PATH_BASE $STAGE $REMOTE_ID $STAGE_ID 277 278 if ("$STAGE" == "chip") 279 $command = sc_prepare_chip.pl --camera GPC1 --chip_id $STAGE_ID --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 280 end 281 if ("$STAGE" == "camera") 282 $command = sc_prepare_camera.pl --camera GPC1 --stage_id $STAGE_ID --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 283 echo "skipping camera until scripts are ready" 284 break 285 end 286 if ("$STAGE" == "warp") 287 $command = sc_prepare_warp.pl --camera GPC1 --stage_id $STAGE_ID --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 288 echo "skipping warp until scripts are ready" 289 break 290 end 291 if ("$STAGE" == "stack") 292 $command = sc_prepare_stack.pl --camera GPC1 --stage_id $STAGE_ID --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 293 echo "skipping stack until scripts are ready" 294 break 295 end 296 297 options $pageName 298 command $command 299 end 300 301 # default exit status 302 task.exit default 303 process_exit remotePrepCompRuns $options:0 $JOB_STATUS 304 end 305 # locked list 306 task.exit crash 307 process_exit remotePrepCompRuns $options:0 $EXIT_CRASH_ERR 308 end 309 310 # operation timed out? 311 task.exit timeout 312 showcommand timeout 313 book setword remotePrepCompRuns $options:0 pantaskState TIMEOUT 176 314 end 177 315 end … … 181 319 periods -poll $LOADPOLL 182 320 periods -exec 30 321 active false 183 322 npending 1 184 323 … … 187 326 stderr $LOGDIR/remote.prep.load 188 327 189 $run = remotetool -listrun -state new 328 $run = remotetool -listrun -state new -done-prep 190 329 191 330 if ($DB:n == 0) 192 331 option DEFAULT 193 332 else 194 option $DB:$remoteP _DB195 $run = $run -dbname $DB:$remoteP _DB196 $remoteP _DB ++197 if ($remoteP _DB >= $DB:n) set remoteP_DB = 0333 option $DB:$remotePrep_DB 334 $run = $run -dbname $DB:$remotePrep_DB 335 $remotePrep_DB ++ 336 if ($remotePrep_DB >= $DB:n) set remotePrep_DB = 0 198 337 end 199 338 … … 201 340 command $run 202 341 end 342 203 343 # success 204 344 task.exit 0 … … 229 369 periods -exec $LOADEXEC 230 370 periods -timeout 600000 231 active true371 active false 232 372 npending 10 233 373 … … 247 387 book getword remotePrepRuns $pageName stage -var STAGE 248 388 book getword remotePrepRuns $pageName path_base -var PATH_BASE 249 # book getword remotePrepRuns $pageName label -var LABEL389 # book getword remotePrepRuns $pageName label -var LABEL 250 390 book getword remotePrepRuns $pageName dbname -var DBNAME 251 391 252 392 sprintf outroot "%s/remote_%s.%s" $PATH_BASE $STAGE $REMOTE_ID 253 393 254 if ("$STAGE" == "chip") 255 $command = sc_prepare_chip.pl --camera GPC1 --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 256 end 257 if ("$STAGE" == "camera") 258 $command = sc_prepare_camera.pl --camera GPC1 --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 259 end 260 if ("$STAGE" == "warp") 261 $command = sc_prepare_warp.pl --camera GPC1 --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 262 end 263 if ("$STAGE" == "stack") 264 $command = sc_prepare_stack.pl --camera GPC1 --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 265 end 394 $command = sc_prepare_run.pl --camera GPC1 --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME 266 395 267 396 options $pageName … … 290 419 periods -poll $LOADPOLL 291 420 periods -exec $LOADEXEC 421 active false 292 422 npending 1 293 423 … … 303 433 option DEFAULT 304 434 else 305 option $DB:$remoteE _DB306 $run = $run -dbname $DB:$remoteE _DB307 $remoteE _DB ++308 if ($remoteE _DB >= $DB:n) set remoteE_DB = 0435 option $DB:$remoteExec_DB 436 $run = $run -dbname $DB:$remoteExec_DB 437 $remoteExec_DB ++ 438 if ($remoteExec_DB >= $DB:n) set remoteExec_DB = 0 309 439 end 310 440 … … 340 470 periods -exec 30 341 471 periods -timeout 6000000 342 active true472 active false 343 473 npending 3 344 474 … … 391 521 periods -poll $LOADPOLL 392 522 periods -exec $LOADEXEC 523 active false 393 524 npending 1 394 525 … … 403 534 option DEFAULT 404 535 else 405 option $DB:$remote L_DB406 $run = $run -dbname $DB:$remote L_DB407 $remote L_DB ++408 if ($remote L_DB >= $DB:n) set remoteL_DB = 0536 option $DB:$remotePoll_DB 537 $run = $run -dbname $DB:$remotePoll_DB 538 $remotePoll_DB ++ 539 if ($remotePoll_DB >= $DB:n) set remotePoll_DB = 0 409 540 end 410 541 … … 440 571 periods -exec 30 441 572 periods -timeout 6000000 442 active true573 active false 443 574 npending 3 444 575
Note:
See TracChangeset
for help on using the changeset viewer.
