--- source-trees/gt2-cvs/gram/jobmanager/setup/condor/condor.in Thu Jan 19 09:43:13 2006 +++ source-trees/gt2-cvs/gram.patched/jobmanager/setup/condor/condor.in Fri Feb 3 15:27:19 2006 @@ -38,6 +38,15 @@ my $stderr = $description->stderr(); my $globus_condor_conf = "$ENV{GLOBUS_LOCATION}/etc/globus-condor.conf"; + # We want to have individual Condor log files for each job for + # pre-WS GRAM, but still have a single log file for WS GRAM + # (which uses the SEG to monitor job status). + if ( !defined( $description->factoryendpoint() ) ) { + $self->{individual_condor_log} = 1; + } else { + $self->{individual_condor_log} = 0; + } + if (-r $globus_condor_conf) { local(*FH); @@ -54,7 +63,7 @@ close(FH); } } - if (! exists($self->{condor_logfile})) + if (! exists($self->{condor_logfile}) || $self->{individual_condor_log}) { if(! exists($ENV{GLOBUS_SPOOL_DIR})) { @@ -64,7 +73,12 @@ { $log_dir = $ENV{GLOBUS_SPOOL_DIR}; } - $self->{condor_logfile} = "$log_dir/gram_condor_log"; + if ( $self->{individual_condor_log} ) { + $self->{condor_logfile} = "$log_dir/gram_condor_log." + . $description->uniq_id(); + } else { + $self->{condor_logfile} = "$log_dir/gram_condor_log"; + } } if(! -e $self->{condor_logfile}) { @@ -488,11 +502,17 @@ if $description->stdout() ne ''; $self->nfssync( $description->stderr(), 0 ) if $description->stderr() ne ''; + if ( ${self}->{individual_condor_log} ) { + unlink($self->{condor_logfile}); + } return { JOB_STATE => Globus::GRAM::JobState::DONE }; } if($num_abort > 0) { + if ( ${self}->{individual_condor_log} ) { + unlink($self->{condor_logfile}); + } $state = Globus::GRAM::JobState::FAILED; } elsif($num_done == $description->count()) @@ -502,6 +522,9 @@ $self->nfssync( $description->stderr(), 0 ) if $description->stderr() ne ''; + if ( ${self}->{individual_condor_log} ) { + unlink($self->{condor_logfile}); + } $state = Globus::GRAM::JobState::DONE; } elsif($num_run == 0)