Changeset 10692 for trunk/ippTasks/detrend.process.pro
- Timestamp:
- Dec 12, 2006, 11:58:21 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.process.pro (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.process.pro
r10542 r10692 22 22 end 23 23 24 $DetrendProcessImfileFail = 0 25 $DetrendProcessExpFail = 0 26 27 if ($?VERBOSE == 0) 28 echo "VERBOSE not defined: load pantasks.pro first" 29 break 30 end 31 if ($?LOGDIR == 0) 32 echo "LOGDIR not defined: load pantasks.pro first" 33 break 34 end 35 $LOGSUBDIR = $LOGDIR/detrend 36 exec mkdir -p $LOGSUBDIR 37 38 macro detproc.status 39 queueprint DetrendProcessImfiles 40 queueprint DetrendProcessExposures 41 echo "DetrendProcessImfileFail: $DetrendProcessImfileFail" 42 echo "DetrendProcessExpFail: $DetrendProcessExpFail" 43 end 44 24 45 # select images ready for copy 25 46 # new entries are added to queue DetrendProcessImfiles 26 47 # compare the new list with the ones already selected 27 48 task dettool.process.load 28 command dettool -toprocessedimfile -simple29 49 host local 30 50 … … 33 53 periods -timeout 30 34 54 35 stdout dettool.process.log 36 stderr dettool.process.log 55 stdout $LOGSUBDIR/detproc.imfile.log 56 stderr $LOGSUBDIR/detproc.imfile.log 57 58 task.exec 59 command dettool -toprocessedimfile -simple -limit {$DetrendProcessImfileFail + 20} 60 end 37 61 38 62 # success … … 47 71 for i 0 $Nqueue 48 72 queuepop stdout -var line 73 if ($VERBOSE > 2) 74 echo $line 75 end 49 76 list word -split $line 50 77 $DET_ID = $word:0 … … 64 91 # error 65 92 task.exit default 66 echo "detrend.process: failure" 93 if ($VERBOSE) 94 echo "detrend.process: failure" 95 end 67 96 end 68 97 69 98 # operation times out? 70 99 task.exit timeout 71 echo "detrend.process: timeout" 100 if ($VERBOSE) 101 echo "detrend.process: timeout" 102 end 72 103 end 73 104 end … … 105 136 $CAMERA = $word:6 106 137 107 $LOG_DIR = `dirname $URI` 108 stdout $WORKDIR/$LOG_DIR/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 109 stderr $WORKDIR/$LOG_DIR/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 138 $word = `basename $EXP_TAG | tr '.' ' '` 139 list word -split $word 140 $base = $word:0 141 stdout $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 142 stderr $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 143 exec mkdir -p $LOGSUBDIR/$base 110 144 111 145 # specify choice of remote host: … … 118 152 # create example job options as a demonstration 119 153 options "$line" 120 echo command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI --camera $CAMERA 154 if ($VERBOSE > 1) 155 echo command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI --camera $CAMERA 156 end 121 157 command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI --camera $CAMERA 122 158 end … … 130 166 # default exit status 131 167 task.exit default 132 echo "failure detrend_process_imfile.pl $options:0" 168 if ($VERBOSE) 169 echo "failure detrend_process_imfile.pl $options:0" 170 end 133 171 queuepush DetrendProcessImfiles -replace -key 1:3:5 "FAIL $options:0" 172 $DetrendProcessImfileFail ++ 134 173 end 135 174 136 175 # operation times out? 137 176 task.exit timeout 138 echo "timeout detrend_process_imfile.pl $options:0" 139 queuepush DetrendProcessImfiles -replace -key 1:3:5 "TIMEOUT $options:0" 140 end 177 if ($VERBOSE) 178 echo "timeout detrend_process_imfile.pl $options:0" 179 end 180 queuepush DetrendProcessImfiles -replace -key 1:3:5 "TIMEOUT $options:0" 181 $DetrendProcessImfileFail ++ 182 end 141 183 end 142 184 … … 145 187 # compare the new list with the ones already selected 146 188 task dettool.processexp.load 147 command dettool -toprocessedexp -simple148 189 host local 149 190 … … 152 193 periods -timeout 30 153 194 154 stdout dettool.processexp.log 155 stderr dettool.processexp.log 195 stdout $LOGSUBDIR/detproc.exp.log 196 stderr $LOGSUBDIR/detproc.exp.log 197 198 task.exec 199 command dettool -toprocessedexp -simple -limit {$DetrendProcessExpFail + 20} 200 end 156 201 157 202 # success … … 166 211 for i 0 $Nqueue 167 212 queuepop stdout -var line 213 if ($VERBOSE > 2) 214 echo $line 215 end 168 216 list word -split $line 169 217 $DET_ID = $word:0 … … 181 229 # error 182 230 task.exit default 183 echo "detrend.process: failure" 231 if ($VERBOSE) 232 echo "detrend.process: failure" 233 end 184 234 end 185 235 186 236 # operation times out? 187 237 task.exit timeout 188 echo "detrend.process: timeout" 238 if ($VERBOSE) 239 echo "detrend.process: timeout" 240 end 189 241 end 190 242 end … … 210 262 queuepush DetrendProcessExposures -replace -key 1:2:4 "RUN $line" 211 263 212 213 264 list word -split $line 214 265 $DET_ID = $word:0 … … 218 269 $CAMERA = $word:4 219 270 220 # XXX need the classID in dettool -toprocessedexp -simple output 221 $CLASS_ID = isp 222 stdout $EXP_TAG.detproc.$DET_ID.log 223 stderr $EXP_TAG.detproc.$DET_ID.log 271 # XXX this is still a lame rule 272 $word = `basename $EXP_TAG | tr '.' ' '` 273 list word -split $word 274 $base = $word:0 275 276 stdout $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.log 277 stderr $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.log 278 exec mkdir -p $LOGSUBDIR/$base 224 279 225 280 # specify choice of remote host: … … 232 287 # create example job options as a demonstration 233 288 options "$line" 234 echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 289 if ($VERBOSE > 1) 290 echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 291 end 235 292 command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 236 293 end … … 243 300 # default exit status 244 301 task.exit default 302 if ($VERBOSE) 303 echo "failure for detrend_process_exp.pl: $options:0" 304 end 245 305 queuepush DetrendProcessExposures -replace -key 1:2:4 "FAIL $options:0" 306 $DetrendProcessExpFail ++ 246 307 end 247 308 248 309 # operation times out? 249 310 task.exit timeout 311 if ($VERBOSE) 312 echo "failure for detrend_process_exp.pl: $options:0" 313 end 250 314 queuepush DetrendProcessExposures -replace -key 1:2:4 "TIMEOUT $options:0" 251 end 252 end 315 $DetrendProcessExpFail ++ 316 end 317 end
Note:
See TracChangeset
for help on using the changeset viewer.
