Changeset 29659
- Timestamp:
- Nov 3, 2010, 6:28:17 PM (16 years ago)
- Location:
- tags/ipp-20101029
- Files:
-
- 2 edited
-
ippScripts/scripts/automate_stacks.pl (modified) (7 diffs)
-
ippTasks/nightly_stacks.pro (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20101029/ippScripts/scripts/automate_stacks.pl
r29266 r29659 1267 1267 my $stack_done_sth = "SELECT * from stackRun LEFT JOIN stackSumSkyfile USING(stack_id) WHERE $where "; 1268 1268 $stack_done_sth .= " AND ((state = 'full') OR (state = 'new' && fault != 0)) "; 1269 1269 if ($debug == 1) { 1270 print STDERR "post_stack_queue: database queries:\n"; 1271 print STDERR "$stack_full_sth\n"; 1272 print STDERR "$stack_done_sth\n"; 1273 } 1270 1274 my $stack_full_ref = $db->selectall_arrayref( $stack_full_sth ); 1271 1275 my $stack_done_ref = $db->selectall_arrayref( $stack_done_sth ); … … 1281 1285 if ($stackable_list{$target} == 1) { 1282 1286 my ($Nstacks, $Nattempted) = post_stack_queue($date,$target); 1287 if ($debug == 1) { 1288 print STDERR "confirm_stacks: Target $target on $date has $Nattempted attempts on $Nstacks.\n"; 1289 } 1283 1290 if ($Nstacks != $Nattempted) { 1284 1291 if ($debug == 1) { 1285 print STDERR "confirm_stacks: Target $target on $date is not done stacking. $Nstacks $Nattempted\n" 1292 print STDERR "confirm_stacks: Target $target on $date is not done stacking. $Nstacks $Nattempted\n"; 1286 1293 } 1287 1294 if ($metadata_out{nsState} eq 'CONFIRM_STACKING') { 1288 1295 $metadata_out{nsState} = 'STACKING'; 1289 1296 } 1290 1297 next; 1298 } 1299 if ($Nstacks == 0) { 1300 if ($debug == 1) { 1301 print STDERR "confirm_stacks: Target $target on $date has no stacks. Skipping.\n"; 1302 } 1291 1303 next; 1292 1304 } … … 1307 1319 ################################################################################ 1308 1320 1321 sub verify_uniqueness_diff { 1322 my $warp_id_1 = shift; 1323 my $warp_id_2 = shift; 1324 my $date = shift; 1325 my $target = shift; 1326 1327 my $db = init_gpc_db(); 1328 $date =~ s/-//g; 1329 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 1330 1331 my $sth = "SELECT diff_id from diffRun JOIN diffInputSkyfile USING(diff_id) where data_group = '$data_group' AND warp1 = $warp_id_1 AND warp2 = $warp_id_2"; 1332 my $data_ref = $db->selectall_arrayref( $sth ); 1333 1334 return($#{ $data_ref } + 1); 1335 } 1336 1309 1337 sub do_extra_processing { 1310 1338 my $date = shift; … … 1332 1360 if (($#{ $warps } + 1) % 2 != 0) { 1333 1361 print STDERR "Number of input warps to make OSS diffs is not even! $#{ $warps }\n"; 1334 die;1362 last; 1335 1363 } 1336 1364 … … 1341 1369 my $template_exp_id = ${ $template_warp }[0]; 1342 1370 1371 my $input_warp_id = ${ $input_warp }[1]; 1372 my $template_warp_id = ${ $template_warp }[1]; 1373 1374 if (verify_uniqueness_diff($input_warp_id,$template_warp_id,$date,$target) != 0) { 1375 print STDERR "Diffs already queued for this $date $target $input_exp_id $template_exp_id\n"; 1376 next; 1377 } 1378 1343 1379 my $cmd = "$difftool -dbname $dbname -definewarpwarp "; 1344 1380 $cmd .= "-input_label $label -template_label $label "; … … 1507 1543 my $N = $metadata_out{N_MACROS}; 1508 1544 $metadata_out{"ns${N}Macro"} = $macro_formats{$proc_mode}; 1509 # print STDERR "WORKING ON A MACRO: ns${N}Macro $proc_mode $macro_formats{$proc_mode}\n"; 1545 if ($debug == 1) { 1546 print STDERR "WORKING ON A MACRO: ns${N}Macro $proc_mode $macro_formats{$proc_mode}\n"; 1547 } 1510 1548 if (defined($date)&&(defined($target))) { 1511 1549 … … 1528 1566 $metadata_out{"ns${N}Macro"} =~ s/\@DATE\@/$date/; 1529 1567 } 1568 if ($debug == 1) { 1569 print STDERR "DONE WITH A MACRO: ns${N}Macro $proc_mode $macro_formats{$proc_mode}\n"; 1570 } 1530 1571 $metadata_out{N_MACROS} ++; 1531 1572 } -
tags/ipp-20101029/ippTasks/nightly_stacks.pro
r29156 r29659 83 83 macro ns.stacks.on 84 84 task ns.stacks.load 85 active true85 active false 86 86 end 87 87 task ns.stacks.run … … 617 617 option $date 618 618 619 if ( "$ns_STATE" != "QUEUESTACKS") break619 if (("$ns_STATE" != "QUEUESTACKS")&&("$ns_STATE" != "TOWARP")&&("$ns_STATE" != "FORCETOWARP")) break 620 620 $run = automate_stacks.pl --queue_stacks --date $date 621 621 command $run
Note:
See TracChangeset
for help on using the changeset viewer.
