[padb-devel] [padb] r163 committed - Update proc-format to use the target_data code. This allows it to ...
codesite-noreply at google.com
codesite-noreply at google.com
Wed Aug 26 11:57:02 BST 2009
Revision: 163
Author: apittman
Date: Wed Aug 26 03:56:39 2009
Log: Update proc-format to use the target_data code. This allows it to
reduce the data in the network and decrease the amount of traffic
sent considerably.
http://code.google.com/p/padb/source/detail?r=163
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Wed Aug 26 03:43:13 2009
+++ /trunk/src/padb Wed Aug 26 03:56:39 2009
@@ -2921,6 +2921,24 @@
}
return @all;
}
+
+sub tree_from_namespace {
+ my ($r) = @_;
+
+ my %res;
+
+ foreach my $namespace ( keys( %{$r} ) ) {
+ foreach my $value ( keys( %{ $r->{$namespace} } ) ) {
+ while (
+ defined( my $rank = rng_shift( $r->{$namespace}{$value} )
) )
+ {
+ $res{$rank}{$namespace} = $value;
+ }
+ }
+ }
+
+ return \%res;
+}
sub show_mpi_watch {
my ( $handle, $lines ) = @_;
@@ -2970,7 +2988,8 @@
}
my @all;
- my $lines = $nlines->{target_responce};
+
+ my $lines = tree_from_namespace( $nlines->{target_data} );
foreach my $tag ( sort ( keys %$lines ) ) {
my %hash;
$hash{vp} = $tag;
@@ -5980,7 +5999,6 @@
return sprintf( "%d", $used );
}
-my $proc_info;
my %proc_keys;
sub proc_output {
@@ -5988,7 +6006,6 @@
if ( $confInner{mode} eq "proc_summary" ) {
if ( defined $proc_keys{ lc($key) } ) {
target_key_pair( $vp, lc($key), $value );
- $proc_info->{$vp}{ lc($key) } = $value;
}
} else {
output( $vp, "$key: $value" );
@@ -6007,8 +6024,6 @@
$proc_keys{ lc($name) } = 1;
}
}
-
- $proc_info = undef;
my @all;
@@ -6113,9 +6128,6 @@
}
}
- if ( $confInner{mode} eq "proc_summary" ) {
- return $proc_info;
- }
return;
}
More information about the padb-devel
mailing list