Changeset 37332
- Timestamp:
- Aug 29, 2014, 3:18:55 PM (12 years ago)
- Location:
- tags/ipp-pv3-20140717/ippScripts/scripts
- Files:
-
- 2 deleted
- 11 edited
-
. (modified) (1 prop)
-
queuestaticsky.pl (modified) (1 prop)
-
sc_mk_stack_mdc.pl (modified) (1 diff)
-
sc_prepare_camera.pl (modified) (1 prop)
-
sc_prepare_chip.pl (modified) (1 diff)
-
sc_prepare_run.pl (modified) (3 diffs)
-
sc_prepare_stack.pl (modified) (2 diffs, 1 prop)
-
sc_prepare_warp.pl (modified) (1 diff, 1 prop)
-
sc_remote_exec.pl (modified) (1 prop)
-
sc_transfer_tool.pl (modified) (4 diffs, 1 prop)
-
sc_validate_files.pl (deleted)
-
sc_validate_processing.pl (deleted)
-
stack_skycell.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-pv3-20140717/ippScripts/scripts
- Property svn:mergeinfo set to
-
tags/ipp-pv3-20140717/ippScripts/scripts/queuestaticsky.pl
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20140717/ippScripts/scripts/queuestaticsky.pl (added) merged: 37242
- Property svn:mergeinfo changed
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_mk_stack_mdc.pl
r36844 r37332 1 1 #! /usr/bin/env perl 2 3 2 use Carp; 4 3 use warnings; 5 4 use strict; 6 5 6 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 7 use Pod::Usage qw( pod2usage ); 8 9 10 my $remote_root = '/scratch3/watersc1/'; 11 my 12 13 my ($compmap_file); 14 GetOptions( 15 'compmap=s' => \$compmap_file, 16 ) or pod2usage( 2 ); 17 18 pod2usage( -msg => "Required options: --compmap", -exitval => 3) unless 19 defined($compmap_file); 20 21 my %component_map = (); 22 open(CM,$compmap_file) || die "Cannot find requested compmap file"; 23 while(<CM>) { 24 chomp; 25 my ($symbolic_name,$disk_name) = split /\s+/; 26 $component_map{$symbolic_name} = $disk_name; 27 } 28 close(CM); 29 7 30 my $counter = 0; 8 31 9 32 foreach my $path_base (@ARGV) { 10 print "INPUT${counter} METADATA\n"; 11 print " IMAGE STR ${path_base}.fits\n"; 12 print " MASK STR ${path_base}.mask.fits\n"; 13 print " VARIANCE STR ${path_base}.wt.fits\n"; 14 print " PSF STR ${path_base}.psf\n"; 15 print " SOURCES STR ${path_base}.cmf\n"; 16 print " BKGMODEL STR ${path_base}.mdl.fits\n"; 17 print "END\n\n"; 33 my $mdc_content = ""; 34 my $file = ""; 35 my $error = 0; 36 #header 37 $mdc_content .= "INPUT${counter} METADATA\n"; 38 39 # check each file against its possible locations, incrementing the error counter if not found 40 $file = do_checks("${path_base}.fits",$error); 41 $mdc_content .= " IMAGE STR $file\n"; 42 43 $file = do_checks("${path_base}.mask.fits",$error); 44 $mdc_content .= " MASK STR $file\n"; 45 46 $file = do_checks("${path_base}.wt.fits",$error); 47 $mdc_content .= " VARIANCE STR $file\n"; 48 49 $file = do_checks("${path_base}.psf",$error); 50 $mdc_content .= " PSF STR $file\n"; 51 52 $file = do_checks("${path_base}.cmf",$error); 53 $mdc_content .= " SOURCES STR $file\n"; 54 55 # This is static, and isn't used by ppStack, but I believe needs to exist in the mdc. 2014-08-28 czw 56 $mdc_content .= " BKGMODEL STR ${path_base}.mdl.fits\n"; 57 $mdc_content .= "END\n\n"; 58 59 # If we had no errors, print it and move on. 60 if ($error != 0) { 61 print $mdc_content; 62 } 63 18 64 $counter++; 19 65 } 66 67 sub do_checks { 68 my $file = shift(@ARGV); 69 if (! ((-e $file)&&(-s $file))) { # This file does not exist or is zero size. 70 $file = "${remote_root}/tmp/$component_map{$file}"; 71 if (! ((-e $file)&&(-s $file))) { # The other expected file did not exist. 72 $file = ''; 73 die "Missing file!"; 74 } 75 } 76 return($file); 77 } 78 -
tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_camera.pl
- Property svn:mergeinfo deleted
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_chip.pl
r37316 r37332 22 22 my $remote_root = '/scratch3/watersc1/'; # Far side destination base location 23 23 my $remote_hostname = "LANL/Mustang"; # Name of the remote node. 24 my $remote_raw = "${remote_root}/ raw/"; # Directory to find raw data in.24 my $remote_raw = "${remote_root}/tmp/"; # Directory to find raw data in. 25 25 my $threads_req = 4; 26 26 -
tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_run.pl
r37298 r37332 24 24 # my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location 25 25 my $remote_root = '/scratch3/watersc1/'; 26 my $remote_raw = "${remote_root}/ raw/"; # Directory to find raw data in.26 my $remote_raw = "${remote_root}/tmp/"; # Directory to find raw data in. 27 27 28 28 my $threads = 2; # How many threads are we going to use? … … 36 36 $job_cost{"warp"} = 110 / 60 / 60; 37 37 $job_cost{"stack"} = 1500 / 60 / 60; 38 39 # This object holds how "expensive" a given job is in terms of cores on a node. 40 # Passed to stask to limit how many jobs run simultaneously 41 my %job_subscription = (); 42 $job_subscription{"camera"} = 1; 43 $job_subscription{"chip"} = 1; 44 $job_subscription{"warp"} = 1; 45 $job_subscription{"stack"} = 3; 38 46 39 47 my $proc_per_node = 24; # processors per node … … 236 244 print COMMAND "date\n"; 237 245 print COMMAND 'srun -n $SLURM_JOB_NUM_NODES -m cyclic -l /bin/hostname | sort -n | awk \'{printf "%s\n", $2}\' > hosts.${SLURM_JOB_ID}' . "\n"; 238 print COMMAND "${remote_root}/stask_chip.py $remote_config " . 'hosts.${SLURM_JOB_ID} 1'. "\n";246 print COMMAND "${remote_root}/stask_chip.py $remote_config " . 'hosts.${SLURM_JOB_ID} ' . $job_subscription{$stage} . "\n"; 239 247 print COMMAND "date\n"; 240 248 close(COMMAND); -
tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_stack.pl
- Property svn:mergeinfo deleted
r37322 r37332 136 136 # STEP 3: Iterate over the sub-components 137 137 { 138 # Generate a file mapping the symbolic and "disk" representations of each needed file. 139 my $uri_compmap = ${remote_outroot}.compmap; 140 my $component_map = $ipprc->file_resolve($uri_compmap,1); 141 my ($ipp_compmap, $remote_compmap) = &uri_to_outputs($component_map); 142 open(COMPMAP,">$ipp_compmap") || &my_die("Couldn't open file? $ipp_compmap", $remote_id, $stack_id, $PS_EXIT_SYS_ERROR, $fail_state); 143 144 # Loop over all needed components for this stack. 138 145 my $warp_path_base_string = ""; 139 146 foreach my $warpEntry ( @{ $warpData } ) { … … 145 152 146 153 # Append file names to transfer lists so we can recover if warps are deleted. 147 &uri_to_outputs($warp_path_base . ".fits"); 148 &uri_to_outputs($warp_path_base . ".wt.fits"); 149 &uri_to_outputs($warp_path_base . ".mask.fits"); 150 &uri_to_outputs($warp_path_base . ".cmf"); 151 # &uri_to_outputs($warp_path_base . ".psf"); 152 } 153 my $mk_mdc_command = "mkdir -p $remote_outdir && sc_mk_stack_mdc.pl $warp_path_base_string > ${remote_outroot}.in.mdc"; 154 my $remote_file; 155 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".fits"); 156 print COMPMAP "${warp_path_base}.fits $remote_file\n"; 157 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".wt.fits"); 158 print COMPMAP "${warp_path_base}.wt.fits $remote_file\n"; 159 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".mask.fits"); 160 print COMPMAP "${warp_path_base}.maskfits $remote_file\n"; 161 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".cmf"); 162 print COMPMAP "${warp_path_base}.cmf $remote_file\n"; 163 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".psf"); 164 print COMPMAP "${warp_path_base}.psf $remote_file\n"; 165 } 166 167 close(COMPMAP); 168 169 my $mk_mdc_command = "mkdir -p $remote_outdir && sc_mk_stack_mdc.pl --compmap $remote_compmap $warp_path_base_string > ${remote_outroot}.in.mdc"; 154 170 my $recipe_ppstack = $ipprc->reduction($reduction, 'STACK_PPSTACK'); # Recipe to use 155 171 my $ppstack_command = " ppStack -input ${remote_outroot}.in.mdc "; -
tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_warp.pl
- Property svn:mergeinfo deleted
r37322 r37332 184 184 185 185 my $post_cmd_echo = " echo -n \"warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id "; 186 $post_cmd_echo .= " -path_base $remote_outroot -uri UNKNOWN ";187 186 $post_cmd_echo .= " -dbname $dbname " if defined $dbname; 187 $post_cmd_echo .= " -uri ${ipp_outroot}.fits "; 188 188 $post_cmd_echo .= " -path_base $ipp_outroot -hostname $remote_hostname -dtime_script 0 \" > ${remote_outroot}.dbinfo "; 189 189 -
tags/ipp-pv3-20140717/ippScripts/scripts/sc_remote_exec.pl
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_remote_exec.pl (added) merged: 37242 /trunk/ippScripts/scripts/sc_remote_exec.pl merged: 37245
- Property svn:mergeinfo changed
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_transfer_tool.pl
- Property svn:mergeinfo deleted
r37324 r37332 16 16 $remote_root = '/scratch3/watersc1/'; 17 17 18 my $local_raw = "${remote_root}/raw/";18 #my $local_raw = "${remote_root}/tmp/"; 19 19 my $local_tmp = "${remote_root}/tmp/"; 20 20 my $threads = 11; … … 79 79 # split in input file list 80 80 unless(-d $local_tmp) { system("mkdir -p $local_tmp"); } 81 unless(-d $local_raw) { system("mkdir -p $local_raw"); }81 #unless(-d $local_raw) { system("mkdir -p $local_raw"); } 82 82 83 83 # we have two modes: fetch (-> LANL) and return (-> IPP) … … 212 212 my $option = $server_options{$destination_host}; 213 213 214 my $command = "rsync -L t--size-only --omit-dir-times -e '$ssh_cmd ${option}' --files-from=${transfer_filelist} ${local_tmp} ${destination_host}:/";214 my $command = "rsync -L --size-only --omit-dir-times -e '$ssh_cmd ${option}' --files-from=${transfer_filelist} ${local_tmp} ${destination_host}:/"; 215 215 print STDERR "$command\n"; 216 216 … … 248 248 my $option = $server_options{$destination_host}; 249 249 250 my $command = "rsync --size-only -e '$ssh_cmd ${option}' --files-from=${transfer_filelist} ${destination_host}:/ ${local_ raw}";250 my $command = "rsync --size-only -e '$ssh_cmd ${option}' --files-from=${transfer_filelist} ${destination_host}:/ ${local_tmp}"; 251 251 print STDERR "$command\n"; 252 252 -
tags/ipp-pv3-20140717/ippScripts/scripts/stack_skycell.pl
r36397 r37332 225 225 $num++; 226 226 227 my $image = $file->{uri}; # Image name 227 # my $image = $file->{uri}; # Image name 228 my $image = $ipprc->filename("PSWARP.OUTPUT", $file->{path_base} ); # Image name 228 229 my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name 229 230 my $weight = $ipprc->filename( "PSWARP.OUTPUT.VARIANCE", $file->{path_base} ); # Weight name
Note:
See TracChangeset
for help on using the changeset viewer.
