[padb-devel] [padb commit] r76 - Attach to all processes at the same time when reading
codesite-noreply at google.com
codesite-noreply at google.com
Mon Jun 29 18:33:30 BST 2009
Author: apittman
Date: Mon Jun 29 07:14:20 2009
New Revision: 76
Modified:
branches/full-duplex/src/padb
Log:
Attach to all processes at the same time when reading
MPI message queues. This leads to much quicker
run-times and probably results in better quality data
due to all processes being stopped when the queues are
read.
Modified: branches/full-duplex/src/padb
==============================================================================
--- branches/full-duplex/src/padb (original)
+++ branches/full-duplex/src/padb Mon Jun 29 07:14:20 2009
@@ -4604,6 +4604,46 @@
}
}
+sub show_mpi_queue_all {
+ my ( $carg, $list ) = @_;
+
+ my @all;
+
+ foreach my $proc ( @{$list} ) {
+ my $vp = $proc->{vp};
+ my $pid = $proc->{pid};
+
+ debug $vp, "Attaching to $pid";
+ my $gdb = gdb_start();
+ kill( "CONT", $pid );
+ if ( gdb_attach( $gdb, $pid ) ) {
+ $proc->{gdb} = $gdb;
+ push( @all, $proc );
+ } else {
+ output $vp, "Failed to attach to to process";
+ }
+
+ }
+
+ foreach my $proc (@all) {
+
+ my $vp = $proc->{vp};
+ my $pid = $proc->{pid};
+ my $gdb = $proc->{gdb};
+
+ my @mq = fetch_mpi_queue_gdb( $carg, $vp, $pid, $gdb );
+ foreach my $o (@mq) {
+ output( $vp, $o );
+ }
+ }
+
+ foreach my $proc (@all) {
+ my $gdb = $proc->{gdb};
+ gdb_detach($gdb);
+ gdb_quit($gdb);
+ }
+}
+
# Ideally handle all this at a higher level...
sub show_mpi_queue_for_deadlock_all {
my ( $carg, $list ) = @_;
@@ -6687,11 +6727,11 @@
};
$allfns{mqueue} = {
- 'handler' => \&show_mpi_queue,
- 'arg_long' => 'mpi-queue',
- 'arg_short' => 'Q',
- 'help' => "Show MPI message queues",
- 'options_i' => { "mpi-dll" => undef, }
+ 'handler_all' => \&show_mpi_queue_all,
+ 'arg_long' => 'mpi-queue',
+ 'arg_short' => 'Q',
+ 'help' => "Show MPI message queues",
+ 'options_i' => { "mpi-dll" => undef, }
};
$allfns{deadlock} = {
More information about the padb-devel
mailing list