From: <sla...@us...> - 2011-08-17 19:17:15
|
Revision: 5489 http://sashimi.svn.sourceforge.net/sashimi/?rev=5489&view=rev Author: slagelwa Date: 2011-08-17 19:17:09 +0000 (Wed, 17 Aug 2011) Log Message: ----------- * Make sure relative filenames in databases are treated correctly. * Changed algorithm on when new instances are started. Now starts a new instance when the # running < # max and # pending > # running. Which might spawn extra instances due to eventual consistancy but shouldn't spawn more than can be processed. Modified Paths: -------------- trunk/trans_proteomic_pipeline/extern/hpctools/aws/bin/amztpp trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/Client.pm trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/InspectService.pm trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/MyrimatchService.pm trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/OMSSAService.pm trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/SearchService.pm Modified: trunk/trans_proteomic_pipeline/extern/hpctools/aws/bin/amztpp =================================================================== --- trunk/trans_proteomic_pipeline/extern/hpctools/aws/bin/amztpp 2011-08-17 16:57:57 UTC (rev 5488) +++ trunk/trans_proteomic_pipeline/extern/hpctools/aws/bin/amztpp 2011-08-17 19:17:09 UTC (rev 5489) @@ -73,6 +73,7 @@ xtandem => sub { TPP::AWS::TandemService->new( shift, $opts{params} || 'tandem.params' ) }, ); + $services{tandem} = $services{xtandem}; #-- @MAIN -------------------------------------------------------------------# @@ -173,7 +174,7 @@ { pod2usage( -msg => "$prog: missing command" ); } - elsif ( $cmd =~ /^(xtandem|omssa|inspect|myrimatch)/i ) + elsif ( $cmd =~ /^(x?tandem|omssa|inspect|myrimatch)/i ) { # Make sure any input files are mz*ML files @ARGV || pod2usage( -msg => "$prog: missing one or more mzML/mzXML files" ); Modified: trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/Client.pm =================================================================== --- trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/Client.pm 2011-08-17 16:57:57 UTC (rev 5488) +++ trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/Client.pm 2011-08-17 19:17:09 UTC (rev 5489) @@ -121,7 +121,8 @@ my ( $self ) = @_; if ( my $pid = $self->pidfile()->alive() ) { - kill TERM => -$pid; # Set to process group + $log->debug( "sending TERM to $pid\n" ); + kill TERM => $pid; # Set to process group return $pid; } return 0; # No background process to kill @@ -165,16 +166,7 @@ $pmgr->finish; } - # Launch another ec2 instance? - my $cnt = $::ec2m->running(); - if ( $cnt < $::opts{max} && $cnt < $active ) - { - ::ec2Launch( 1 ); - } - else - { - $log->debug( "skipping launch: $cnt/$active (max $::opts{max}) running " ); - } + } if ( $downsrv = $::sqsm->dequeueDownload() ) @@ -210,6 +202,23 @@ } } + # Launch another ec2 instance? + my ( $pend, $active ) = @{ $::sqsm->srvCounts() }; + my $run = $::ec2m->running(); + if ( $run >= $::opts{max} ) + { + $log->debug( "skipping EC2 launch: max $::opts{max} EC2 instances reached" ); + } + elsif ( $pend && (($pend - $run) > 0) ) + { + $log->debug( "perform EC2 launch: $pend pend $active active $run running" ); + ::ec2Launch( 1 ); + } + else + { + $log->debug( "skipping EC2 launch: $pend pend $active active $run running" ); + } + if ( !$upsrv && !$downsrv && !$signal ) { $pmgr->wait_children(); # reap child processes Modified: trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/InspectService.pm =================================================================== --- trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/InspectService.pm 2011-08-17 16:57:57 UTC (rev 5488) +++ trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/InspectService.pm 2011-08-17 19:17:09 UTC (rev 5489) @@ -32,6 +32,7 @@ use Cwd qw( abs_path ); use File::Basename; use File::pushd; +use File::Spec; use File::Which qw(which); use TPP::AWS::S3Manager; use TPP::AWS::Logger qw( $log ); @@ -103,7 +104,7 @@ $db = $1 if ( /\s*SequenceFile\s*,(.*)$/i ) # found database? } close( PARAMS ); - return $db; + return File::Spec->rel2abs($db); } # Modified: trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/MyrimatchService.pm =================================================================== --- trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/MyrimatchService.pm 2011-08-17 16:57:57 UTC (rev 5488) +++ trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/MyrimatchService.pm 2011-08-17 19:17:09 UTC (rev 5489) @@ -33,6 +33,7 @@ use File::Basename; use File::Copy; use File::pushd; +use File::Spec; use File::Which qw(which); use TPP::AWS::S3Manager; use TPP::AWS::Logger qw( $log ); @@ -106,7 +107,7 @@ } } close( PARAMS ); - return $db; + return File::Spec->rel2abs( $db ); } # @@ -177,7 +178,8 @@ if ( !move( "$root.pepXML", "$root.pep.xml" ) ) { $this->{ERROR} = "Error in renaming $myrimatch output: $!"; return @output; - } + } + push @output, "$root.pep.xml"; return @output; } Modified: trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/OMSSAService.pm =================================================================== --- trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/OMSSAService.pm 2011-08-17 16:57:57 UTC (rev 5488) +++ trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/OMSSAService.pm 2011-08-17 19:17:09 UTC (rev 5489) @@ -32,6 +32,7 @@ use Cwd qw( abs_path ); use File::Basename; use File::pushd; +use File::Spec; use File::Which qw(which); use TPP::AWS::S3Manager; use TPP::AWS::Logger qw( $log ); @@ -68,13 +69,13 @@ { if ( /-d\s+(.*)\s*/ ) { - $log->debug( "adding database $1" ); - push @{ $this->{DBS} }, $1; - push @{ $this->{DBS} }, "$1.phr"; - push @{ $this->{DBS} }, "$1.pin"; - push @{ $this->{DBS} }, "$1.psd"; - push @{ $this->{DBS} }, "$1.psi"; - push @{ $this->{DBS} }, "$1.psq"; + my $db = File::Spec->rel2abs($1); + foreach my $ext ( "", qw( .phr .pin .psd .psi .psq ) ) + { + next unless ( -f "$db$ext" ); + $log->debug( "adding database $db$ext" ); + push @{ $this->{DBS} }, "$db$ext"; + } } } ( @{$this->{DBS}} > 1 ) @@ -83,8 +84,8 @@ # Add modification files (if any) foreach ( @flags ) { - push @{ $this->{DBS} }, $1 if ( /-mx\s+(.*)\s*/ ); - push @{ $this->{DBS} }, $1 if ( /-mux\s+(.*)\s*/ ); + push @{ $this->{DBS} }, File::Spec->rel2abs($1) if ( /-mx\s+(.*)\s*/ ); + push @{ $this->{DBS} }, File::Spec->rel2abs($1) if ( /-mux\s+(.*)\s*/ ); } return $this; Modified: trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/SearchService.pm =================================================================== --- trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/SearchService.pm 2011-08-17 16:57:57 UTC (rev 5488) +++ trunk/trans_proteomic_pipeline/extern/hpctools/aws/lib/TPP/AWS/SearchService.pm 2011-08-17 19:17:09 UTC (rev 5489) @@ -94,7 +94,12 @@ $this->{PARAMS_KEY} = $::s3m->put( $this->{PARAMS} ); foreach ( @{ $this->{DBS} } ) { - push @{ $this->{DB_KEYS} }, $::s3m->put( $_ ) if ( -f $_ ); + if ( ! -f $_ ) + { + $log->warn( "Error uploading file $file: not found" ); + next; + } + push @{ $this->{DB_KEYS} }, $::s3m->put( $_ ); } my @keys = (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |