[padb] r353 committed - Clean up the list-rmgrs code a little, both in terms...
padb at googlecode.com
padb at googlecode.com
Mon Dec 7 19:12:11 GMT 2009
Revision: 353
Author: apittman
Date: Mon Dec 7 11:12:04 2009
Log: Clean up the list-rmgrs code a little, both in terms
of the code structure and also tidy up what it reports
to the user if a resource manager isn't detected.
http://code.google.com/p/padb/source/detail?r=353
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Mon Dec 7 05:34:42 2009
+++ /trunk/src/padb Mon Dec 7 11:12:04 2009
@@ -2956,6 +2956,7 @@
if ( defined $link ) {
if ( defined $mpirun{ basename($link) } ) {
push @jobs, $pid;
+ next;
}
}
@@ -5147,26 +5148,21 @@
if ($list_rmgrs) {
foreach my $res ( sort keys %rmgr ) {
- my $working = 'yes';
if ( defined $rmgr{$res}{is_installed}
and not $rmgr{$res}{is_installed}() )
{
- $working = 'no';
- }
- my $r = $res;
-
- if ( $working eq 'yes' ) {
- print "$r: ";
- my @jobs = $rmgr{$res}{get_active_jobs}($user);
- if ( @jobs > 0 ) {
- my $j = join q{ }, sort { $a <=> $b } @jobs;
- print "jobs($j)\n";
- } else {
- print "No active jobs\n";
- }
+ print "$res: Not detected on system.\n";
+ next;
+ }
+
+ print "$res: ";
+ my @jobs = $rmgr{$res}{get_active_jobs}($user);
+ if ( @jobs > 0 ) {
+ my $j = join q{ }, sort { $a <=> $b } @jobs;
+ print "$j\n";
} else {
- print "$r: not active\n";
+ print "No active jobs.\n";
}
}
exit 0;
More information about the padb-devel
mailing list