<br><font size=2 face="sans-serif">Hi,</font>
<br><font size=2 face="sans-serif">I'm agree with what you said below.</font>
<br><font size=2 face="sans-serif">Nproc is just one value not a list, it should be stored as it is.</font>
<br><font size=2 face="sans-serif">My coding was just to follow the same method as for 'hosts' which is a list.</font>
<br><font size=2 face="sans-serif">I have given a try with the new patch on the Pbs system. It's OK.</font>
<br>
<br><font size=2 face="sans-serif">More later.</font>
<br><font size=2 face="sans-serif">Thipadin.</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Ashley Pittman <ashley@pittman.co.uk></b></font>
<p><font size=1 face="sans-serif">11/25/2009 07:51 PM</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> Pour : thipadin.seng-long@bull.net</font>
<br><font size=1 face="sans-serif"> cc : florence.vallee@bull.net, francois.wellenreiter@bull.net, padb-devel@pittman.org.uk, Sylvain.JEAUGEY@bull.net</font>
<br><font size=1 face="sans-serif"> Objet : Re: Réf. : Re: Réf. : Re: Réf. : Re: Réf. : Re: [padb-devel] Patch for Support of PBS Pro resource manager</font></table>
<br>
<br><font size=2 face="Courier New">On Wed, 2009-11-25 at 11:15 +0100, thipadin.seng-long@bull.net wrote:<br>
> <br>
> Thanks you to accept to commit. <br>
<br>
How does the following look to you? nproc is only ever set once so it<br>
can be stored as a value rather than a array with only one entry which<br>
simplifies the code slightly. I would just commit it from here but<br>
without access to a pbs system I can't test it.<br>
<br>
Re: coding standards take a look at the 'tidy' and 'report' make<br>
targets, I try and ensure my code has as few errors as reported by<br>
perlcritic as possible. This isn't always easy but is worth doing now<br>
and again. I also try and avoid implicitly using $_ where-ever possible<br>
as it tends to make the code easier to read.<br>
<br>
ashley@alpha:~/code/padb/trunk/src$ svn diff<br>
Index: padb<br>
===================================================================<br>
--- padb (revision 338)<br>
+++ padb (working copy)<br>
@@ -2662,8 +2662,7 @@<br>
my @champs = split(/\s+/); # split by space<br>
if ( $champs[9] eq 'R' ) { # take only Running<br>
($job) = split qr{\.}, $champs[0];<br>
- $nprocess = $champs[6];<br>
- push( @{ $pbs_tabjobs{$job}{nproc} }, $nprocess );<br>
+ $pbs_tabjobs{$job}{nproc} = $champs[6];<br>
} else {<br>
$job = undef;<br>
}<br>
@@ -2732,15 +2731,13 @@<br>
my $job = shift;<br>
my $d = pbs_get_data($target_user);<br>
<br>
- my @hosts = @{ $d->{$job}{hosts} };<br>
- my @nprocs = @{ $d->{$job}{nproc} };<br>
- my $nprocs = $nprocs[0];<br>
+ my @hosts = @{ $d->{$job}{hosts} };<br>
<br>
config_set_internal( 'pbs_server', $d->{$job}{server} );<br>
<br>
my %pcmd;<br>
<br>
- $pcmd{nprocesses} = $nprocs;<br>
+ $pcmd{nprocesses} = $d->{$job}{nproc};<br>
$pcmd{nhosts} = @hosts;<br>
@{ $pcmd{host_list} } = @hosts;<br>
<br>
<br>
<br>
-- <br>
<br>
Ashley Pittman, Bath, UK.<br>
<br>
Padb - A parallel job inspection tool for cluster computing<br>
http://padb.pittman.org.uk<br>
<br>
</font>
<br>
<br>