Changeset 37242
- Timestamp:
- Aug 12, 2014, 3:55:38 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140717
- Files:
-
- 2 deleted
- 31 edited
- 3 copied
-
ippMonitor/czartool/czartool/Plotter.pm (modified) (2 diffs, 1 prop)
-
ippScripts/Build.PL (modified) (1 diff)
-
ippScripts/MANIFEST (modified) (1 diff)
-
ippScripts/scripts/dist_defineruns.pl (modified) (1 diff)
-
ippScripts/scripts/lap_science.pl (modified) (6 diffs)
-
ippScripts/scripts/permcheck.pl (modified) (3 diffs)
-
ippScripts/scripts/queuestaticsky.pl (modified) (1 prop)
-
ippScripts/scripts/sc_prepare_camera.pl (modified) (6 diffs)
-
ippScripts/scripts/sc_prepare_chip.pl (modified) (4 diffs)
-
ippScripts/scripts/sc_prepare_stack.pl (modified) (4 diffs)
-
ippScripts/scripts/sc_prepare_warp.pl (modified) (5 diffs)
-
ippScripts/scripts/sc_remote_exec.pl (modified) (16 diffs, 1 prop)
-
ippScripts/scripts/sc_transfer_tool.pl (modified) (5 diffs)
-
ippScripts/scripts/sc_validate_files.pl (deleted)
-
ippScripts/scripts/sc_validate_processing.pl (deleted)
-
ippTools/share/Makefile.am (modified) (1 diff)
-
ippTools/share/releasetool_deleterelexp.sql (copied) (copied from trunk/ippTools/share/releasetool_deleterelexp.sql )
-
ippTools/share/releasetool_deleterelstack.sql (copied) (copied from trunk/ippTools/share/releasetool_deleterelstack.sql )
-
ippTools/share/releasetool_setrelstackcalibratedfromskycal.sql (copied) (copied from trunk/ippTools/share/releasetool_setrelstackcalibratedfromskycal.sql )
-
ippTools/src/disttool.c (modified) (1 diff)
-
ippTools/src/disttoolConfig.c (modified) (1 diff)
-
ippTools/src/releasetool.c (modified) (5 diffs)
-
ippTools/src/releasetool.h (modified) (1 diff)
-
ippTools/src/releasetoolConfig.c (modified) (4 diffs)
-
ippTools/src/stacktool.c (modified) (1 diff)
-
ippTools/src/stacktoolConfig.c (modified) (1 diff)
-
ippTools/src/staticskytool.c (modified) (3 diffs)
-
ippTools/src/staticskytoolConfig.c (modified) (2 diffs)
-
ippconfig (modified) (1 prop)
-
ippconfig/gpc1/psastro.config (modified) (1 diff)
-
ippconfig/recipes/ppSub.config (modified) (1 prop)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 prop)
-
psModules (modified) (1 prop)
-
pstamp/scripts/pstamp_checkdependent.pl (modified) (1 prop)
-
pstamp/scripts/pstamp_finish.pl (modified) (1 prop)
-
pstamp/scripts/pstampparse.pl (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140717/ippMonitor/czartool/czartool/Plotter.pm
- Property svn:mergeinfo set to
r35742 r37242 671 671 "set ylabel \"Space (TB)\";" . 672 672 "set xtic rotate by -90 scale 0;" . 673 "set yrange [:100];" . 673 674 "plot '".$tmpFile->filename."' " . 674 675 "using 2:xtic(1) t \"Used\" lt 7," . … … 715 716 "set style data histograms;" . 716 717 "set ylabel \"Space (TB)\";" . 718 "set yrange [:100];" . 717 719 "set xtic rotate by -90 scale 0;" . 718 720 "plot '".$tmpFile->filename."' " . -
branches/eam_branches/ipp-20140717/ippScripts/Build.PL
r37053 r37242 143 143 scripts/sc_remote_exec.pl 144 144 scripts/sc_transfer_tool.pl 145 scripts/sc_validate_files.pl146 scripts/sc_validate_processing.pl147 145 )], 148 146 dist_abstract => 'Scripts for running the Pan-STARRS IPP', -
branches/eam_branches/ipp-20140717/ippScripts/MANIFEST
r36950 r37242 56 56 scripts/sc_remote_exec.pl 57 57 scripts/sc_transfer_tool.pl 58 scripts/sc_validate_files.pl59 scripts/sc_validate_processing.pl60 58 t/00_distribution.t -
branches/eam_branches/ipp-20140717/ippScripts/scripts/dist_defineruns.pl
r36669 r37242 90 90 push @stages, $stage; 91 91 } else { 92 @stages = qw(chip chip_bg camera fake warp warp_bg diff stack SSdiff sky skysingle ff);92 @stages = qw(chip chip_bg camera fake warp warp_bg diff stack SSdiff sky skysingle skycal ff); 93 93 } 94 94 -
branches/eam_branches/ipp-20140717/ippScripts/scripts/lap_science.pl
r37073 r37242 34 34 my $qstack_threshold = 0.05; # Only make a quickstack if more than 5% of the exposures require it. 35 35 my $minimum_stack_inputs = 2; # We can avoid magicking stack inputs if we have more than this number. 36 my $do_updates_pv2 = 1; # Do updates using the calls needed for PV2. 36 my $maximum_stack_inputs = 25; # This is the place-holder guess on how big a stack we should process locally 37 my $do_updates_pv2 = 0; # Do updates using the calls needed for PV2. 37 38 38 39 GetOptions( … … 189 190 $chip_cmd .= " -set_label $exposure->{label} -set_data_group $data_group "; 190 191 $chip_cmd .= " -set_workdir $workdir -set_dist_group $exposure->{dist_group} "; 191 #$chip_cmd .= " -set_reduction LAP_SCIENCE ";192 $chip_cmd .= " -set_reduction LAP_POLE ";192 $chip_cmd .= " -set_reduction LAP_SCIENCE "; 193 # $chip_cmd .= " -set_reduction LAP_POLE "; 193 194 194 195 my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 1037 1038 my $data_group = "${label}.${proj_cell}.final.${lap_id}"; 1038 1039 1040 1041 ## 1042 ## Queue the "shallow" stacks that will run at los alamos. 1039 1043 my $command = "$stacktool "; 1040 1044 $command .= " -pretend " if defined $debug; … … 1043 1047 # $command .= " -select_label $label "; # Removed to allow exposure sharing to work 1044 1048 $command .= " -set_label ${label} -set_workdir $workdir -set_data_group $data_group "; 1045 $command .= " -min_num ${minimum_stack_inputs} - set_reduction THREEPI_STACK_1DG -set_dist_group $exposure->{dist_group} ";1049 $command .= " -min_num ${minimum_stack_inputs} -max_num ${maximum_stack_inputs} -set_reduction THREEPI_STACK_1DG -set_dist_group $exposure->{dist_group} "; 1046 1050 $command .= " $warps "; 1047 1051 … … 1054 1058 my $stacks_made = $mdcParser->parse_list(join "", @$stdout_buf) or 1055 1059 &my_die("unable to parse metadata from stacktool -definebyquery", $lap_id, ""); 1056 1060 1061 ## 1062 ## Queue the "deep" stacks that will run locally. 1063 my $deep_minimum = $maximum_stack_inputs + 1; 1064 $command = "$stacktool "; 1065 $command .= " -pretend " if defined $debug; 1066 $command .= " -dbname $dbname " if defined $dbname; 1067 $command .= " -definebyquery -select_skycell_id ${proj_cell}.% -select_filter $filter "; 1068 # $command .= " -select_label $label "; # Removed to allow exposure sharing to work 1069 $command .= " -set_label ${label}.local -set_workdir $workdir -set_data_group $data_group "; 1070 $command .= " -min_num ${deep_minimum} -set_reduction THREEPI_STACK_1DG -set_dist_group $exposure->{dist_group} "; 1071 $command .= " $warps "; 1072 1073 ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1074 run(command => $command, verbose => $verbose); 1075 unless ($success) { 1076 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1077 &my_die("Unable to perform stacktool -definebyquery: $error_code", $lap_id); 1078 } 1079 $stacks_made .= $mdcParser->parse_list(join "", @$stdout_buf) or 1080 &my_die("unable to parse metadata from stacktool -definebyquery", $lap_id, ""); 1081 1082 1083 ## Determine the sass_id so we can record it in the database. 1057 1084 $command = "$stacktool "; 1058 1085 $command .= " -dbname $dbname " if defined $dbname; … … 1416 1443 1417 1444 my @clean_modes = ( 1418 'chiptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -set_label goto_cleaned -label @LABEL@ -chip_id @CHIP_ID@',1445 # 'chiptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -set_label goto_cleaned -label @LABEL@ -chip_id @CHIP_ID@', 1419 1446 # 'warptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -set_label goto_cleaned -label @LABEL@ -warp_id @WARP_ID@', 1420 1447 'difftool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -set_label goto_cleaned -label @LABEL@ -diff_id @DIFF_ID@', -
branches/eam_branches/ipp-20140717/ippScripts/scripts/permcheck.pl
r36702 r37242 51 51 my %backup_hosts = ('ippb00' => 1, 'ippb01' => 1, 52 52 'ippb02' => 1, 'ippb03' => 1, 53 'ippb04' => 1, 'ippb05' => 1 53 'ippb04' => 1, 'ippb05' => 1, 54 'ippb06' => 1 54 55 ); 55 my %backup_destinations = ('ippb04' => 1, 56 'ippb05' => 1); 56 my %backup_destinations = (#'ippb04' => 1, 57 #'ippb05' => 1, 58 'ippb06' => 1 59 ); 57 60 my $backup_Nvols = 3; 58 61 … … 111 114 } 112 115 113 my %components = ('camera' => ['PSASTRO.OUTPUT' ],116 my %components = ('camera' => ['PSASTRO.OUTPUT','PSASTRO.OUTPUT.MASK'], 114 117 'stack' => ['PPSTACK.UNCONV.COMP','PPSTACK.UNCONV.MASK.COMP','PPSTACK.UNCONV.VARIANCE.COMP', 115 118 'PPSTACK.UNCONV.EXP','PPSTACK.UNCONV.EXPNUM','PPSTACK.UNCONV.EXPWT.COMP'], … … 122 125 my $hostname = $entry->{hostname}; 123 126 foreach my $product (@{ $components{$stage} }) { 124 my $key = $ipprc->filename($product,$path_base); 125 127 my @keys = (); 128 if (($stage eq 'camera')&&($product eq 'PSASTRO.OUTPUT.MASK')) { 129 my @otas = ('XY01','XY02','XY03','XY04','XY05','XY06', 130 'XY10','XY11','XY12','XY13','XY14','XY15','XY16','XY17', 131 'XY20','XY21','XY22','XY23','XY24','XY25','XY26','XY27', 132 'XY30','XY31','XY32','XY33','XY34','XY35','XY36','XY37', 133 'XY40','XY41','XY42','XY43','XY44','XY45','XY46','XY47', 134 'XY50','XY51','XY52','XY53','XY54','XY55','XY56','XY57', 135 'XY60','XY61','XY62','XY63','XY64','XY65','XY66','XY67', 136 'XY71','XY72','XY73','XY74','XY75','XY76'); 137 foreach my $ota (@otas) { 138 push @keys, $ipprc->filename($product,$path_base,$ota); 139 } 140 } 141 else { 142 push @keys, $ipprc->filename($product,$path_base); 143 } 126 144 # Do validation 127 128 # neb-stat level handling129 my $stat = $neb->stat($key);130 die "nebulous key: $key not found" unless $stat;131 my $instances = $neb->find_instances($key, 'any');132 die "no instances found" unless $instances;133 145 134 my $user_copies; 135 eval { 136 $user_copies = $neb->getxattr($key, "user.copies"); 137 }; 138 unless(defined($user_copies)) { 139 $user_copies = 1; 140 } 141 142 my $md5sum; 143 my @validation; 144 my %md5sum_uniq; 145 my $existing_copies = 0; 146 147 my @existance; 148 my @md5sums; 149 my @diskfiles = map {URI->new($_)->file if $_} @$instances; 150 my @diskvols; 151 my @diskhosts; 152 my @quality; 153 my $Ngood = 0; 154 my $quality_mask = 0; 155 156 for (my $i = 0; $i <= $#diskfiles; $i++) { 157 if (-e $diskfiles[$i]) { 158 $existance[$i] = 1; 159 $existing_copies++; 160 $md5sums[$i] = local_md5sum($diskfiles[$i]); 161 $md5sum_uniq{$md5sums[$i]} = 1; 162 } 163 else { 164 $existance[$i] = 0; 165 $md5sums[$i] = 'NON-EXISTANT'; 166 $md5sum_uniq{$md5sums[$i]} = 1; 167 } 168 ($diskhosts[$i],$diskvols[$i]) = parse_volume($diskfiles[$i]); 169 $validation[$i] = sprintf("% 3d %32s %s %s %d", 170 $existance[$i], 171 $md5sums[$i], 172 $diskfiles[$i], 173 $diskhosts[$i],$diskvols[$i] 174 ); 175 176 # Pre-parse decisions 177 if ($existance[$i] == 0) { 178 $quality[$i] = 0; 179 } 180 elsif (is_backup_volume($diskhosts[$i])) { 181 $quality[$i] = 1; 182 $quality_mask = $quality_mask | 1; 183 $Ngood++; 184 } 185 else { 186 $quality[$i] = 2; 187 $Ngood++; 188 } 189 } 190 if (scalar(keys(%md5sum_uniq)) != 1) { #unlike the raw data, we don't know the truth. 191 die "There are multiple md5sum values for $key"; 192 } 193 $md5sum = (keys(%md5sum_uniq))[0]; 194 195 print "\n$key $data_state $md5sum $hostname\n"; 196 if (1) { 197 198 print 199 "object id: ", @$stat[0], "\n", 200 "key: ", @$stat[1], "\n"; 201 print 202 "epoch: ", @$stat[4], "\n"; 203 print 204 "md5sum count: ", scalar(keys %md5sum_uniq), "\n"; 205 print 206 "requested instances: ", $user_copies, "\n", 207 "available instances: ", @$stat[6], "\n", 208 "existing instances: ", $existing_copies, "\n", 209 "total instances: ", @$stat[7], "\n", 210 "instance location:\n", " " x 4; 211 print 212 join("\n" . " " x 4, @validation), "\n"; 213 } 214 215 # Decide what to do 216 if ($Ngood == 0) { 217 # DO something to attempt to fix this. 218 my $deneb_key = $key; $deneb_key =~ s/.*?gpc/gpc/; 219 220 open(DD,"/home/panstarrs/ipp/local/bin/deneb-locate.py $deneb_key 2> /dev/null |"); 221 my $good_file = ''; 222 while (<DD>) { 223 $_ =~ s/^\s+//; 224 my ($z,undef,$ff) = split /\s+/; 225 if (($ff)&&(-e $ff)) { 226 my $md_response = `md5sum $ff`; 227 if ($md_response =~ /$md5sum/) { 228 $good_file = (split /\s+/,$md_response)[1]; 229 } 230 } 231 } 232 close(DD); 233 if ($good_file eq '') { 234 die "No valid instance of key: $key"; 235 } 236 else { 237 $quality[0] = 1; 238 print "cp $good_file $diskfiles[0]\n"; 239 system("cp $good_file $diskfiles[0]"); 240 } 241 # Begin my best validation thought 242 { 243 my $tmpmd5 = local_md5sum($diskfiles[0]); 244 if ($tmpmd5 ne $md5sum) { 245 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 246 } 247 } 248 # End my best validation thought. 249 250 $Ngood = 1; # We now hand off this single valid instance object to be handled by the Ngood=1 case. 251 } 252 253 if ($quality[0] == 0) { # The first instance is bad. 254 # But since we're here, and not up there, there must be at least one good copy. Find it. 255 for (my $i = 0; $i <= $#md5sums; $i++) { 256 if ($md5sums[$i] eq $md5sum) { # Found it. 257 print "cp $diskfiles[$i] $diskfiles[0]\n"; 258 system("cp $diskfiles[$i] $diskfiles[0]"); 259 # Begin my best validation thought 260 { 261 my $tmpmd5 = local_md5sum($diskfiles[0]); 146 foreach my $key (@keys) { 147 # neb-stat level handling 148 my $stat = $neb->stat($key); 149 die "nebulous key: $key not found" unless $stat; 150 my $instances = $neb->find_instances($key, 'any'); 151 die "no instances found" unless $instances; 152 153 my $user_copies; 154 eval { 155 $user_copies = $neb->getxattr($key, "user.copies"); 156 }; 157 unless(defined($user_copies)) { 158 $user_copies = 1; 159 } 160 161 my $md5sum; 162 my @validation; 163 my %md5sum_uniq; 164 my $existing_copies = 0; 165 166 my @existance; 167 my @md5sums; 168 my @diskfiles = map {URI->new($_)->file if $_} @$instances; 169 my @diskvols; 170 my @diskhosts; 171 my @quality; 172 my $Ngood = 0; 173 my $quality_mask = 0; 174 175 for (my $i = 0; $i <= $#diskfiles; $i++) { 176 if (-e $diskfiles[$i]) { 177 $existance[$i] = 1; 178 $existing_copies++; 179 $md5sums[$i] = local_md5sum($diskfiles[$i]); 180 $md5sum_uniq{$md5sums[$i]} = 1; 181 } 182 else { 183 $existance[$i] = 0; 184 $md5sums[$i] = 'NON-EXISTANT'; 185 $md5sum_uniq{$md5sums[$i]} = 1; 186 } 187 ($diskhosts[$i],$diskvols[$i]) = parse_volume($diskfiles[$i]); 188 $validation[$i] = sprintf("% 3d %32s %s %s %d", 189 $existance[$i], 190 $md5sums[$i], 191 $diskfiles[$i], 192 $diskhosts[$i],$diskvols[$i] 193 ); 194 195 # Pre-parse decisions 196 if ($existance[$i] == 0) { 197 $quality[$i] = 0; 198 } 199 elsif (is_backup_volume($diskhosts[$i])) { 200 $quality[$i] = 1; 201 $quality_mask = $quality_mask | 1; 202 $Ngood++; 203 } 204 else { 205 $quality[$i] = 2; 206 $Ngood++; 207 } 208 } 209 if (scalar(keys(%md5sum_uniq)) != 1) { #unlike the raw data, we don't know the truth. 210 die "There are multiple md5sum values for $key"; 211 } 212 $md5sum = (keys(%md5sum_uniq))[0]; 213 214 print "\n$key $data_state $md5sum $hostname\n"; 215 if (1) { 216 217 print 218 "object id: ", @$stat[0], "\n", 219 "key: ", @$stat[1], "\n"; 220 print 221 "epoch: ", @$stat[4], "\n"; 222 print 223 "md5sum count: ", scalar(keys %md5sum_uniq), "\n"; 224 print 225 "requested instances: ", $user_copies, "\n", 226 "available instances: ", @$stat[6], "\n", 227 "existing instances: ", $existing_copies, "\n", 228 "total instances: ", @$stat[7], "\n", 229 "instance location:\n", " " x 4; 230 print 231 join("\n" . " " x 4, @validation), "\n"; 232 } 233 234 # Decide what to do 235 if ($Ngood == 0) { 236 # DO something to attempt to fix this. 237 my $deneb_key = $key; $deneb_key =~ s/.*?gpc/gpc/; 238 239 open(DD,"/home/panstarrs/ipp/local/bin/deneb-locate.py $deneb_key 2> /dev/null |"); 240 my $good_file = ''; 241 while (<DD>) { 242 $_ =~ s/^\s+//; 243 my ($z,undef,$ff) = split /\s+/; 244 if (($ff)&&(-e $ff)) { 245 my $md_response = `md5sum $ff`; 246 if ($md_response =~ /$md5sum/) { 247 $good_file = (split /\s+/,$md_response)[1]; 248 } 249 } 250 } 251 close(DD); 252 if ($good_file eq '') { 253 die "No valid instance of key: $key"; 254 } 255 else { 256 $quality[0] = 1; 257 print "cp $good_file $diskfiles[0]\n"; 258 system("cp $good_file $diskfiles[0]"); 259 } 260 # Begin my best validation thought 261 { 262 my $tmpmd5 = local_md5sum($diskfiles[0]); 263 if ($tmpmd5 ne $md5sum) { 264 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 265 } 266 } 267 # End my best validation thought. 268 269 $Ngood = 1; # We now hand off this single valid instance object to be handled by the Ngood=1 case. 270 } 271 272 if ($quality[0] == 0) { # The first instance is bad. 273 # But since we're here, and not up there, there must be at least one good copy. Find it. 274 for (my $i = 0; $i <= $#md5sums; $i++) { 275 if ($md5sums[$i] eq $md5sum) { # Found it. 276 print "cp $diskfiles[$i] $diskfiles[0]\n"; 277 system("cp $diskfiles[$i] $diskfiles[0]"); 278 # Begin my best validation thought 279 { 280 my $tmpmd5 = local_md5sum($diskfiles[0]); 281 if ($tmpmd5 ne $md5sum) { 282 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 283 } 284 } 285 # End my best validation thought. 286 last; # We're done here now. 287 } 288 } 289 } 290 291 if ($Ngood == 1) { # We have only one version 292 if ($quality_mask & 1) { # ANd it's on a backup volume 293 print "neb-replicate $key\n"; 294 if ($do_ops) { 295 $neb->replicate($key) or die "failed to replicate the single valid copy"; 296 if ($@) { die $@; } 297 } 298 } 299 else { # And it's not, so put one there 300 my $rep_vol = get_random_backup_volume(); 301 print "neb-replicate --volume $rep_vol $key\n"; 302 if ($do_ops) { 303 $neb->replicate($key,$rep_vol) or die "failed to replicate the single valid copy to the backup node"; 304 if ($@) { die $@; } 305 306 # Begin my best validation thought 307 system("sync") == 0 or die "Couldn't sync?"; 308 my $uris = $neb->find_instances($key,$rep_vol); 309 @$uris = map {URI->new($_)->file if $_} @$uris; 310 my $tmpmd5 = local_md5sum(${ $uris }[0]); 262 311 if ($tmpmd5 ne $md5sum) { 263 312 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 264 313 } 265 } 266 # End my best validation thought. 267 last; # We're done here now. 268 } 269 } 270 } 271 272 if ($Ngood == 1) { # We have only one version 273 if ($quality_mask & 1) { # ANd it's on a backup volume 274 print "neb-replicate $key\n"; 275 if ($do_ops) { 276 $neb->replicate($key) or die "failed to replicate the single valid copy"; 277 if ($@) { die $@; } 278 } 279 } 280 else { # And it's not, so put one there 281 my $rep_vol = get_random_backup_volume(); 282 print "neb-replicate --volume $rep_vol $key\n"; 283 if ($do_ops) { 284 $neb->replicate($key,$rep_vol) or die "failed to replicate the single valid copy to the backup node"; 285 if ($@) { die $@; } 286 287 # Begin my best validation thought 288 system("sync") == 0 or die "Couldn't sync?"; 289 my $uris = $neb->find_instances($key,$rep_vol); 290 @$uris = map {URI->new($_)->file if $_} @$uris; 291 my $tmpmd5 = local_md5sum(${ $uris }[0]); 292 if ($tmpmd5 ne $md5sum) { 293 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 294 } 295 # End my best validation thought. 296 } 297 } 298 } 299 else { # N >= 2 300 if (!($quality_mask & 1)) { # no backup copy 301 my $rep_vol = get_random_backup_volume(); 302 print "neb-replicate --volume $rep_vol $key\n"; 303 if ($do_ops) { 304 $neb->replicate($key,$rep_vol) or die "failed to replicate a copy to the backup node"; 305 if ($@) { die $@; } 306 307 # Begin my best validation thought 308 system("sync") == 0 or die "Couldn't sync?"; 309 my $uris = $neb->find_instances($key,$rep_vol); 310 @$uris = map {URI->new($_)->file if $_} @$uris; 311 my $tmpmd5 = local_md5sum(${ $uris }[0]); 312 if ($tmpmd5 ne $md5sum) { 313 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 314 } 315 # End my best validation thought. 316 } 317 } 318 if (!($quality_mask & 2)) { # no copy on the requested host, so select the first as valid. 314 # End my best validation thought. 315 } 316 } 317 } 318 else { # N >= 2 319 if (!($quality_mask & 1)) { # no backup copy 320 my $rep_vol = get_random_backup_volume(); 321 print "neb-replicate --volume $rep_vol $key\n"; 322 if ($do_ops) { 323 $neb->replicate($key,$rep_vol) or die "failed to replicate a copy to the backup node"; 324 if ($@) { die $@; } 325 326 # Begin my best validation thought 327 system("sync") == 0 or die "Couldn't sync?"; 328 my $uris = $neb->find_instances($key,$rep_vol); 329 @$uris = map {URI->new($_)->file if $_} @$uris; 330 my $tmpmd5 = local_md5sum(${ $uris }[0]); 331 if ($tmpmd5 ne $md5sum) { 332 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 333 } 334 # End my best validation thought. 335 } 336 } 337 if (!($quality_mask & 2)) { # no copy on the requested host, so select the first as valid. 338 for (my $i = 0; $i <= $#diskfiles; $i++) { 339 if ($quality[$i] == 2) { 340 $quality[$i] = 1; 341 last; 342 } 343 } 344 } 319 345 for (my $i = 0; $i <= $#diskfiles; $i++) { 320 if ($quality[$i] == 2) {321 $quality[$i] = 1;322 last;323 }324 }325 }326 for (my $i = 0; $i <= $#diskfiles; $i++) {327 346 # print "$existance[$i] $quality[$i] $md5sums[$i] $md5sum $diskhosts[$i] $diskvols[$i]\n"; 328 if ($quality[$i] != 1) { 329 if ($existance[$i] == 0) { # This disk file doesn't exist. 330 system("touch $diskfiles[$i]"); 331 } 332 my $cull_vol = $diskhosts[$i] . "." . $diskvols[$i]; 333 print "neb-cull --volume $cull_vol $key\n"; 334 if ($do_ops) { 335 # The tilde here is to force hard volumes. Don't touch it. 336 $neb->cull($key,"~${cull_vol}",2) or die "failed to cull a superfluous instance"; 337 if ($@) { die "$@"; } 338 } 339 } 340 } 341 } 347 if ($quality[$i] != 1) { 348 if ($existance[$i] == 0) { # This disk file doesn't exist. 349 system("touch $diskfiles[$i]"); 350 } 351 my $cull_vol = $diskhosts[$i] . "." . $diskvols[$i]; 352 print "neb-cull --volume $cull_vol $key\n"; 353 if ($do_ops) { 354 # The tilde here is to force hard volumes. Don't touch it. 355 $neb->cull($key,"~${cull_vol}",2) or die "failed to cull a superfluous instance"; 356 if ($@) { die "$@"; } 357 } 358 } 359 } 360 } 361 } # end keys for this product 342 362 } # end product for this entry 343 363 } # end entry for this id -
branches/eam_branches/ipp-20140717/ippScripts/scripts/queuestaticsky.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_prepare_camera.pl
r36966 r37242 18 18 19 19 # Hard coded values 20 my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 20 # my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 21 my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location 22 $remote_root = '/scratch3/watersc1/'; 21 23 my $threads = 2; # How many threads are we going to use? 22 24 my $job_cost = 1700 / 60 / 60; # Estimate of how long a job runs, in hours. … … 27 29 my $max_time = 8; # longest allocation to ask for 28 30 my $remote_hostname= "LANL/Mustang"; # Name of the remote node. 29 my @return_component_list = ("DBINFO.EXP", "PSASTRO.CONFIG", "PSASTRO.OUTPUT", "LOG.EXP", "TRACE.EXP","PSASTRO.STATS");31 my @return_component_list = ("DBINFO.EXP", "PSASTRO.CONFIG", "PSASTRO.OUTPUT", "LOG.EXP", "PSASTRO.STATS"); 30 32 # Look for programs we need 31 33 my $missing_tools; … … 186 188 $psastro_command .= " -recipe PSASTRO $recipe_psastro "; 187 189 $psastro_command .= " -tracedest ${remote_outroot}.trace -log ${remote_outroot}.log "; 188 $psastro_command .= " -dumpconfig ${remote_outroot}. mdc -stats ${remote_outroot}.stats ";190 $psastro_command .= " -dumpconfig ${remote_outroot}.psastro.mdc -stats ${remote_outroot}.stats "; 189 191 $psastro_command .= " -recipe PPSTATS CAMSTATS "; 190 192 … … 202 204 my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename); 203 205 my $remote_outroot_dir = dirname($ipp_disk); 204 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} ";206 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk "; 205 207 } 206 208 foreach my $chipInfo (@{ $inpData2 }) { … … 208 210 my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename); 209 211 my $remote_outroot_dir = dirname($ipp_disk); 210 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} ";212 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk "; 211 213 } 212 214 print CONFIG "\n"; … … 239 241 $node_req = int(($node_need * $job_cost) / ($fill_factor * $time_req)) + 1; 240 242 } 243 $time_req += 1; # Safety addition. 241 244 242 245 open(COMMAND, ">$disk_command") || &my_die("Couldn't open file? $disk_command",$remote_id,$PS_EXIT_SYS_ERROR); -
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_prepare_chip.pl
r36966 r37242 18 18 19 19 # Hard coded values 20 my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 20 # my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 21 my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location 22 $remote_root = '/scratch3/watersc1/'; 21 23 my $remote_raw = "${remote_root}/raw/"; # Directory to find raw data in. 22 24 my $threads = 2; # How many threads are we going to use? … … 152 154 #print Dumper(%detrends); 153 155 154 my @return_component_list = ("DBINFO.IMFILE","PPIMAGE.STATS","LOG.IMFILE"," TRACE.IMFILE","PPIMAGE.BACKMDL","PPIMAGE.PATTERN");156 my @return_component_list = ("DBINFO.IMFILE","PPIMAGE.STATS","LOG.IMFILE","PPIMAGE.BACKMDL","PPIMAGE.PATTERN"); 155 157 156 158 # … … 348 350 my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename ); 349 351 my $remote_outroot_dir = dirname($ipp_disk); 350 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} ";352 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk "; 351 353 # print " $filename $ipp_disk $remote_disk\n"; 352 354 # die; … … 405 407 $node_req = int(($node_need * $job_cost) / ($fill_factor * $time_req)) + 1; 406 408 } 409 $time_req += 1; # Safety addition. 407 410 408 411 open(COMMAND, ">$disk_command") || &my_die("Couldn't open file? $disk_command",$chip_id,$PS_EXIT_SYS_ERROR); -
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_prepare_stack.pl
r36966 r37242 18 18 19 19 # Hard coded values 20 my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 20 #my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 21 my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location 22 $remote_root = '/scratch3/watersc1/'; 21 23 my $threads = 2; # How many threads are we going to use? 22 24 my $job_cost = 1500 / 60 / 60; # Estimate of how long a job runs, in hours. … … 29 31 my @return_component_list = ("DBINFO.EXP", "PPSTACK.UNCONV","PPSTACK.UNCONV.MASK","PPSTACK.UNCONV.VARIANCE", 30 32 "PPSTACK.UNCONV.EXP","PPSTACK.UNCONV.EXPWT","PPSTACK.UNCONV.EXPNUM","PSPHOT.OUTPUT", 31 "LOG.EXP", "TRACE.EXP","PSASTRO.STATS",32 "PPSTACK.CONFIG","PPSTACK.TARGET.PSF" );33 "LOG.EXP", "PSASTRO.STATS", 34 "PPSTACK.CONFIG","PPSTACK.TARGET.PSF","PSPHOT.STACK.PSF.SAVE"); 33 35 #,"PPSTACK.CONV.KERNEL"); 34 36 # Look for programs we need … … 147 149 # This actually returns all the individual stack/skyfiles that comprise this run. Because consistency. 148 150 my $command = "$stacktool -inputskyfile -stack_id $stack_id "; 149 151 $command .= " -dbname $dbname " if defined($dbname); 150 152 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 151 153 run(command => $command, verbose => 0); … … 208 210 my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename); 209 211 my $remote_outroot_dir = dirname($ipp_disk); 210 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} ";212 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk "; 211 213 } 212 214 -
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_prepare_warp.pl
r36966 r37242 18 18 19 19 # Hard coded values 20 my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 20 # my $remote_root = '/scratch3/watersc1/'; 21 my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location 22 $remote_root = '/scratch3/watersc1/'; 21 23 my $threads = 2; # How many threads are we going to use? 22 my $job_cost = 70 / 60 / 60;# Estimate of how long a job runs, in hours.24 my $job_cost = 110 / 60 / 60; # Estimate of how long a job runs, in hours. 23 25 my $proc_per_node = 24; # processors per node 24 26 my $min_nodes = 1; # smallest allocation to ask for … … 27 29 my $max_time = 8; # longest allocation to ask for 28 30 my $remote_hostname= "LANL/Mustang"; # Name of the remote node. 29 my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","PSPHOT.PSF.S AVE","LOG.EXP","TRACE.EXP");31 my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","PSPHOT.PSF.SKY.SAVE","LOG.EXP"); 30 32 # Look for programs we need 31 33 my $missing_tools; … … 202 204 $pswarp_command .= " -threads 4 "; # -image_id ${image_id} -source_id ${source_id} "; 203 205 $pswarp_command .= " -recipe PPSTATS WARPSTATS "; 204 $pswarp_command .= " -dumpconfig ${remote_outroot}. mdc -stats ${remote_outroot}.stats ";206 $pswarp_command .= " -dumpconfig ${remote_outroot}.pswarp.mdc -stats ${remote_outroot}.stats "; 205 207 206 208 # print "$pswarp_command \n"; … … 218 220 # Determine which output files need to be returned 219 221 foreach my $component(@return_component_list) { 220 my $filename = $ipprc->filename($component,$ipp_outroot );222 my $filename = $ipprc->filename($component,$ipp_outroot,$skycell_id); 221 223 my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename); 222 224 my $remote_outroot_dir = dirname($ipp_disk); 223 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} ";225 print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk "; 224 226 } 225 227 … … 255 257 $node_req = int(($node_need * $job_cost) / ($fill_factor * $time_req)) + 1; 256 258 } 259 $time_req += 1; # Safety addition. 257 260 258 261 open(COMMAND, ">$disk_command") || &my_die("Couldn't open file? $disk_command",$remote_id,$PS_EXIT_SYS_ERROR); -
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_remote_exec.pl
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/eam_branches/ipp-20140423/ippScripts/scripts/sc_remote_exec.pl merged eligible /branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_remote_exec.pl merged eligible /branches/eam_branches/ipp-ops-20130712/ippScripts/scripts/sc_remote_exec.pl merged eligible /tags/ipp-pv3-20140717/ippScripts/scripts/sc_remote_exec.pl merged eligible /trunk/ippScripts/scripts/sc_remote_exec.pl merged eligible /tags/ipp-20130712/ippScripts/scripts/sc_remote_exec.pl 35815-37063
r36844 r37242 16 16 # Hard coded values 17 17 my $DMZ_HOST = 'wtrw'; 18 my $SEC_HOST = 'mu-fe 4';18 my $SEC_HOST = 'mu-fe'; 19 19 my $IPP_PATH = '/turquoise/usr/projects/cosmo/mswarren/ipp/'; 20 20 my $remote_root = '/scratch3/watersc1/'; … … 31 31 } 32 32 33 34 33 # Options 35 my ($remote_id,$path_base,$policy,$poll,$job_id,$dbname,$verbose,$no_update,$camera); 36 34 my ($remote_id,$path_base,$policy,$poll,$force,$job_id,$dbname,$verbose,$no_update,$camera); 35 $force = 0; 36 $verbose = 0; 37 37 GetOptions( 38 38 'remote_id=s' => \$remote_id, … … 41 41 'policy=s' => \$policy, 42 42 'poll' => \$poll, 43 'force-poll' => \$force, 43 44 'camera=s' => \$camera, 44 45 'dbname=s' => \$dbname, … … 53 54 54 55 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $remote_id); 55 56 56 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 57 57 … … 61 61 62 62 print "passed authentication challenge.\n"; 63 64 # Phase 1.5: Grab the information about this run; 65 my $rt_cmd = "$remotetool -listrun -remote_id $remote_id "; 66 $rt_cmd .= " -dbname $dbname " if defined($dbname); 67 my ( $rt_success, $rt_error_code, $rt_full_buf, $rt_stdout_buf, $rt_stderr_buf ) = 68 run(command => $rt_cmd, verbose => $verbose); 69 unless ($rt_success) { 70 $rt_error_code = (($rt_error_code >> 8) or $PS_EXIT_PROG_ERROR); 71 &my_die("UNable to run remotetool to determine remote run status", 72 $remote_id,$rt_error_code); 73 } 74 my $rrData = $mdcParser->parse(join "", @$rt_stdout_buf) or 75 &my_die("UNable to run remotetool to determine remote run status", 76 $remote_id,$rt_error_code); 77 my $rrData2 = parse_md_list($rrData); 78 my $runData = ${ $rrData2 }[0]; # There should be only one 63 79 64 80 # These are operations we only need to do on the first call, not on subsequent poll operations. … … 92 108 my (undef,$remote_check) = uri_convert($uri_check); 93 109 my (undef,$remote_transfer)= uri_convert($uri_transfer); 94 # my $ssh_check_stdout = ssh_exec_command("${remote_root}/sc_validate_files.pl --check_list $remote_check --transfer_list $remote_transfer"); 110 95 111 my $ssh_check_stdout = ssh_exec_command("${remote_root}/sc_transfer_tool.pl --input $remote_check --fetch $remote_transfer"); 96 112 # We no longer need to parse this output, as it retrieves files itself. … … 130 146 # Poll the job status? 131 147 my $poll_count = 0; 132 my $poll_max = 5;148 my $poll_max = 1; # If it isn't finished now, it's unlikely to magically finish in the next five minutes. 133 149 my $poll_sleep = 60; 134 150 my $poll_response = 0; 135 while (($poll_count < $poll_max)&&($poll_response != 1)&&($poll_response != -1)) { 151 my $poll_word = "nothing"; 152 153 if ($force) { 154 $poll_response = 1; 155 $poll_word = "Completed"; 156 } 157 158 while (($poll_count < $poll_max)&&($poll_response != 1)&&($poll_response != -1)&&($force != 1)) { 136 159 if ($verbose) { 137 160 print "Polling code. Sleeping. $poll_count of $poll_max $poll_response\n"; … … 140 163 sleep($poll_sleep); 141 164 } 142 $poll_response= poll_job($job_id);165 ($poll_response,$poll_word) = poll_job($job_id); 143 166 144 167 if ($poll_response == 1) { # This job has completed … … 146 169 } 147 170 elsif ($poll_response == -1) { # This job has an error 148 &my_die("The job exited incorrectly.",$remote_id, $PS_EXIT_PROG_ERROR); 171 warn("The job exited incorrectly: $remote_id $job_id $poll_word. Attempting to recover what we can."); 172 $poll_response = 1; # To fool the check later into proceding 149 173 } 150 174 $poll_count++; … … 156 180 &my_die("Job hasn't completed. Ending polling.", $remote_id, 0, "run", $job_id); 157 181 } 158 # Retrieve validation summary 159 my $fault = 0; 182 160 183 161 184 # Initialize the remote side to sync things … … 165 188 my $uri_return = $path_base . ".return"; 166 189 my ($ipp_return,$remote_return) = uri_convert($uri_return); 167 scp_get($remote_return,$ipp_return); 168 # Feed teh return list into the 169 my $return_push_output = ssh_exec_command("${remote_root}/sc_transfer_tool.pl --input $remote_return"); 170 print "$return_push_output\n"; 171 172 190 # We shouldn't need to get this file. We made that file. 191 #scp_get($remote_return,$ipp_return); 192 193 # Construct list of dbinfo files we'll need to execute. 194 my @returned_files = (); 195 my @dbinfo_files = (); 196 my @dbindex = (); 197 my $iter = 0; 173 198 open(RETURN, "$ipp_return") || &my_die("Couldn't open file? $ipp_return", $remote_id,$PS_EXIT_SYS_ERROR); 174 while (<RETURN>) {199 while (<RETURN>) { 175 200 chomp; 201 push @returned_files, $_; 176 202 if ($_ =~ /dbinfo/) { 177 my $file = $_; 178 # $file =~ s/${remote_root}.tmp//; THis shouldn't be needed, as the transfer tool munges the files on that side. 179 open(DBF,"$file") || warn "Missing file $file\n"; 180 my $cmd = <DBF>; 181 chomp($cmd); 182 $cmd =~ s/-/ -/g; # This is just a safety check for missing space. 183 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 184 run(command => $cmd, verbose => $verbose); 185 unless ($success) { 186 # This shouldn't fail, but we also can't suddenly abort if something does fail. Maybe retry if this looks to be a continuing issue? 187 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 188 warn("The command that shouldn't fail has failed: $cmd $remote_id $error_code");##,$remote_id,$error_code); 203 push @dbinfo_files, $_; 204 push @dbindex, $iter; 205 } 206 $iter++; 207 208 } 209 close(RETURN); 210 print STDERR "Expect $#dbinfo_files dbinfo files\n"; 211 212 my $first = 0; 213 my $last = $#dbinfo_files; 214 my $mid = 0; 215 my $range = 20; # How wide of a chunk to look through to catch threading drops 216 my $offset = 0; # Offset to start from. 217 218 # Feed the return list into the transfer tool 219 # If this fails, we should go to an auth wait point. 220 if ($poll_word eq 'Completed') { 221 # We're complete. All files should exist on disk 222 my $iter = 0; 223 my $transfer_success = 1; 224 do { 225 $transfer_success = 1; 226 $iter++; 227 check_ssh_connection(); 228 my $return_push_output = ssh_exec_command("${remote_root}/sc_transfer_tool.pl --input $remote_return --offset $offset"); 229 my $return_push_output_print = join "\n", @{ $return_push_output }; 230 if ($return_push_output_print =~ /exited with value 255/) { $transfer_success = 0; } 231 print "$return_push_output_print\n"; 232 } while (($transfer_success != 1) && ($iter < 10)); # Try harder; 233 } 234 else { 235 # Just try and fetch things, because we didn't complete correctly, it seems. 236 my $return_push_output = ssh_exec_command("${remote_root}/sc_transfer_tool.pl --input $remote_return --offset $offset"); 237 my $return_push_output_print = join "\n", @{ $return_push_output }; 238 print "$return_push_output_print\n"; 239 } 240 241 foreach my $file (@dbinfo_files) { 242 open(DBF,"$file") || warn "Missing file $file\n"; 243 my $cmd = <DBF>; 244 close(DBF); 245 chomp($cmd); 246 # print STDERR "$file $cmd\n"; 247 $cmd =~ s/-/ -/g; # This is just a safety check for missing space. 248 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 249 run(command => $cmd, verbose => $verbose); 250 unless ($success) { 251 252 # This shouldn't fail, but we also can't suddenly abort if something does fail. 253 # Now we're going to drop the component that owns this dbinfo, which should force a retry. 254 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 255 warn("The command that shouldn't fail has failed: $file $cmd $remote_id $error_code"); 256 if ($poll_word ne 'Completed') { # If the job claims it completed, then we're fighting the network. 257 drop_component($remote_id,$cmd,$file); 189 258 } 190 close(DBF); 191 } 192 } 193 close(RETURN); 259 } 260 261 } 194 262 195 263 # We're done, so set the state and exit. 196 264 &my_die("Finished",$remote_id,0,"full"); 197 198 265 199 266 … … 209 276 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 210 277 &my_die("Authorization check failed.",$remote_id,0,'auth'); 211 212 # my $update_command = "$remotetool -updaterun -remote_id $remote_id ";213 # $update_command .= " -set_state auth ";214 # $update_command .= " -dbname $dbname " if defined $dbname;215 # system($update_command);216 # exit(0); # This isn't an error. It's a state we monitor and move to automatically.217 278 } 218 279 } … … 250 311 sub ssh_exec_command { 251 312 my $cmd = shift; 252 $cmd = "$ssh $DMZ_HOST ssh ${SEC_HOST} $cmd"; 313 $cmd = "$ssh $DMZ_HOST ssh ${SEC_HOST} $cmd"; 314 print "EXEC: $cmd\n"; 253 315 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 254 316 run(command => $cmd, verbose => $verbose); 255 317 unless ($success) { 256 318 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 319 # If we failed, see if we failed due to authorization. 320 check_ssh_connection(); 257 321 &my_die("Failed to execute command: >>$cmd<<"); 258 322 } … … 266 330 267 331 if ($response =~ /State: Running/) { 268 return(0 );332 return(0,"Running"); 269 333 } 270 334 elsif ($response =~ /State: Completed/) { 271 return(1 );335 return(1,"Completed"); 272 336 } 273 337 elsif ($response =~ /State: Idle/) { 274 return(-2 );338 return(-2,"Idle"); 275 339 } 276 340 else { 277 return(-1); 341 my $response_word = $response; 342 $response_word =~ s/.*State: //; 343 $response_word =~ s/\n.*//; 344 return(-1,$response_word); 278 345 } 279 346 } … … 324 391 return($local_uri); 325 392 } 393 394 sub drop_component { 395 my $remote_id = shift; 396 my $cmd = shift; 397 my $file = shift; 398 399 if ($cmd eq '') { 400 # Zero byte file. This dbinfo was never constructed properly. 401 402 # Steal the stage_id from the filename. This isn't something I'm happy about. 403 my $stage = $runData->{stage}; 404 my $stage_id = $file; 405 if ($stage eq 'chip') { 406 $stage_id =~ s/^.*ch\.//; 407 } 408 elsif ($stage eq 'camera') { 409 $stage_id =~ s/^.*cm\.//; 410 } 411 elsif ($stage eq 'warp') { 412 $stage_id =~ s/^.*wrp\.//; 413 } 414 elsif ($stage eq 'stack') { 415 $stage_id =~ s/^.*stk\.//; 416 } 417 $stage_id =~ s/\..*$//; 418 419 # Drop this from the database 420 my $drop_cmd = "$remotetool -dropcomponent -remote_id $remote_id -stage_id $stage_id "; 421 $drop_cmd .= " -dbname $dbname " if defined($dbname); 422 system($drop_cmd); 423 } 424 425 } 426 326 427 sub my_die { 327 428 my $msg = shift; … … 347 448 } 348 449 349 # I don't think I need this anymore, but I don't want to burn it until I"m sure.350 351 # exit(1);352 # # Read this as a metadata object353 # my $ssh_exec_stdout = ssh_exec_command("sc_validate_processing.pl ${path_base}.out");354 # my $retrieveData = $mdcParser->parse(join "", @$ssh_exec_stdout);355 # my $retrieveData2= parse_md_list($retrieveData);356 357 # foreach my $retrieveEntry (@$retrieveData2) {358 # my $process_fault = $retrieveEntry->{fault};359 # my $dbcommand = $retrieveEntry->{dbcommand};360 # my $filelist = $retrieveEntry->{filelist};361 362 # scp_get("${filelist}",${filelist});363 # open(FL,${filelist});364 # while(<FL>) {365 # chomp;366 # my $f = $_;367 # scp_get("${f}",$f);368 # }369 # close(FL);370 371 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =372 # run(command => $dbcommand, verbose => $verbose);373 # unless ($success) {374 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);375 # &my_die("The database command returned did not execute correctly. $dbcommand $process_fault",376 # $remote_id,$error_code);377 # }378 379 # if ($process_fault != 0) {380 # $fault = 1;381 # }382 # }383 384 # if (($policy ne 'ignore')&&($fault != 0)) {385 # &my_die("This job exited without all components finishing successfully. Halting.",386 # $remote_id,$fault,"halt");387 # }388 # else {389 # print "This job exited without all components finishing successfully. $fault\n" if $fault;390 # &my_die("This job finished. Setting remote job to full.",391 # $remote_id,0,"full");392 # }393 394 # Promote to finished.395 #&my_die(); # Not really, but I don't have the tool interface finished, so these are all just placeholders.396 450 # Quick review: 397 451 # new -> pending -> run -> full -
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_transfer_tool.pl
r37013 r37242 10 10 use Sys::Hostname; 11 11 12 my $local_raw = '/scratch3/watersc1/raw/'; 13 my $local_tmp = '/scratch3/watersc1/tmp/'; 12 my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; 13 $remote_root = '/scratch3/watersc1/'; 14 my $local_raw = "${remote_root}/raw/"; 15 my $local_tmp = "${remote_root}/tmp/"; 14 16 my $threads = 10; 15 17 my @hosts = ('ippc20.ipp.ifa.hawaii.edu','ippc24.ipp.ifa.hawaii.edu','ippc28.ipp.ifa.hawaii.edu', … … 68 70 } 69 71 elsif (!($fetch)) { # We are pushing 70 print { $filehandles[$i] } "${local_tmp}/$_" . "\n"; 72 # The rsync call expects to find files of a given name in the directory specified. 73 # print { $filehandles[$i] } "${local_tmp}/$_" . "\n"; 74 print { $filehandles[$i] } "$_" . "\n"; 71 75 } 72 76 } … … 112 116 113 117 # the transform bit is there because it looks like the ' gets dropped, so the * is interpreted, and why is our tar so out of date? 114 my $command = "tar cf - --ignore-failed-read --dereference --files-from=${transfer_filelist} | /usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar xf - -C /data/ --transform '" . 's,^.\*/data/,,' . "' --dereference"; 118 # my $command = "tar cf - --ignore-failed-read --dereference --files-from=${transfer_filelist} | /usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar xf - -C /data/ --transform '" . 's,^.\*/data/,,' . "' --dereference"; 119 my $command = "rsync -Lpt -e '/usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes' --files-from=${transfer_filelist} ${local_tmp} ${destination_host}:/"; 115 120 print STDERR "$command\n"; 116 121 … … 118 123 run(command => $command, verbose => $verbose); 119 124 unless ($success) { 120 121 125 print STDERR "ERROR: $error_code\n"; 122 126 # my $std = join "\n", @{ $stdout_buf }; … … 125 129 # print "STDERR: $std\n"; 126 130 127 foreach my $line (@{ $stderr_buf }) { # This is a hack. A messy ugly hack.128 if ($line =~ /No such file or directory/) {129 my $file = (split /\s+/, $line)[1];130 $file =~ s/:$//;131 if ($file !~ /nebulous/) { next; }132 print STDERR "Touching $file so tar can continue.\n";133 system("touch $file");134 }135 }131 # foreach my $line (@{ $stderr_buf }) { # This is a hack. A messy ugly hack. 132 # if ($line =~ /No such file or directory/) { 133 # my $file = (split /\s+/, $line)[1]; 134 # $file =~ s/:$//; 135 # if ($file !~ /nebulous/) { next; } 136 # print STDERR "Touching $file so tar can continue.\n"; 137 # system("touch $file"); 138 # } 139 # } 136 140 137 141 warn("Transfer of $transfer_filelist to $destination_host failed with error $error_code."); -
branches/eam_branches/ipp-20140717/ippTools/share/Makefile.am
r36981 r37242 484 484 releasetool_definerelstack.sql \ 485 485 releasetool_definerelstack_with_skycal.sql \ 486 releasetool_deleterelexp.sql \ 487 releasetool_deleterelstack.sql \ 486 488 releasetool_listrelstack.sql \ 489 releasetool_setrelstackcalibratedfromskycal.sql 487 490 releasetool_summary.sql \ 488 491 releasetool_definerelgroup_select_lap.sql \ -
branches/eam_branches/ipp-20140717/ippTools/src/disttool.c
r36555 r37242 605 605 PXOPT_COPY_TIME(config->args, where, "-time_stamp_begin", "distRun.time_stamp", ">="); 606 606 PXOPT_COPY_TIME(config->args, where, "-time_stamp_end", "distRun.time_stamp", "<="); 607 PXOPT_COPY_S64(config->args, where, "-dist_id_min", "dist_id", ">="); 608 PXOPT_COPY_S64(config->args, where, "-dist_id_max", "dist_id", "<="); 607 609 608 610 PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false); -
branches/eam_branches/ipp-20140717/ippTools/src/disttoolConfig.c
r36248 r37242 85 85 psMetadataAddTime(updaterunArgs, PS_LIST_TAIL, "-time_stamp_begin", 0, "limit updates by time_stamp (>=)", NULL); 86 86 psMetadataAddTime(updaterunArgs, PS_LIST_TAIL, "-time_stamp_end", 0, "limit updates by time_stamp (<=)", NULL); 87 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-dist_id_min", 0, "limit updates by dist_id (>=)", 0); 88 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-dist_id_max", 0, "limit updates by dist_id (<=)", 0); 87 89 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL,"-clean", 0, "limit updates to clean distRuns", false); 88 90 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL,"-full", 0, "limit updates to not clean distRuns", false); -
branches/eam_branches/ipp-20140717/ippTools/src/releasetool.c
r37075 r37242 44 44 static bool updaterelexpMode(pxConfig *config); 45 45 static bool listrelexpMode(pxConfig *config); 46 static bool deleterelexpMode(pxConfig *config); 46 47 static bool definerelstackMode(pxConfig *config); 47 48 static bool updaterelstackMode(pxConfig *config); 49 static bool setrelstackcalibratedfromskycalMode(pxConfig *config); 48 50 static bool listrelstackMode(pxConfig *config); 51 static bool deleterelstackMode(pxConfig *config); 49 52 static bool summaryMode(pxConfig *config); 50 53 static bool definerelgroupMode(pxConfig *config); … … 81 84 MODECASE(RELEASETOOL_MODE_UPDATERELEXP, updaterelexpMode); 82 85 MODECASE(RELEASETOOL_MODE_LISTRELEXP, listrelexpMode); 86 MODECASE(RELEASETOOL_MODE_DELETERELEXP, deleterelexpMode); 83 87 84 88 MODECASE(RELEASETOOL_MODE_DEFINERELSTACK, definerelstackMode); 85 89 MODECASE(RELEASETOOL_MODE_UPDATERELSTACK, updaterelstackMode); 90 MODECASE(RELEASETOOL_MODE_SETRELSTACKCALIBRATEDFROMSKYCAL, setrelstackcalibratedfromskycalMode); 86 91 MODECASE(RELEASETOOL_MODE_LISTRELSTACK, listrelstackMode); 92 MODECASE(RELEASETOOL_MODE_DELETERELSTACK, deleterelstackMode); 87 93 MODECASE(RELEASETOOL_MODE_SUMMARY, summaryMode); 88 94 … … 817 823 818 824 psFree(output); 825 826 return true; 827 } 828 829 static bool deleterelexpMode(pxConfig *config) 830 { 831 PS_ASSERT_PTR_NON_NULL(config, false); 832 833 PXOPT_LOOKUP_S64(relexp_id, config->args, "-relexp_id", false, false); 834 // If relexp_id is supplied that is all that we need 835 if (!relexp_id) { 836 // Otherwise we need to identify the release ... 837 PXOPT_LOOKUP_STR(release_name, config->args, "-release_name", false, false); 838 PXOPT_LOOKUP_S32(rel_id, config->args, "-rel_id", false, false); 839 840 if (!release_name && !rel_id) { 841 psError(PXTOOLS_ERR_CONFIG, true, "at least one of -relexp_id, -release_name, or -rel_id is required\n"); 842 return false; 843 } 844 // ... and the exposure 845 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 846 PXOPT_LOOKUP_S64(cam_id, config->args, "-cam_id", false, false); 847 PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", false, false); 848 PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", false, false); 849 if (!label && !cam_id && !exp_id && !exp_name) { 850 psError(PXTOOLS_ERR_CONFIG, true, "at least one of -label, -cam_id, -exp_id, -exp_name is required\n"); 851 return false; 852 } 853 } 854 855 psMetadata *where = psMetadataAlloc(); 856 857 PXOPT_COPY_S32(config->args, where, "-relexp_id", "relExp.relexp_id", "=="); 858 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 859 PXOPT_COPY_S64(config->args, where, "-cam_id", "relExp.cam_id", "=="); 860 PXOPT_COPY_S64(config->args, where, "-exp_id", "relExp.exp_id", "=="); 861 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); 862 863 PXOPT_COPY_S32(config->args, where, "-rel_id", "relExp.rel_id", "=="); 864 PXOPT_COPY_STR(config->args, where, "-release_name", "ippRelease.release_name", "=="); 865 866 psString query = pxDataGet("releasetool_deleterelexp.sql"); 867 868 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 869 psStringAppend(&query, "\n AND %s", whereClause); 870 psFree(whereClause); 871 872 if (!p_psDBRunQuery(config->dbh, query)) { 873 psError(PS_ERR_UNKNOWN, false, "database error"); 874 psFree(query); 875 return false; 876 } 877 878 psU64 affected = psDBAffectedRows(config->dbh); 879 psLogMsg("releasetool", PS_LOG_INFO, "Deleted %" PRIu64 " relExp rows", affected); 880 881 882 psFree(query); 819 883 820 884 return true; … … 1028 1092 return false; 1029 1093 } 1094 static bool setrelstackcalibratedfromskycalMode(pxConfig *config) 1095 { 1096 PS_ASSERT_PTR_NON_NULL(config, NULL); 1097 1098 psMetadata *where = psMetadataAlloc(); 1099 1100 PXOPT_COPY_STR(config->args, where, "-skycal_label", "skycalRun.label", "=="); 1101 PXOPT_COPY_STR(config->args, where, "-skycal_data_group", "skycalRun.data_group", "LIKE"); 1102 PXOPT_COPY_S64(config->args, where, "-skycal_id", "skycalRun.skycal_id", "=="); 1103 if (!psListLength(where->list)) { 1104 psError(PXTOOLS_ERR_CONFIG, false, "at least one of -skycal_label, -skycal_data_group, or -skycal_id is required"); 1105 return false; 1106 } 1107 1108 PXOPT_COPY_STR(config->args, where, "-tess_id", "stackRun.tess_id", "=="); 1109 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "=="); 1110 pxskycellAddWhere(config, where); 1111 1112 // insure that at least one of these is supplied to select the release 1113 PXOPT_LOOKUP_S64(rel_id, config->args, "-rel_id", false, false); 1114 PXOPT_LOOKUP_STR(release_name, config->args, "-release_name", false, false); 1115 if (!rel_id && !release_name) { 1116 psError(PXTOOLS_ERR_CONFIG, true, "either -rel_id or -release_name is required"); 1117 return false; 1118 } 1119 1120 // limit query to the target release. (Note: this will select nothing if release_name and rel_id don't match) 1121 // note: we add these after above to insure that search args are supplied 1122 PXOPT_COPY_STR(config->args, where, "-release_name", "ippRelease.release_name", "=="); 1123 PXOPT_COPY_S32(config->args, where, "-rel_id", "ippRelease.rel_id", "=="); 1124 1125 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 1126 PXOPT_LOOKUP_BOOL(replace, config->args, "-replace", false); 1127 1128 psString query = pxDataGet("releasetool_setrelstackcalibratedfromskycal.sql"); 1129 if (!query) { 1130 psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement"); 1131 psFree(where); 1132 return false; 1133 } 1134 1135 if (replace) { 1136 // don't cut on relStack.state 1137 psStringAppend(&query, "\nWHERE ");; 1138 } else { 1139 // normal path only update rows in state processed 1140 psStringAppend(&query, "\nWHERE relStack.state = 'processed'\nAND ");; 1141 } 1142 1143 // Add in the where conditions 1144 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 1145 psStringAppend(&query, "%s", whereClause); 1146 psFree(whereClause); 1147 1148 if (limit) { 1149 psString limitString = psDBGenerateLimitSQL(limit); 1150 psStringAppend(&query, " %s", limitString); 1151 psFree(limitString); 1152 } 1153 1154 if (!p_psDBRunQuery(config->dbh, query)) { 1155 psError(PS_ERR_UNKNOWN, false, "database error"); 1156 psFree(query); 1157 return false; 1158 } 1159 psFree(query); 1160 1161 psU64 affected = psDBAffectedRows(config->dbh); 1162 psLogMsg("releasetool", PS_LOG_INFO, "Updated %" PRIu64 " relStack rows", affected); 1163 1164 return true; 1165 } 1166 1167 static bool deleterelstackMode(pxConfig *config) 1168 { 1169 PS_ASSERT_PTR_NON_NULL(config, false); 1170 1171 PXOPT_LOOKUP_S64(relstack_id, config->args, "-relstack_id", false, false); 1172 // If relexp_id is supplied that is all that we need 1173 if (!relstack_id) { 1174 // Otherwise we need to identify the release ... 1175 PXOPT_LOOKUP_STR(release_name, config->args, "-release_name", false, false); 1176 PXOPT_LOOKUP_S32(rel_id, config->args, "-rel_id", false, false); 1177 1178 if (!release_name && !rel_id) { 1179 psError(PXTOOLS_ERR_CONFIG, true, "at least one of -relstack_id, -release_name, or -rel_id is required\n"); 1180 return false; 1181 } 1182 // ... and the Stack 1183 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 1184 PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", false, false); 1185 if (!label && !stack_id) { 1186 psError(PXTOOLS_ERR_CONFIG, true, "at least one of -label and -stack_id is required\n"); 1187 return false; 1188 } 1189 } 1190 1191 psMetadata *where = psMetadataAlloc(); 1192 1193 PXOPT_COPY_S32(config->args, where, "-relstack_id", "relStack.relstack_id", "=="); 1194 PXOPT_COPY_STR(config->args, where, "-label", "stackRun.label", "=="); 1195 PXOPT_COPY_S64(config->args, where, "-stack_id", "relStack.stack_id", "=="); 1196 1197 PXOPT_COPY_S32(config->args, where, "-rel_id", "relStack.rel_id", "=="); 1198 PXOPT_COPY_STR(config->args, where, "-release_name", "ippRelease.release_name", "=="); 1199 1200 psString query = pxDataGet("releasetool_deleterelstack.sql"); 1201 1202 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 1203 psStringAppend(&query, "\n AND %s", whereClause); 1204 psFree(whereClause); 1205 1206 if (!p_psDBRunQuery(config->dbh, query)) { 1207 psError(PS_ERR_UNKNOWN, false, "database error"); 1208 psFree(query); 1209 return false; 1210 } 1211 1212 psU64 affected = psDBAffectedRows(config->dbh); 1213 psLogMsg("releasetool", PS_LOG_INFO, "Deleted %" PRIu64 " relStack rows", affected); 1214 1215 1216 psFree(query); 1217 1218 return true; 1219 } 1030 1220 1031 1221 static bool listrelstackMode(pxConfig *config) … … 1052 1242 1053 1243 PXOPT_COPY_STR(config->args, where, "-surveyName", "survey.surveyName", "LIKE"); 1054 PXOPT_COPY_S32(config->args, where, "-rel_id", "rel Exp.rel_id", "==");1244 PXOPT_COPY_S32(config->args, where, "-rel_id", "relStack.rel_id", "=="); 1055 1245 pxskycellAddWhere(config, where); 1056 1246 -
branches/eam_branches/ipp-20140717/ippTools/src/releasetool.h
r36041 r37242 34 34 RELEASETOOL_MODE_TOCALIBEXP, 35 35 RELEASETOOL_MODE_LISTRELEXP, 36 RELEASETOOL_MODE_DELETERELEXP, 36 37 RELEASETOOL_MODE_DEFINERELSTACK, 37 38 RELEASETOOL_MODE_UPDATERELSTACK, 39 RELEASETOOL_MODE_SETRELSTACKCALIBRATEDFROMSKYCAL, 40 RELEASETOOL_MODE_DELETERELSTACK, 38 41 RELEASETOOL_MODE_TOCALIBSTACK, 39 42 RELEASETOOL_MODE_LISTRELSTACK, -
branches/eam_branches/ipp-20140717/ippTools/src/releasetoolConfig.c
r36046 r37242 67 67 psMetadataAddStr(definereleaseArgs, PS_LIST_TAIL, "-set_ubercal_file", 0, "define ubercal file name", NULL); 68 68 69 // -up tdaterelease69 // -updaterelease 70 70 psMetadata *updatereleaseArgs = psMetadataAlloc(); 71 71 … … 183 183 psMetadataAddBool(listrelexpArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 184 184 185 // -deleterelexp 186 psMetadata *deleterelexpArgs = psMetadataAlloc(); 187 psMetadataAddS64(deleterelexpArgs, PS_LIST_TAIL, "-relexp_id", 0, "select by released exposure ID", 0); 188 psMetadataAddS64(deleterelexpArgs, PS_LIST_TAIL, "-exp_id", 0, "select by exposure ID", 0); 189 psMetadataAddStr(deleterelexpArgs, PS_LIST_TAIL, "-exp_name", 0, "select by exposure name", NULL); 190 psMetadataAddS32(deleterelexpArgs, PS_LIST_TAIL, "-rel_id", 0, "select by release ID", 0); 191 psMetadataAddS32(deleterelexpArgs, PS_LIST_TAIL, "-cam_id", 0, "select by cam run ID", 0); 192 psMetadataAddStr(deleterelexpArgs, PS_LIST_TAIL, "-label", 0, "select by camRun.label", NULL); 193 psMetadataAddStr(deleterelexpArgs, PS_LIST_TAIL, "-release_name", 0, "select by release name (LIKE comparision)", NULL); 194 195 185 196 // -definerelstack 186 197 psMetadata *definerelstackArgs = psMetadataAlloc(); … … 248 259 psMetadataAddBool(listrelstackArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 249 260 261 // -updaterelstack 262 psMetadata *updaterelstackArgs = psMetadataAlloc(); 263 264 psMetadata *calibraterelstackArgs = psMetadataAlloc(); 265 266 // set the target release and collection of relStacks (one of these is required) 267 psMetadataAddStr(calibraterelstackArgs, PS_LIST_TAIL, "-release_name", 0, "define release name", NULL); 268 psMetadataAddS32(calibraterelstackArgs, PS_LIST_TAIL, "-rel_id", 0, "define release ID", 0); 269 270 // select the processing 271 psMetadataAddStr(calibraterelstackArgs, PS_LIST_TAIL, "-skycal_label", 0, "select by skycalRun.label", NULL); 272 psMetadataAddStr(calibraterelstackArgs, PS_LIST_TAIL, "-skycal_data_group", 0, "select by skycalRun.data_group", NULL); 273 psMetadataAddS64(calibraterelstackArgs, PS_LIST_TAIL, "-skycal_id", 0, "select by skycalRun.skycal_id", 0); 274 275 psMetadataAddStr(calibraterelstackArgs, PS_LIST_TAIL, "-tess_id", 0, "select by tess_id", NULL); 276 psMetadataAddStr(calibraterelstackArgs, PS_LIST_TAIL, "-skycell_id", 0, "select by skycell_id", NULL); 277 pxskycellAddArguments(calibraterelstackArgs); 278 279 psMetadataAddBool(calibraterelstackArgs, PS_LIST_TAIL, "-replace", 0, "replace any existing calibrations", false); 280 psMetadataAddU64(calibraterelstackArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 281 282 // -deleterelstack 283 psMetadata *deleterelstackArgs = psMetadataAlloc(); 284 psMetadataAddS64(deleterelstackArgs, PS_LIST_TAIL, "-relstack_id", 0, "select by released exposure ID", 0); 285 psMetadataAddS64(deleterelstackArgs, PS_LIST_TAIL, "-stack_id", 0, "select by stack ID", 0); 286 // psMetadataAddS64(deleterelstackArgs, PS_LIST_TAIL, "-skycal_id", 0, "select by skycal ID", 0); 287 psMetadataAddStr(deleterelstackArgs, PS_LIST_TAIL, "-release_name", 0, "select by release name (LIKE comparision)", NULL); 288 psMetadataAddS32(deleterelstackArgs, PS_LIST_TAIL, "-rel_id", 0, "select by release ID", 0); 289 290 psMetadataAddStr(deleterelstackArgs, PS_LIST_TAIL, "-label", 0, "select by stackRun.label", NULL); 291 // psMetadataAddStr(deleterelstackArgs, PS_LIST_TAIL, "-data_group", 0, "select by stackRun.data_group", NULL); 292 // psMetadataAddStr(deleterelstackArgs, PS_LIST_TAIL, "-skycal_label", 0, "select by skycalRun.label", NULL); 293 // psMetadataAddStr(deleterelstackArgs, PS_LIST_TAIL, "-skycal_data_group", 0, "select by skycalRun.data_group", NULL); 294 250 295 // -summary 251 296 psMetadata *summaryArgs = psMetadataAlloc(); … … 348 393 PXOPT_ADD_MODE("-tocalibexp", "list relExps pending calibration", RELEASETOOL_MODE_TOCALIBEXP, tocalibexpArgs); 349 394 PXOPT_ADD_MODE("-listrelexp", "list released exposures", RELEASETOOL_MODE_LISTRELEXP, listrelexpArgs); 395 PXOPT_ADD_MODE("-deleterelexp", "delete a released exposure", RELEASETOOL_MODE_DELETERELEXP, deleterelexpArgs); 350 396 351 397 PXOPT_ADD_MODE("-definerelstack", "define a released stack", RELEASETOOL_MODE_DEFINERELSTACK, definerelstackArgs); 352 398 PXOPT_ADD_MODE("-listrelstack", "list released stacks", RELEASETOOL_MODE_LISTRELSTACK, listrelstackArgs); 399 PXOPT_ADD_MODE("-updaterelstack", "update parameters of released stacks", RELEASETOOL_MODE_LISTRELSTACK, updaterelstackArgs); 400 PXOPT_ADD_MODE("-setrelstackcalibratedfromskycal", "update parameters of using skycalResults", RELEASETOOL_MODE_SETRELSTACKCALIBRATEDFROMSKYCAL, calibraterelstackArgs); 401 PXOPT_ADD_MODE("-deleterelstack", "update parameters of released stacks", RELEASETOOL_MODE_DELETERELSTACK, deleterelstackArgs); 402 353 403 PXOPT_ADD_MODE("-summary", "list stackSummaryes for released stacks", RELEASETOOL_MODE_SUMMARY, summaryArgs); 354 404 -
branches/eam_branches/ipp-20140717/ippTools/src/stacktool.c
r36361 r37242 260 260 // these are used to build the HAVING restriction 261 261 PXOPT_COPY_S32(config->args, having, "-min_num", "num_warp", ">="); 262 PXOPT_COPY_S32(config->args, having, "-max_num", "num_warp", "<="); 263 262 264 PXOPT_LOOKUP_S32(min_num, config->args, "-min_num", false, false); 263 265 if (min_num < 2) { -
branches/eam_branches/ipp-20140717/ippTools/src/stacktoolConfig.c
r36361 r37242 98 98 psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-random", 0, "use this number of random elements", 0); 99 99 psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-min_num", 0, "minimum number of inputs", 0); 100 psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-max_num", 0, "maximum number of inputs", 0); 100 101 psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-min_new", 0, "minimum number of new inputs", 0); 101 102 psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-min_frac", 0, "minumum fraction of new inputs", NAN); -
branches/eam_branches/ipp-20140717/ippTools/src/staticskytool.c
r36633 r37242 1057 1057 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 1058 1058 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 1059 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 1059 1060 1060 1061 psString query = pxDataGet("staticskytool_defineskycalrun.sql"); … … 1084 1085 } 1085 1086 1087 if (limit) { 1088 psString limitString = psDBGenerateLimitSQL(limit); 1089 psStringAppend(&query, "\n%s", limitString); 1090 psFree(limitString); 1091 } 1086 1092 1087 1093 if (!p_psDBRunQueryF(config->dbh, query, labelHook)) { … … 1171 1177 PXOPT_COPY_S64(config->args, where, "-sky_id", "sky_id", "=="); 1172 1178 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 1179 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "=="); 1173 1180 PXOPT_COPY_STR(config->args, where, "-label", "skycalRun.label", "=="); 1174 1181 PXOPT_COPY_STR(config->args, where, "-state", "skycalRun.state", "=="); -
branches/eam_branches/ipp-20140717/ippTools/src/staticskytoolConfig.c
r35960 r37242 181 181 psMetadataAddBool(defineskycalrunArgs, PS_LIST_TAIL, "-check_inputs", 0, "list inputs, do not modify database", false); 182 182 psMetadataAddBool(defineskycalrunArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 183 psMetadataAddU64(defineskycalrunArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 183 184 184 185 // -updateskycalrun … … 188 189 psMetadataAddS64(updateskycalrunArgs, PS_LIST_TAIL, "-stack_id", 0, "search by stack ID", 0); 189 190 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 191 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-skycell_id", 0, "search by skycell_id", 0); 190 192 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-label", 0, "search by label", 0); 191 193 pxskycellAddArguments(updateskycalrunArgs); -
branches/eam_branches/ipp-20140717/ippconfig
- Property svn:mergeinfo changed
/trunk/ippconfig (added) merged: 37152
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20140717/ippconfig/gpc1/psastro.config
r37071 r37242 379 379 # PSASTRO.CATDIR STR PS1.REF.20120503 380 380 # PSASTRO.CATDIR STR PS1.REF.20120524 381 PSASTRO.CATDIR STR PS1.REF.20140605 381 # PSASTRO.CATDIR STR PS1.REF.20140605 382 PSASTRO.CATDIR STR PS1.REF.20140713 382 383 ZERO.POINT.USE.MEAN BOOL TRUE 383 384 END -
branches/eam_branches/ipp-20140717/ippconfig/recipes/ppSub.config
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140717/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140717/psModules
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140717/pstamp/scripts/pstamp_checkdependent.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140717/pstamp/scripts/pstamp_finish.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140717/pstamp/scripts/pstampparse.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
