Commit 02e0979e authored by Leo Gordon's avatar Leo Gordon
Browse files

api_change: do not assume all Meadows treat job arrays in the same way as LSF (thanks, Lel!)

parent df91e74f
......@@ -99,12 +99,10 @@ sub job_name_prefix {
}
sub generate_job_name {
my ($self, $worker_count, $iteration, $rc_name) = @_;
sub job_array_common_name {
my ($self, $rc_name, $iteration) = @_;
return $self->job_name_prefix()
."${rc_name}-${iteration}"
. (($worker_count > 1) ? "[1-${worker_count}]" : '');
return $self->job_name_prefix() ."${rc_name}-${iteration}";
}
......
......@@ -289,7 +289,8 @@ sub get_report_entries_for_time_interval {
sub submit_workers {
my ($self, $worker_cmd, $required_worker_count, $iteration, $rc_name, $rc_specific_submission_cmd_args, $submit_stdout_file, $submit_stderr_file) = @_;
my $job_name = $self->generate_job_name($required_worker_count, $iteration, $rc_name);
my $job_array_common_name = $self->job_array_common_name($rc_name, $iteration);
my $job_array_name_with_indices = $job_array_common_name . (($required_worker_count > 1) ? "[1-${required_worker_count}]" : '');
my $meadow_specific_submission_cmd_args = $self->config_get('SubmissionOptions');
$submit_stdout_file ||= '/dev/null'; # a value is required
......@@ -297,7 +298,7 @@ sub submit_workers {
$ENV{'LSB_STDOUT_DIRECT'} = 'y'; # unbuffer the output of the bsub command
my $cmd = qq{bsub -o $submit_stdout_file -e $submit_stderr_file -J "${job_name}" $rc_specific_submission_cmd_args $meadow_specific_submission_cmd_args $worker_cmd};
my $cmd = qq{bsub -o $submit_stdout_file -e $submit_stderr_file -J "${job_array_name_with_indices}" $rc_specific_submission_cmd_args $meadow_specific_submission_cmd_args $worker_cmd};
warn "LSF::submit_workers() running cmd:\n\t$cmd\n";
......
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