[Swift-commit] r6082 - trunk/bin
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Tue Nov 27 09:59:26 CST 2012
Author: wilde
Date: 2012-11-27 09:59:25 -0600 (Tue, 27 Nov 2012)
New Revision: 6082
Modified:
trunk/bin/slurm-qsub
trunk/bin/slurm-qsub-emulator
Log:
Adjust slurm pbs emulation code to honor advres resource attribute to pass reservation IDs.
Modified: trunk/bin/slurm-qsub
===================================================================
--- trunk/bin/slurm-qsub 2012-11-26 18:00:22 UTC (rev 6081)
+++ trunk/bin/slurm-qsub 2012-11-27 15:59:25 UTC (rev 6082)
@@ -18,6 +18,8 @@
sub(/nodes=/,"",nodes); sub(/:.*/,"",nodes);
sub(/^.*ppn=/,"",ppn); }
/#PBS -l walltime/ { walltime = $3; sub(/walltime=/,"",walltime);}
+#/#PBS -l advres/ { advres = "," $3; sub(/advres=/,"",advres); advres="," advres }
+/#PBS -l advres/ { advres = "," $3; }
/#PBS -q/ { queue = $3 }
/#PBS -o/ { sofile = $3 }
/#PBS -e/ { sefile = $3 }
@@ -29,8 +31,8 @@
# printf("-S %s -N %s -m %s -l nodes=%s:ppn=%s -l walltime=%s -q %s -o %s -e %s",
# shell, jobname, m, nodes, ppn, walltime, queue, sofile, sefile);
- printf("-N %s -m %s -l nodes=%s:ppn=%s,walltime=%s -q %s -o %s -e %s",
- jobname, m, nodes, ppn, walltime, queue, sofile, sefile);
+ printf("-N %s -m %s -l nodes=%s:ppn=%s,walltime=%s%s -q %s -o %s -e %s",
+ jobname, m, nodes, ppn, walltime, advres, queue, sofile, sefile);
}')
Modified: trunk/bin/slurm-qsub-emulator
===================================================================
--- trunk/bin/slurm-qsub-emulator 2012-11-26 18:00:22 UTC (rev 6081)
+++ trunk/bin/slurm-qsub-emulator 2012-11-27 15:59:25 UTC (rev 6082)
@@ -189,6 +189,7 @@
$command .= " --tmp=$res_opts{file}" if $res_opts{file};
$command .= " --mem=$res_opts{mem}" if $res_opts{mem};
$command .= " --nice=$res_opts{nice}" if $res_opts{nice};
+$command .= " --reservation=$res_opts{advres}" if $res_opts{advres};
# Cray-specific options
$command .= " -n$res_opts{mppwidth}" if $res_opts{mppwidth};
$command .= " -w$res_opts{mppnodes}" if $res_opts{mppnodes};
@@ -235,6 +236,7 @@
'pvmem' => "",
'software' => "",
'vmem' => "",
+ 'advres' => "",
# Cray-specific resources
'mppwidth' => "",
'mppdepth' => "",
@@ -246,9 +248,9 @@
my @keys = keys(%opt);
foreach my $key (@keys) {
- #print "$rl\n";
- ($opt{$key}) = $rl =~ m/$key=([\w:\+=+]+)/;
-
+ # print "key=$key rl=$rl\n";
+ ($opt{$key}) = $rl =~ m/$key=([-\w:\+=+]+)/;
+ # print " set to $opt{$key}\n";
}
if($opt{cput}) {
$opt{cput} = get_minutes($opt{cput});
More information about the Swift-commit
mailing list