Changeset 37025 for branches/eam_branches/ipp-20140610/ippScripts/scripts
- Timestamp:
- Jul 16, 2014, 3:29:14 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140610/ippScripts/scripts
- Files:
-
- 7 edited
-
queuestaticsky.pl (modified) (1 prop)
-
sc_prepare_camera.pl (modified) (1 diff)
-
sc_prepare_chip.pl (modified) (2 diffs)
-
sc_prepare_stack.pl (modified) (2 diffs)
-
sc_prepare_warp.pl (modified) (3 diffs)
-
sc_transfer_tool.pl (modified) (9 diffs)
-
skycell_jpeg.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140610/ippScripts/scripts/queuestaticsky.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_prepare_camera.pl
r36884 r37025 351 351 352 352 if (defined $id and not $no_update) { 353 my $command = "remotetool -updaterun - stage_id $id";353 my $command = "remotetool -updaterun -remote_id $id"; 354 354 $command .= " -fault $exit_code " if defined $exit_code; 355 355 $command .= " -set_state $exit_state " if defined $exit_state; -
branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_prepare_chip.pl
r36884 r37025 127 127 $detselect_command2 .= " -det_id $det_id "; 128 128 $detselect_command2 .= " -iteration $det_iter "; 129 $detselect_command2 .= " -dbname $dbname " if defined($dbname); 129 130 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 130 131 run(command => $detselect_command2, verbose => 0); … … 534 535 535 536 if (defined $id and not $no_update) { 536 my $command = "remotetool -updaterun - stage_id $id";537 my $command = "remotetool -updaterun -remote_id $id"; 537 538 $command .= " -fault $exit_code " if defined $exit_code; 538 539 $command .= " -set_state $exit_state " if defined $exit_state; -
branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_prepare_stack.pl
r36928 r37025 168 168 my $remote_path_base = uri_local_to_remote($warp_path_base); 169 169 $warp_path_base_string .= " $remote_path_base "; 170 171 # Append file names to transfer lists so we can recover if warps are deleted. 172 uri_to_outputs($warp_path_base . ".fits"); 173 uri_to_outputs($warp_path_base . ".wt.fits"); 174 uri_to_outputs($warp_path_base . ".mask.fits"); 175 uri_to_outputs($warp_path_base . ".cmf"); 176 # uri_to_outputs($warp_path_base . ".psf"); 170 177 } 171 178 my $mk_mdc_command = "mkdir -p $remote_outdir && sc_mk_stack_mdc.pl $warp_path_base_string > ${remote_outroot}.in.mdc"; … … 350 357 351 358 if (defined $id and not $no_update) { 352 my $command = "remotetool -updaterun - stage_id $id";359 my $command = "remotetool -updaterun -remote_id $id"; 353 360 $command .= " -fault $exit_code " if defined $exit_code; 354 361 $command .= " -set_state $exit_state " if defined $exit_state; -
branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_prepare_warp.pl
r36884 r37025 27 27 my $max_time = 8; # longest allocation to ask for 28 28 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"," LOG.EXP","TRACE.EXP");29 my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","PSPHOT.PSF.SAVE","LOG.EXP","TRACE.EXP"); 30 30 # Look for programs we need 31 31 my $missing_tools; … … 118 118 # This actually returns all the individual warp/skyfiles that comprise this run. Because consistency. 119 119 my $command = "$warptool -towarped -warp_id $warp_id "; 120 $command .= " -dbname $dbname " if defined($dbname); 120 121 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 121 122 run(command => $command, verbose => 0); … … 366 367 367 368 if (defined $id and not $no_update) { 368 my $command = "remotetool -updaterun - stage_id $id";369 my $command = "remotetool -updaterun -remote_id $id"; 369 370 $command .= " -fault $exit_code " if defined $exit_code; 370 371 $command .= " -set_state $exit_state " if defined $exit_state; -
branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_transfer_tool.pl
r36928 r37025 12 12 my $local_raw = '/scratch3/watersc1/raw/'; 13 13 my $local_tmp = '/scratch3/watersc1/tmp/'; 14 my $threads = 8;14 my $threads = 10; 15 15 my @hosts = ('ippc20.ipp.ifa.hawaii.edu','ippc24.ipp.ifa.hawaii.edu','ippc28.ipp.ifa.hawaii.edu', 16 16 'ippc21.ipp.ifa.hawaii.edu','ippc25.ipp.ifa.hawaii.edu','ippc29.ipp.ifa.hawaii.edu', 17 17 'ippc22.ipp.ifa.hawaii.edu','ippc26.ipp.ifa.hawaii.edu', 18 'ippc23.ipp.ifa.hawaii.edu','ippc27.ipp.ifa.hawaii.edu'); 18 'ippc23.ipp.ifa.hawaii.edu','ippc27.ipp.ifa.hawaii.edu' ); 19 @hosts = (@hosts, @hosts, @hosts, @hosts, @hosts); 19 20 my $input_file; 20 21 my $verbose = 0; 21 22 my $fetch = 0; 23 my $offset = 0; 22 24 23 25 GetOptions( … … 25 27 'input=s' => \$input_file, 26 28 'fetch=s' => \$fetch, 29 'offset=s' => \$offset, 27 30 'verbose' => \$verbose, 28 31 ) or pod2usage( 2 ); … … 45 48 my @filehandles; 46 49 my $i; 50 my $line = 0; 47 51 for ($i = 0; $i < $threads; $i++) { 48 52 open($filehandles[$i], ">${local_tmp}/${input_base}.${i}"); … … 51 55 while(<I>) { 52 56 chomp; 53 $i = int(rand($#filehandles)); 57 $line++; 58 if ($line < $offset) { next; } # I think this is off-by-one in a safe direction 59 60 $i = int(rand($#filehandles + 1)); 54 61 55 62 my $fline; … … 59 66 if (($fetch)&&(!(-e $_))) { # We are fetching, and do not already have this file. 60 67 print { $filehandles[$i] } $fline; 61 # $i++;62 68 } 63 69 elsif (!($fetch)) { # We are pushing 64 # if (-e "${local_tmp}/$_") { 65 print { $filehandles[$i] } "${local_tmp}/$_" . "\n"; 66 # $i++; 67 # } 68 # else { # But somehow couldn't find the file we expected 69 # print STDERR "Expected file ${local_tmp}/$_ not found!\n"; 70 # die; 71 # } 70 print { $filehandles[$i] } "${local_tmp}/$_" . "\n"; 72 71 } 73 # if ($i >= $threads) { $i = 0; }74 72 } 75 73 close(I); … … 84 82 $pids[$i] = fork(); 85 83 if ($pids[$i] == 0) { 86 my $host = $hosts[ rand($#hosts)];87 my $code ;84 my $host = $hosts[$i]; 85 my $code = 0; 88 86 if ($fetch) { 89 87 $code = fetch_task($host,"${input_base}.${i}", 0); … … 98 96 waitpid($pids[$i],0); 99 97 } 100 # die;101 # if ($fetch) {102 # system("parallel -j $threads ln -sf ${local_tmp}/{2} {1} :::: $input_file :::: $fetch");103 # }104 98 105 99 for ($i = 0; $i < $threads; $i++) { … … 117 111 my $error = shift; 118 112 119 my $command = "tar cf - --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"; # 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? 113 # 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"; 120 115 print STDERR "$command\n"; 121 # die; 116 122 117 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 123 118 run(command => $command, verbose => $verbose); 124 119 unless ($success) { 125 $error_code = (($error_code >> 8) or 4); 120 121 print STDERR "ERROR: $error_code\n"; 122 # my $std = join "\n", @{ $stdout_buf }; 123 # print "STDOUT: $std\n"; 124 # $std = join "\n", @{ $stderr_buf }; 125 # print "STDERR: $std\n"; 126 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 } 136 126 137 warn("Transfer of $transfer_filelist to $destination_host failed with error $error_code."); 127 138 $error++; … … 142 153 143 154 system("/usr/projects/cosmo/amd6100/bin/scp -o NoneSwitch=yes -o NoneEnabled=yes ${local_tmp}/${transfer_filelist} ${destination_host}:/tmp/"); 144 my $command = "/usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar cf - -- dereference --files-from=/tmp/${transfer_filelist} | tar xf - -C ${local_raw} --skip-old-files --warning=existing-file --dereference ";155 my $command = "/usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar cf - --ignore-failed-read --dereference --files-from=/tmp/${transfer_filelist} | tar xf - -C ${local_raw} --skip-old-files --warning=existing-file --dereference "; 145 156 print STDERR "$command\n"; 146 157 -
branches/eam_branches/ipp-20140610/ippScripts/scripts/skycell_jpeg.pl
r36360 r37025 275 275 'exp' => "PPSTACK.UNCONV.EXP", 276 276 'num' => "PPSTACK.UNCONV.EXPNUM", 277 'bkg' => "PPSTACK.OUTPUT.BKGMODEL"277 # 'bkg' => "PPSTACK.OUTPUT.BKGMODEL" 278 278 ); 279 279
Note:
See TracChangeset
for help on using the changeset viewer.
