Changeset 38082
- Timestamp:
- Apr 2, 2015, 3:15:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-mdpv3-20150326/ippScripts/scripts/sc_prepare_run.pl
r37833 r38082 24 24 # my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location 25 25 my $remote_root = '/scratch3/watersc1/'; 26 $remote_root = '/lus/scratch/mehuber7/'; 26 27 my $remote_raw = "${remote_root}/tmp/"; # Directory to find raw data in. 27 28 … … 35 36 $job_cost{"chip"} = 150 / 60 / 60; 36 37 $job_cost{"warp"} = 110 / 60 / 60; 37 $job_cost{"stack"} = 1500 / 60 / 60;38 $job_cost{"stack"} = 2; # 1500 / 60 / 60; 38 39 $job_cost{"staticsky"} = 2; # really? avg time of 5720s? 39 40 … … 47 48 $job_subscription{"staticsky"} = 3; 48 49 49 my $proc_per_node = 2 4; # processors per node50 my $proc_per_node = 20; # processors per node 50 51 my $min_nodes = 1; # smallest allocation to ask for 51 my $max_nodes = 10 00;# largest allocation to ask for52 my $max_nodes = 10; # largest allocation to ask for 52 53 my $min_time = 1; # shortest allocation to ask for 53 54 my $max_time = 8; # longest allocation to ask for … … 217 218 218 219 # Construct the moab command last, so we can use the job_index counter to estimate resources. Somehow. 220 if (($stage eq "stack")||($stage eq "staticsky")) { 221 $threads = $job_subscription{$stage}; # Put this here instead of after the calculation to prevent underutilization 222 } 219 223 my $proc_need = $job_index * $threads; # how many total processors do we need? 220 224 my $node_need = $proc_need / $proc_per_node; # this equals how many nodes? 221 225 my $time_need = $job_index * $job_cost{$stage}; # How many seconds will this take? 222 226 print STDERR "## $job_index $threads $proc_need $node_need $time_need\n"; 223 227 my $fill_factor = 0.8; # This is the factor of how much of the time allocation we'd like to fill 224 228 my ($time_req,$node_req); … … 226 230 $time_req = $min_time; 227 231 $node_req = $min_nodes; 232 print STDERR "CASE 1\n"; 228 233 } 229 234 elsif ($node_need * $job_cost{$stage} > $fill_factor * $max_nodes * $max_time) { … … 234 239 else { 235 240 $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 } 236 244 $node_req = int(($node_need * $job_cost{$stage}) / ($fill_factor * $time_req)) + 1; 237 } 238 245 print STDERR "CASE 3\n"; 246 } 247 print STDERR "## $job_index $threads $proc_need $node_need $time_need $time_req $node_req\n"; 239 248 # 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}; 241 250 242 251 if (($stage eq "stack")||($stage eq "staticsky")) { 243 252 $time_req += 2; 253 $time_req *= 2; 254 $time_req = 72; 244 255 } else { 245 256 $time_req += 1; # Safety addition. … … 248 259 open(COMMAND, ">$disk_command") || &my_die("Couldn't open file? $disk_command", $remote_id, $PS_EXIT_SYS_ERROR, $fail_state); 249 260 print 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"; 266 print COMMAND "###### sbatch control lines\n"; 267 print COMMAND "#SBATCH --time ${time_req}:00:00\n"; 268 print COMMAND "#SBATCH --nodes ${node_req}\n"; 269 print COMMAND "#SBATCH --open-mode=append\n"; 270 print COMMAND "#SBATCH --export=ALL\n"; 271 print COMMAND "#SBATCH --exclusive\n"; 272 print COMMAND "#SBATCH -o ${remote_root}/stask_logs/${stage}.${remote_id}.out\n"; 255 273 print COMMAND "date\n"; 256 274 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";
Note:
See TracChangeset
for help on using the changeset viewer.
