IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38082


Ignore:
Timestamp:
Apr 2, 2015, 3:15:39 PM (11 years ago)
Author:
mhuber
Message:

changes specifically for ippmd:uhhpc stack processing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-mdpv3-20150326/ippScripts/scripts/sc_prepare_run.pl

    r37833 r38082  
    2424# my $remote_root   = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location
    2525my $remote_root = '/scratch3/watersc1/';
     26$remote_root = '/lus/scratch/mehuber7/';
    2627my $remote_raw    = "${remote_root}/tmp/";  # Directory to find raw data in.
    2728
     
    3536$job_cost{"chip"}   = 150 / 60 / 60;
    3637$job_cost{"warp"}   = 110 / 60 / 60;
    37 $job_cost{"stack"}  = 1500 / 60 / 60;
     38$job_cost{"stack"}  = 2; # 1500 / 60 / 60;
    3839$job_cost{"staticsky"} = 2; # really?  avg time of 5720s?
    3940
     
    4748$job_subscription{"staticsky"} = 3;
    4849
    49 my $proc_per_node = 24;                     # processors per node
     50my $proc_per_node = 20;                     # processors per node
    5051my $min_nodes     = 1;                      # smallest allocation to ask for
    51 my $max_nodes     = 1000;                   # largest allocation to ask for
     52my $max_nodes     = 10                   # largest allocation to ask for
    5253my $min_time      = 1;                      # shortest allocation to ask for
    5354my $max_time      = 8;                      # longest allocation to ask for
     
    217218
    218219# Construct the moab command last, so we can use the job_index counter to estimate resources.  Somehow.
     220if (($stage eq "stack")||($stage eq "staticsky")) {
     221    $threads = $job_subscription{$stage};  # Put this here instead of after the calculation to prevent underutilization
     222}
    219223my $proc_need = $job_index * $threads;       # how many total processors do we need?
    220224my $node_need = $proc_need / $proc_per_node; # this equals how many nodes?
    221225my $time_need = $job_index * $job_cost{$stage};      # How many seconds will this take?
    222 
     226print STDERR "## $job_index $threads $proc_need $node_need $time_need\n";
    223227my $fill_factor = 0.8;  # This is the factor of how much of the time allocation we'd like to fill
    224228my ($time_req,$node_req);
     
    226230    $time_req = $min_time;
    227231    $node_req = $min_nodes;
     232    print STDERR "CASE 1\n";
    228233}
    229234elsif ($node_need * $job_cost{$stage} > $fill_factor * $max_nodes * $max_time) {
     
    234239else {
    235240    $time_req = int(($node_need * $job_cost{$stage}) / ($fill_factor * $max_nodes)) + 1;
     241    if ($time_req < $job_cost{$stage}) {
     242        $time_req = $job_cost{$stage} + 1;
     243    }
    236244    $node_req = int(($node_need * $job_cost{$stage}) / ($fill_factor * $time_req)) + 1;
    237 }
    238 
     245    print STDERR "CASE 3\n";
     246}
     247print STDERR "## $job_index $threads $proc_need $node_need $time_need $time_req $node_req\n";
    239248# Most jobs only take 1 core, but ensure that we split them appropriately
    240 $node_req *= $job_subscription{$stage};
     249#$node_req *= $job_subscription{$stage};
    241250
    242251if (($stage eq "stack")||($stage eq "staticsky")) {
    243252    $time_req += 2;
     253    $time_req *= 2;
     254    $time_req = 72;
    244255} else {
    245256    $time_req += 1; # Safety addition.
     
    248259open(COMMAND,  ">$disk_command") || &my_die("Couldn't open file? $disk_command", $remote_id, $PS_EXIT_SYS_ERROR, $fail_state);
    249260print COMMAND "#!/bin/tcsh\n";
    250 print COMMAND "##### Moab controll lines\n";
    251 print COMMAND "#MSUB -l nodes=${node_req}:ppn=${proc_per_node},walltime=${time_req}:00:00\n"; ## CHECK RESOURCES
    252 print COMMAND "#MSUB -j oe\n";
    253 print COMMAND "#MSUB -V\n";
    254 print COMMAND "#MSUB -o ${remote_root}/stask_logs/${stage}.${remote_id}.out\n";
     261#print COMMAND "##### Moab controll lines\n";
     262#print COMMAND "#MSUB -l nodes=${node_req}:ppn=${proc_per_node},walltime=${time_req}:00:00\n"; ## CHECK RESOURCES
     263#print COMMAND "#MSUB -j oe\n";
     264#print COMMAND "#MSUB -V\n";
     265#print COMMAND "#MSUB -o ${remote_root}/stask_logs/${stage}.${remote_id}.out\n";
     266print COMMAND "###### sbatch control lines\n";
     267print COMMAND "#SBATCH --time ${time_req}:00:00\n";
     268print COMMAND "#SBATCH --nodes ${node_req}\n";
     269print COMMAND "#SBATCH --open-mode=append\n";
     270print COMMAND "#SBATCH --export=ALL\n";
     271print COMMAND "#SBATCH --exclusive\n";
     272print COMMAND "#SBATCH -o ${remote_root}/stask_logs/${stage}.${remote_id}.out\n";
    255273print COMMAND "date\n";
    256274print COMMAND 'srun -n $SLURM_JOB_NUM_NODES -m cyclic -l /bin/hostname | sort -n | awk \'{printf "%s\n", $2}\' > hosts.${SLURM_JOB_ID}' . "\n";
Note: See TracChangeset for help on using the changeset viewer.