Changeset 16570
- Timestamp:
- Feb 21, 2008, 2:13:38 PM (18 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 4 added
- 1 deleted
- 4 edited
-
Makefile.am (modified) (1 diff)
-
automate.pro (modified) (6 diffs)
-
chiphosts.config (deleted)
-
chiphosts.manoa.config (added)
-
chiphosts.mhpcc.config (added)
-
pantasks.pro (modified) (3 diffs)
-
simtest.auto (modified) (6 diffs)
-
site.manoa.pro (added)
-
site.mhpcc.pro (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/Makefile.am
r16492 r16570 18 18 19 19 other_files = \ 20 chiphosts.config \ 20 chiphosts.manoa.config \ 21 chiphosts.mhpcc.config \ 22 site.manoa.pro \ 23 site.mhpcc.pro \ 24 simtest.auto \ 21 25 simtest.det \ 22 26 isp.det -
trunk/ippTasks/automate.pro
r16492 r16570 26 26 end 27 27 queueload tmp -x "cat $MODULES:0/$1" 28 ipptool2book tmp automate -key name -uniq -setword pantaskState INIT 28 ipptool2book tmp automate -key name -uniq -setword pantaskState INIT.BLOCK 29 29 queuedelete tmp 30 30 end 31 31 32 $automate_Ncheck = 0 33 34 task automate.check 32 $automate_Nblock = -1 33 task automate.block 35 34 host local 36 35 37 36 periods -poll 1 38 periods -exec 1037 periods -exec 5 39 38 periods -timeout 30 40 39 active true … … 42 41 43 42 task.exec 44 local N Npage pageName43 local Npage pageName 45 44 46 45 # how many pages are waiting to be started? 47 book npages automate -var N -key pantaskState INIT 48 if ($N == 0) break 49 50 # total number of pages in book 51 book npages automate -var Npage 52 53 $automate_Ncheck ++ 54 if ($automate_Ncheck >= $Npage) set automate_Ncheck = 0 55 56 # search the automate book for an entry which is unstarted (state INIT) 57 book getpage automate $automate_Ncheck -var pageName -key pantaskState INIT 58 if ("$pageName" == "NULL") break 46 book npages automate -var Npage -key pantaskState INIT.BLOCK 47 if ($Npage == 0) 48 echo "no entries in INIT.BLOCK state" 49 break 50 end 51 52 # cycle over the number of INIT.BLOCK pages: no point to loop over the others 53 $automate_Nblock ++ 54 if ($automate_Nblock >= $Npage) set automate_Nblock = 0 55 echo "automate.block $automate_Nblock" 56 57 # search the automate book for an entry which is unstarted (state INIT.BLOCK) 58 book getpage automate $automate_Nblock -var pageName -key pantaskState INIT.BLOCK 59 if ("$pageName" == "NULL") 60 echo "entry $automate_Nblock not in INIT.BLOCK state" 61 break 62 end 59 63 60 book getword automate $pageName check -var checkCommand 61 if (("$checkCommand" == "NULL") || ("$checkCommand" == "NONE")) 62 # if there is no check needed, we can immediate progress to READY 63 book setword automate $pageName pantaskState READY 64 break 65 end 66 67 book setword automate $pageName pantaskState CHECK 64 book getword automate $pageName block -var blockCommand 65 if (("$blockCommand" == "NULL") || ("$blockCommand" == "NONE")) 66 # if there is no block needed, we can immediate progress to the next stage (INIT.CHECK) 67 book setword automate $pageName pantaskState INIT.CHECK 68 echo "$pageName is ready : INIT.CHECK" 69 break 70 end 71 72 book setword automate $pageName pantaskState RUN.BLOCK 68 73 69 74 if ($VERBOSE >= 1) 70 echo "starting automate check for $pageName"71 echo "command $ checkCommand"75 echo "starting automate block for $pageName" 76 echo "command $blockCommand" 72 77 end 73 78 74 79 options $pageName 75 command $ checkCommand80 command $blockCommand 76 81 end 77 82 … … 80 85 81 86 $pageName = $options:0 87 88 echo "complete $pageName test, checking results" 82 89 83 90 # convert 'stdout' to book format … … 88 95 end 89 96 97 # if the block test returns any valid pages (valid results), the block is set, don't move to check 90 98 book npages detExp -var Npage 91 if ($Npage == 0) break 92 93 # we should have launched only a single detRun 94 book setword automate $pageName pantaskState READY 99 if ($Npage == 0) 100 echo "$pageName is not blocked, ready for CHECK" 101 book setword automate $pageName pantaskState INIT.CHECK 102 else 103 echo "$pageName is blocked, not ready for CHECK" 104 book setword automate $pageName pantaskState INIT.BLOCK 105 end 95 106 96 107 # drop the detExt book after we've grabbed the state 97 108 book delete detExp 98 109 end 99 end 100 101 $automate_Nlaunch = 0 102 103 task automate.launch 110 111 # all failures here (what state?) 112 task.exit default 113 showcommand failure 114 end 115 116 # operation times out? 117 task.exit timeout 118 showcommand timeout 119 end 120 end 121 122 $automate_Ncheck = -1 123 task automate.check 104 124 host local 105 125 106 126 periods -poll 1 107 periods -exec 10127 periods -exec 5 108 128 periods -timeout 30 109 129 active true … … 111 131 112 132 task.exec 113 local N Npage pageName133 local Npage pageName 114 134 115 135 # how many pages are waiting to be started? 116 book npages automate -var N -key pantaskState READY 117 if ($N == 0) break 118 119 # total number of pages in book 120 book npages automate -var Npage 121 136 book npages automate -var Npage -key pantaskState INIT.CHECK 137 if ($Npage == 0) 138 echo "no entries in INIT.CHECK state" 139 break 140 end 141 142 # cycle over the number of INIT.CHECK pages: no point to loop over the others 143 $automate_Ncheck ++ 144 if ($automate_Ncheck >= $Npage) set automate_Ncheck = 0 145 echo "automate.check $automate_Ncheck" 146 147 # search the automate book for an entry which is unstarted (state INIT.CHECK) 148 book getpage automate $automate_Ncheck -var pageName -key pantaskState INIT.CHECK 149 if ("$pageName" == "NULL") 150 echo "entry $automate_Ncheck not in INIT.CHECK state" 151 break 152 end 153 154 book getword automate $pageName check -var checkCommand 155 if (("$checkCommand" == "NULL") || ("$checkCommand" == "NONE")) 156 # if there is no check needed, we can immediate progress to the next stage (INIT.LAUNCH) 157 book setword automate $pageName pantaskState INIT.LAUNCH 158 echo "$pageName is ready : INIT.LAUNCH" 159 break 160 end 161 162 book setword automate $pageName pantaskState RUN.CHECK 163 164 if ($VERBOSE >= 1) 165 echo "starting automate check for $pageName" 166 echo "command $checkCommand" 167 end 168 169 options $pageName 170 command $checkCommand 171 end 172 173 task.exit $EXIT_SUCCESS 174 local pageName Npage 175 176 $pageName = $options:0 177 178 echo "complete $pageName test, checking results" 179 180 # convert 'stdout' to book format 181 # XXX to use other tests, we'll need to modify this 182 ipptool2book stdout detExp -key det_id -uniq 183 if ($VERBOSE > 2) 184 book listbook detExp 185 end 186 187 book npages detExp -var Npage 188 if ($Npage == 0) 189 echo "$pageName not ready for LAUNCH" 190 book setword automate $pageName pantaskState INIT.CHECK 191 else 192 echo "$pageName is ready for LAUNCH" 193 book setword automate $pageName pantaskState INIT.LAUNCH 194 end 195 196 # drop the detExt book after we've grabbed the state 197 book delete detExp 198 end 199 200 # all failures here (what state?) 201 task.exit default 202 showcommand failure 203 end 204 205 # operation times out? 206 task.exit timeout 207 showcommand timeout 208 end 209 end 210 211 $automate_Nlaunch = 0 212 task automate.launch 213 host local 214 215 periods -poll 1 216 periods -exec 5 217 periods -timeout 30 218 active true 219 npending 1 220 221 task.exec 222 local Npage pageName 223 224 # how many pages are waiting to be started? 225 book npages automate -var Npage -key pantaskState INIT.LAUNCH 226 if ($Npage == 0) 227 echo "no entries in INIT.LAUNCH state" 228 break 229 end 230 231 # cycle over the number of INIT.LAUNCH pages: no point to loop over the others 122 232 $automate_Nlaunch ++ 123 233 if ($automate_Nlaunch >= $Npage) set automate_Nlaunch = 0 124 125 # search the automate book for an entry which is ready (state READY) 126 book getpage automate $automate_Nlaunch -var pageName -key pantaskState READY 127 if ("$pageName" == "NULL") break 234 echo "automate.launch $automate_Nlaunch" 235 236 # search the automate book for an entry which is unstarted (state INIT.LAUNCH) 237 book getpage automate $automate_Nlaunch -var pageName -key pantaskState INIT.LAUNCH 238 if ("$pageName" == "NULL") 239 echo "entry $automate_Nlaunch not in INIT.LAUNCH state" 240 break 241 end 128 242 129 243 book getword automate $pageName launch -var launchCommand 130 244 if (("$launchCommand" == "NULL") || ("$launchCommand" == "NONE")) 131 # if there is no launch needed, we can immediate progress to READY 132 book setword automate $pageName pantaskState DONE 133 break 134 end 135 136 book setword automate $pageName pantaskState LAUNCH 245 # if there is no launch needed, we can immediate progress to the next stage (INIT.LAUNCH) 246 book setword automate $pageName pantaskState INIT.LAUNCH 247 echo "$pageName is ready : INIT.LAUNCH" 248 break 249 end 250 251 book setword automate $pageName pantaskState RUN.LAUNCH 137 252 138 253 if ($VERBOSE >= 1) … … 146 261 147 262 task.exit $EXIT_SUCCESS 148 local pageName 263 local pageName Npage 149 264 150 265 $pageName = $options:0 151 266 152 # we should have launched only a single detRun 153 book setword automate $pageName pantaskState DONE 154 end 155 end 267 echo "completed $pageName launch" 268 book setword automate $pageName pantaskState DONE.LAUNCH 269 end 270 271 # all failures here (what state?) 272 task.exit default 273 showcommand failure 274 end 275 276 # operation times out? 277 task.exit timeout 278 showcommand timeout 279 end 280 end 281 -
trunk/ippTasks/pantasks.pro
r16369 r16570 66 66 end 67 67 68 macro init.cluster.po69 $PARALLEL = 170 controller exit true71 72 # po05 -- using for pantasks73 # po23 -- broken perl74 75 controller host add po0276 controller host add po0377 controller host add po0478 # controller host add po0579 controller host add po0680 controller host add po0781 # controller host add po0882 # controller host add po0983 # controller host add po1084 # controller host add po1185 # controller host add po1286 # controller host add po1387 # controller host add po1488 # controller host add po1589 # controller host add po1690 # controller host add po1791 # controller host add po1892 # controller host add po1993 # controller host add po2094 # controller host add po2195 # controller host add po2296 # controller host add po2397 # controller host add po2498 end99 100 macro init.cluster.sn101 $PARALLEL = 1102 controller exit true103 controller host add sn2104 controller host add sn3105 controller host add sn4106 controller host add sn5107 end108 109 68 macro init.isp 110 69 list DB -add isp … … 113 72 macro init.essence 114 73 list DB -add essence_v2 115 end116 117 macro init.cluster.mhpcc118 $PARALLEL = 1119 controller exit true120 controller host add ipp005121 controller host add ipp006122 controller host add ipp007123 controller host add ipp008124 controller host add ipp009125 controller host add ipp010126 controller host add ipp011127 controller host add ipp016128 controller host add ipp020129 controller host add ipp021130 end131 132 macro init.copy.mhpcc133 if ($0 != 2)134 echo "USAGE: init.copy.mhpcc (nebulous)"135 echo "nebulous may be 'on' or 'off'"136 break137 end138 139 if (("$1" != "on") && ("$1" != "off"))140 echo "USAGE: init.copy.mhpcc (nebulous)"141 echo "nebulous may be 'on' or 'off'"142 break143 end144 145 # the templates are used if we have a class_id/host relationship;146 # if none is found, the default values are used147 # XXX not sure how to handle the .N value if we need to use more than one148 # XXX this stuff should all be placed in a 'site' config file149 150 $COMPRESS = 1151 152 if ("$1" == "on")153 $NEBULOUS = 1154 $default_host = ipp004155 $workdir_template = neb://@HOST@.0156 else157 $NEBULOUS = 0158 $default_host = ipp004159 $workdir_template = /data/@HOST@.0160 end161 74 end 162 75 … … 467 380 end 468 381 469 macro load.chiphost.table470 queueload tmp -x "cat $MODULES:0/chiphosts.config"471 ipptool2book tmp chiphosts -key camera472 end473 474 382 macro check.globals 475 383 if ($?NETWORK == 0) -
trunk/ippTasks/simtest.auto
r16492 r16570 4 4 automate METADATA 5 5 name STR BIAS 6 block STR "dettool -runs -det_type BIAS -dbname eamtest" 6 7 check STR NONE 7 8 launch STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type BIAS -select_exp_type BIAS -dbname eamtest" … … 10 11 automate METADATA 11 12 name STR DARK 13 block STR "dettool -runs -det_type DARK -dbname eamtest" 12 14 check STR "detselect -search -inst SIMTEST -det_type BIAS -dbname eamtest" 13 15 launch STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type DARK -select_exp_type DARK -dbname eamtest" 14 16 END 15 17 16 18 automate METADATA 17 19 name STR SHUTTER 20 block STR "dettool -runs -det_type SHUTTER -dbname eamtest" 18 21 check STR "detselect -search -inst SIMTEST -det_type DARK -dbname eamtest" 19 22 launch STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type SHUTTER -filter r -select_exp_type FLAT -select_filter r -dbname eamtest" … … 22 25 automate METADATA 23 26 name STR FLAT-r 27 block STR "dettool -runs -det_type FLAT -filter r -dbname eamtest" 24 28 check STR "detselect -search -inst SIMTEST -det_type SHUTTER -dbname eamtest" 25 29 launch STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type FLAT -filter r -select_exp_type FLAT -select_filter r -dbname eamtest" … … 28 32 automate METADATA 29 33 name STR FLAT-i 34 block STR "dettool -runs -det_type FLAT -filter i -dbname eamtest" 30 35 check STR "detselect -search -inst SIMTEST -det_type SHUTTER -dbname eamtest" 31 36 launch STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type FLAT -filter i -select_exp_type FLAT -select_filter i -dbname eamtest" … … 34 39 automate METADATA 35 40 name STR OBJECT-r 41 block STR "chiptool -block -label object.r -dbname eamtest" 36 42 check STR "detselect -search -inst SIMTEST -det_type FLAT -dbname eamtest -filter r" 37 43 launch STR "chiptool -unblock -label object.r -dbname eamtest" … … 40 46 automate METADATA 41 47 name STR OBJECT-i 48 block STR "chiptool -block -label object.i -dbname eamtest" 42 49 check STR "detselect -search -inst SIMTEST -det_type FLAT -dbname eamtest -filter i" 43 50 launch STR "chiptool -unblock -label object.i -dbname eamtest"
Note:
See TracChangeset
for help on using the changeset viewer.
