IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37544


Ignore:
Timestamp:
Oct 31, 2014, 5:03:04 PM (12 years ago)
Author:
watersc1
Message:

Changes to support addition of staticsky processing at lanl.

Location:
tags/ipp-pv3-20140717
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140717/ippScripts/Build.PL

    r37316 r37544  
    138138        scripts/stack_bkg_mk_mdc.pl
    139139        scripts/sc_mk_stack_mdc.pl
     140        scripts/sc_mk_staticsky_mdc.pl
    140141        scripts/sc_prepare_camera.pl
    141142        scripts/sc_prepare_chip.pl
    142143        scripts/sc_prepare_stack.pl
     144        scripts/sc_prepare_staticsky.pl
    143145        scripts/sc_prepare_warp.pl
    144146        scripts/sc_prepare_run.pl
  • tags/ipp-pv3-20140717/ippScripts/MANIFEST

    r37316 r37544  
    5151scripts/regenerate_background.pl
    5252scripts/sc_mk_stack_mdc.pl
     53scripts/sc_mk_staticsky_mdc.pl
    5354scripts/sc_prepare_camera.pl
    5455scripts/sc_prepare_chip.pl
    5556scripts/sc_prepare_stack.pl
     57scripts/sc_prepare_staticsky.pl
    5658scripts/sc_prepare_warp.pl
    5759scripts/sc_remote_exec.pl
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_mk_stack_mdc.pl

    r37345 r37544  
    7272    if (! ((-e $cfile)&&(-s $cfile))) { # This cfile does not exist or is zero size.
    7373        my $disk = $component_map{$cfile};
    74         $cfile = "${remote_root}/tmp/${disk}";
     74        $cfile = "${disk}";
    7575        if (! ((-e $cfile)&&(-s $cfile))) { # The other expected cfile did not exist.
    76             $cfile = '';
     76#           $cfile = '';
    7777            $error++;
    78             die "Missing cfile!";
     78            die "Missing cfile $cfile!";
    7979        }
    8080    }
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_run.pl

    r37391 r37544  
    3636$job_cost{"warp"}   = 110 / 60 / 60;
    3737$job_cost{"stack"}  = 1500 / 60 / 60;
     38$job_cost{"staticsky"} = 2; # really?  avg time of 5720s?
    3839
    3940# This object holds how "expensive" a given job is in terms of cores on a node. 
     
    4445$job_subscription{"warp"}   = 1;
    4546$job_subscription{"stack"}  = 3;
     47$job_subscription{"staticsky"} = 3;
    4648
    4749my $proc_per_node = 24;                     # processors per node
     
    235237}
    236238
    237 if ($stage eq "stack") {
     239# Most jobs only take 1 core, but ensure that we split them appropriately
     240$node_req *= $job_subscription{$stage};
     241
     242if (($stage eq "stack")||($stage eq "staticsky")) {
    238243    $time_req += 2;
    239     $node_req *= $job_subscription{$stage};
    240244} else {
    241245    $time_req += 1; # Safety addition.
     
    251255print COMMAND "date\n";
    252256print COMMAND 'srun -n $SLURM_JOB_NUM_NODES -m cyclic -l /bin/hostname | sort -n | awk \'{printf "%s\n", $2}\' > hosts.${SLURM_JOB_ID}' . "\n";
    253 if ($stage eq "stack") {
     257if (($stage eq "stack")||($stage eq "staticsky")) {
    254258    print COMMAND "${remote_root}/stask_stack.py $remote_config " . 'hosts.${SLURM_JOB_ID} '  . $job_subscription{$stage} . "\n";
    255259}
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_staticsky.pl

    r37441 r37544  
    3737}
    3838
    39 my ($remote_id,$stack_id,$camera,$dbname,$verbose,$path_base,$no_update);
     39my ($remote_id,$sky_id,$camera,$dbname,$verbose,$path_base,$no_update);
    4040GetOptions(
    4141    'remote_id=s'    => \$remote_id,
     
    6060my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    6161
    62 my @return_component_list = ("LOG.EXP",
    63                              "PSPHOT.CHISQ.IMAGE","PSPHOT.CHISQ.MASK","PSPHOT.CHISQ.VARIANCE");
     62my @return_component_list = ("LOG.EXP","PSPHOT.STACK.CONFIG","DBINFO.EXP");
     63                             
     64                         #    "PSPHOT.CHISQ.IMAGE","PSPHOT.CHISQ.MASK","PSPHOT.CHISQ.VARIANCE");
    6465                             
    65 my @return_component_list_per_input = ("PSPHOT.STACK.OUTPUT.IMAGE","PSPHOT.STACK.OUTPUT.MASK","PSPHOT.STACK.OUTPUT.VARIANCE","PSPHOT.STACK.OUTPUT");
     66my @return_component_list_per_input = (#"PSPHOT.STACK.OUTPUT.IMAGE","PSPHOT.STACK.OUTPUT.MASK","PSPHOT.STACK.OUTPUT.VARIANCE","PSPHOT.STACK.OUTPUT");
     67                                       "PSPHOT.STACK.OUTPUT",
     68                                       "PSPHOT.STACK.PSF.SAVE",
     69                                       "PSPHOT.STACK.BACKMDL");
    6670
    6771# STEP 0: Open output files
     
    9195my ($reduction, $workdir, $tess_id, $skycell_id);
    9296{
    93     my $command = "$staticskytool -pendingskycalrun -sky_id $sky_id";
     97    my $command = "$staticskytool -todo -sky_id $sky_id";
    9498    $command .= " -dbname $dbname " if defined($dbname);
    9599    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    151155        my $remote_path_base = &uri_local_to_remote($input_path_base);
    152156        $input_path_base_string .= " $remote_path_base ";
    153         $input_path_base_string .= " $stack_id ";
     157        $input_path_base_string .= " $input_stack_id ";
    154158        if ($verbose) { print STDERR "$input_path_base_string\n"; }
    155159
     
    170174        ($ipp_disk,undef)    = &uri_convert($input_path_base . ".unconv.num.fits");
    171175        print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n";
    172         (undef,$remote_file) = &uri_to_outputs($input_path_base . ".cmf");
    173         ($ipp_disk,undef)    = &uri_convert($input_path_base . ".cmf");
    174         print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n";
    175         (undef,$remote_file) = &uri_to_outputs($input_path_base . ".psf");
    176         ($ipp_disk,undef)    = &uri_convert($input_path_base . ".psf");
    177         print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n";
     176#         (undef,$remote_file) = &uri_to_outputs($input_path_base . ".cmf");
     177#       ($ipp_disk,undef)    = &uri_convert($input_path_base . ".cmf");
     178#       print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n";
     179#       (undef,$remote_file) = &uri_to_outputs($input_path_base . ".psf");
     180#       ($ipp_disk,undef)    = &uri_convert($input_path_base . ".psf");
     181#       print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n";
    178182
    179183        $nInputs++;
     
    188192
    189193    my $pps_command  = " psphotStack -input ${remote_outroot}.in.mdc ";
    190     $pps_command    .= " ${remote_outroot} -stats ${remote_outroot}.stats ";
     194    $pps_command    .= " ${remote_outroot} ";
    191195    $pps_command    .= " -recipe PSPHOT $recipe_psphot ";
    192196    $pps_command    .= " -recipe PPSUB  $recipe_ppsub ";
     
    194198    $pps_command    .= " -tracedest ${remote_outroot}.trace -log ${remote_outroot}.log ";
    195199    $pps_command    .= " -threads $threads_req ";
    196     $pps_command    .= " -dumpconfig ${remote_outroot}.mdc ";
     200    $pps_command    .= " -dumpconfig ${remote_outroot}.psphotStack.mdc ";
    197201
    198202    my $post_cmd_echo = " echo -n \"staticskytool  -addresult -sky_id $sky_id ";
    199     $post_cmd_echo   .= " -path_base $ipp_outroot -uri UNKNOWN -num_inputs $nInputs ";
     203    $post_cmd_echo   .= " -path_base $ipp_outroot -num_inputs $nInputs ";
    200204    $post_cmd_echo   .=  " -dbname $dbname " if defined $dbname;
    201205    $post_cmd_echo   .= " -hostname $remote_hostname -dtime_script 0 \" > ${remote_outroot}.dbinfo ";
     
    220224        foreach my $component (@return_component_list_per_input) {
    221225            my $filename = $ipprc->filename($component,$ipp_outroot,$stack_id);
    222             my ($ipp_disk, $remote_disk) = &uri_to_outputs_for_retrun( $filename );
     226            my ($ipp_disk, $remote_disk) = &uri_to_outputs_for_return( $filename );
    223227            my $remote_outroot_dir = dirname($ipp_disk);
    224228            print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk ";
  • tags/ipp-pv3-20140717/ippTasks/remote.pro

    r37335 r37544  
    2626#  warp
    2727  stack
     28  staticsky
    2829end
    2930
     
    291292      $command = sc_prepare_stack.pl --camera GPC1 --stack_id $STAGE_ID --remote_id $REMOTE_ID --path_base $outroot --dbname $DBNAME
    292293    end
     294    if ("$STAGE" == "staticsky")
     295      $command = sc_prepare_staticsky.pl --camera GPC1 --sky_id $STAGE_ID --remote_id $REMOTE_ID --path_base $outroot -dbname $DBNAME
     296    end
    293297
    294298    options $pageName
  • tags/ipp-pv3-20140717/ippTools/share/Makefile.am

    r37283 r37544  
    508508        remotetool_definebyquery_warp.sql \
    509509        remotetool_definebyquery_stack.sql \
     510        remotetool_definebyquery_staticsky.sql \
    510511        remotetool_dropcomponent.sql \
    511512        remotetool_listcomponent.sql \
  • tags/ipp-pv3-20140717/ippTools/src/remotetool.c

    r37440 r37544  
    144144  else if (!strcmp(stage,"stack")) {
    145145    query = pxDataGet("remotetool_definebyquery_stack.sql");
     146    if (!query) {
     147      psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement");
     148      return(false);
     149    }
     150
     151    if (label) {
     152      psStringAppend(&whereOption, "\n AND (label = '%s')", label);
     153    }
     154  }
     155  else if (!strcmp(stage,"staticsky")) {
     156    query = pxDataGet("remotetool_definebyquery_staticsky.sql");
    146157    if (!query) {
    147158      psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement");
Note: See TracChangeset for help on using the changeset viewer.