From padb at googlecode.com Tue Jul 2 21:44:00 2013 From: padb at googlecode.com (padb at googlecode.com) Date: Tue, 02 Jul 2013 20:44:00 +0000 Subject: [padb] r450 committed - Fix help message for showing current settings.... Message-ID: <001a11c23036a830ac04e08d6762@google.com> Revision: 450 Author: apittman at gmail.com Date: Tue Jul 2 13:43:39 2013 Log: Fix help message for showing current settings. This patch comes from Jeff Squyres http://code.google.com/p/padb/source/detail?r=450 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Thu Dec 15 12:39:20 2011 +++ /trunk/src/padb Tue Jul 2 13:43:39 2013 @@ -792,7 +792,7 @@ -O [opt1=val,] Set internal config options for padb, advanced use only. Options in this version (these are liable to change) - Use -Ohelp for showing current settings + Use -Ohelp=1 for showing current settings General options: verbose Set verbosity level. @@ -5851,7 +5851,10 @@ $key =~ s{-}{_}gx; - if ( not exists $conf{$key} + if ( $key eq "help" ) { + config_help($mode); + exit(0); + } elsif ( not exists $conf{$key} and not exists $conf{mode_options_reverse}{$key} ) { print "Error, unknown config option '$name'\n"; From padb at googlecode.com Tue Jul 2 21:46:11 2013 From: padb at googlecode.com (padb at googlecode.com) Date: Tue, 02 Jul 2013 20:46:11 +0000 Subject: [padb] r451 committed - Add regexp for supporting gdb 7.5.x.... Message-ID: <089e0149d11e695bb904e08d6f67@google.com> Revision: 451 Author: apittman at gmail.com Date: Tue Jul 2 13:45:57 2013 Log: Add regexp for supporting gdb 7.5.x. Somewhere between gdb 7.2.x and 7.5.x, gdb started printing additional information at the end of the value= line that needs to be stripped off. This secondary regex will strip off this extra gorp if it's there. This patch comes from Jeff Squyres http://code.google.com/p/padb/source/detail?r=451 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Tue Jul 2 13:43:39 2013 +++ /trunk/src/padb Tue Jul 2 13:45:57 2013 @@ -6836,7 +6836,13 @@ sub gdb_strip_value { my ($str) = @_; if ( $str =~ m{\Avalue="([^"]+)"\z}x ) { - return $1; + # Somewhere between gdb 7.2.x and 7.5.x, gdb started printing + # additional information at the end of the value= line that + # needs to be stripped off. This secondary regex will strip + # off this extra gorp if it's there. + my $tmp = $1; + $tmp =~ s/(.+?)\s<\S+>$/$1/; + return $tmp; } return; } From padb at googlecode.com Tue Jul 2 21:56:04 2013 From: padb at googlecode.com (padb at googlecode.com) Date: Tue, 02 Jul 2013 20:56:04 +0000 Subject: [padb] r452 committed - Increase the queue depth of the callback port in the outer process.... Message-ID: <90e6ba1efe0acae46304e08d928f@google.com> Revision: 452 Author: apittman at gmail.com Date: Tue Jul 2 13:55:55 2013 Log: Increase the queue depth of the callback port in the outer process. This helps with flow-controll when launching large jobs on resource managers which don't provide another mechanism of initial key exchange. http://code.google.com/p/padb/source/detail?r=452 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Tue Jul 2 13:45:57 2013 +++ /trunk/src/padb Tue Jul 2 13:55:55 2013 @@ -5376,12 +5376,12 @@ } sub create_local_port { - my ($range) = @_; + my ($range, $listen_count) = @_; my %options = ( Reuse => 1, Proto => 'tcp', - Listen => 2, + Listen => $listen_count, ); if ( not defined $range ) { @@ -5408,7 +5408,7 @@ my $sel = IO::Select->new(); if ( $conf{inner_callback} ) { - my $sl = create_local_port( $conf{port_range} ); + my $sl = create_local_port( $conf{port_range}, $nhosts ); $comm_data->{listen} = $sl; my $port = $sl->sockport(); @@ -10287,7 +10287,7 @@ sub inner_loop_for_comms { my ($outerloc) = @_; - my $server = create_local_port( $inner_conf{port_range} ); + my $server = create_local_port( $inner_conf{port_range}, 4 ); my $lport = $server->sockport(); my $hostname = $inner_conf{hostname}; From padb at googlecode.com Tue Jul 2 22:48:56 2013 From: padb at googlecode.com (padb at googlecode.com) Date: Tue, 02 Jul 2013 21:48:56 +0000 Subject: [padb] r453 committed - Improve the rng_merge function. Rather than walking through each valu... Message-ID: <20cf30434eb8dfecca04e08e4f4b@google.com> Revision: 453 Author: apittman at gmail.com Date: Tue Jul 2 14:48:44 2013 Log: Improve the rng_merge function. Rather than walking through each value poping it off one range and pushing it onto the other do a sensible merge of the two lists, combining the ranges directly. This should mean a significant performance improvement for this function, particuarly at large process counts. http://code.google.com/p/padb/source/detail?r=453 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Tue Jul 2 13:55:55 2013 +++ /trunk/src/padb Tue Jul 2 14:48:44 2013 @@ -1158,7 +1158,7 @@ $rank_rng = rng_convert_from_user( shift @ranks ); foreach my $rank (@ranks) { - rng_merge( $rank_rng, rng_convert_from_user($rank) ); + $rank_rng = rng_merge($rank_rng, rng_convert_from_user($rank)); } } @@ -5212,7 +5212,7 @@ my @user_parts = split $COMMA, $newrange; - my @parts; + my $user_range = rng_create_empty(); foreach my $part (@user_parts) { my %part; @@ -5225,9 +5225,13 @@ } else { confess("Failed to recognise $part as range\n"); } + my @parts; push @parts, \%part; + $user_range = rng_merge($user_range, \@parts); + } - return \@parts; + + return $user_range; } sub rng_convert_to_user { @@ -5335,14 +5339,56 @@ } sub rng_merge { - my ( $rg, $new ) = @_; + my ( $left, $right ) = @_; + + + if ( not defined $left or rng_empty($left) ) { + return $right; + } + + my $combined = rng_create_empty(); + + while ( @{$left} != 0 and @{$right} != 0 ) { + + my $elem; + if ( $left->[0]->{l} < $right->[0]->{l} ) { + $elem = shift @{$left}; + } else { + $elem = shift @{$right}; + } + + if ( @{$combined} == 0 ) { + push @{$combined}, $elem; + } elsif ( $elem->{l} == $combined->[-1]->{u} + 1 ) { + $combined->[-1]->{u} = $elem->{u}; + } elsif ( $elem->{l} >= $combined->[-1]->{l} and $elem->{l} <= $combined->[-1]->{u} ) { + if ( $elem->{u} > $combined->[-1]->{u} ) { + $combined->[-1]->{u} = $elem->{u}; + } + } else { + push @{$combined}, $elem; + } + } + + if ( @{$left} == 0 ) { + $left = $right; + } - # Need to use defined here as zero is a valid value to store in a - # range. - while ( defined( my $val = rng_shift($new) ) ) { - rng_add_value( $rg, $val ); + if ( $left->[0]->{l} == $combined->[-1]->{u} + 1 ) { + my $elem = shift @{$left}; + $combined->[-1]->{u} = $elem->{u}; + } elsif ( $left->[0]->{l} >= $combined->[-1]->{l} and $left->[0]->{l} <= $combined->[-1]->{u} ) { + my $elem = shift @{$left}; + if ( $elem->{u} > $combined->[-1]->{u} ) { + $combined->[-1]->{u} = $elem->{u}; + } } - return; + + if ( @{$left} != 0 ) { + push @{$combined}, @{$left}; + } + + return $combined; } sub rng_dup { @@ -9783,18 +9829,8 @@ if ( exists $handle->{all_replys}->{target_data} ) { foreach my $key ( keys %{ $r->{target_data} } ) { foreach my $value ( keys %{ $r->{target_data}{$key} } ) { - if ( - defined $handle->{all_replys} - ->{target_data}{$key}{$value} ) - { - rng_merge( - $handle->{all_replys}->{target_data}{$key}{$value}, - $r->{target_data}{$key}{$value} - ); - } else { - $handle->{all_replys}->{target_data}{$key}{$value} = - $r->{target_data}{$key}{$value}; - } + $handle->{all_replys}->{target_data}{$key}{$value} = rng_merge($handle->{all_replys}->{target_data}{$key}{$value}, + $r->{target_data}{$key}{$value}) } } } else { @@ -9805,14 +9841,9 @@ # Merge in local target responses. foreach my $key ( keys %local_target_data ) { foreach my $value ( keys %{ $local_target_data{$key} } ) { - if ( defined $handle->{all_replys}->{target_data}{$key}{$value} ) { - rng_merge( $handle->{all_replys}->{target_data}{$key}{$value}, - $local_target_data{$key}{$value} ); - } else { - $handle->{all_replys}->{target_data}{$key}{$value} = - $local_target_data{$key}{$value}; - } - } + $handle->{all_replys}->{target_data}{$key}{$value} = rng_merge($handle->{all_replys}->{target_data}{$key}{$value}, + $local_target_data{$key}{$value}) + } } %local_target_data = (); From gilles.gouaillardet at iferc.org Thu Jul 11 06:19:06 2013 From: gilles.gouaillardet at iferc.org (Gilles Gouaillardet) Date: Thu, 11 Jul 2013 14:19:06 +0900 Subject: [padb] [PATCH] IntelMPI (hydra) vs SLURM support Message-ID: <51DE404A.90406@iferc.org> Dear padb folks, Here is attached a patch to support the hydra launcher used by IntelMPI under SLURM Basically, hydra will call srun pmi_proxy and each pmi_proxy will fork and exec the MPI binary. This is very similar to what is currently done for OpenMPI support Best regards, Gilles -------------- next part -------------- --- /opt/bullxde/debuggers/padb/bin/padb 2011-09-22 11:22:30.000000000 +0900 +++ /csc/home1/gouaillardet/HPC-RT/1571/padb.gg1 2013-06-24 15:21:41.122719000 +0900 @@ -9224,6 +9232,7 @@ pbs_attach => 1, orted => 1, mpirun => 1, + pmi_proxy => 1, }; return 1 if ( defined $mgrs->{$name} ); return; @@ -9275,18 +9284,30 @@ next unless defined $env{SLURM_JOB_ID}; next if ( $env{SLURM_JOB_ID} != $jobid ); - next unless defined $env{OMPI_COMM_WORLD_RANK}; + if ( defined $env{OMPI_COMM_WORLD_RANK} ) { + # If this is defined check it's correct, it might be missing though. + if ( defined $env{SLURM_JOB_STEP} ) { + next if $env{SLURM_JOB_STEP} != $inner_conf{slurm_job_step}; + } - # If this is defined check it's correct, it might be missing though. - if ( defined $env{SLURM_JOB_STEP} ) { - next if $env{SLURM_JOB_STEP} != $inner_conf{slurm_job_step}; - } + if ( defined $env{OMPI_COMM_WORLD_SIZE} ) { + target_key_pair( $vp, "JOB_SIZE", $env{OMPI_COMM_WORLD_SIZE} ); + } - if ( defined $env{OMPI_COMM_WORLD_SIZE} ) { - target_key_pair( $vp, "JOB_SIZE", $env{OMPI_COMM_WORLD_SIZE} ); - } + register_target_process( $env{OMPI_COMM_WORLD_RANK}, $pid ); + } elsif ( defined $env{PMI_RANK} ) { + + # If this is defined check it's correct, it might be missing though. + if ( defined $env{SLURM_JOB_STEP} ) { + next if $env{SLURM_JOB_STEP} != $inner_conf{slurm_job_step}; + } - register_target_process( $env{OMPI_COMM_WORLD_RANK}, $pid ); + if ( defined $env{PMI_SIZE} ) { + target_key_pair( $vp, "PMI_SIZE", $env{PMI_SIZE} ); + } + + register_target_process( $env{PMI_RANK}, $pid ); + } } return;