Commit 9e1712e1 authored by Jessica Severin's avatar Jessica Severin
Browse files

needed to add more logic around the LSB environment variables. LSB_JOBINDEX is 0

when a bsub is issued without a job array and bjobs does not like 234234[0] as a job_id
parent 4c908f00
......@@ -79,7 +79,13 @@ my $queen = $DBA->get_Queen();
my $lsb_jobid = $ENV{'LSB_JOBID'};
my $lsb_jobindex = $ENV{'LSB_JOBINDEX'};
$self->{'process_id'} = "$lsb_jobid\[$lsb_jobindex\]" if(defined($lsb_jobid) and defined($lsb_jobindex));
if(defined($lsb_jobid) and defined($lsb_jobindex)) {
if($lsb_jobindex>0) {
$self->{'process_id'} = "$lsb_jobid\[$lsb_jobindex\]";
} else {
$self->{'process_id'} = "$lsb_jobid";
}
}
print("pid = ", $self->{'process_id'}, "\n") if($self->{'process_id'});
if($self->{'logic_name'}) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment