« blib/lib/HPC/Runner/Command/submit_jobs/Utils/Log.pm
↑ Summary
blib/lib/HPC/Runner/Command/submit_jobs/Utils/Scheduler.pm »
| 1 | package HPC::Runner::Command::execute_job; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use MooseX::App::Command; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use JSON; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | extends 'HPC::Runner::Command'; | |||||||||
| 7 | |||||||||||
| 8 | 1 | with 'HPC::Runner::Command::Logger::JSON'; | |||||||||
| 9 | 1 | with 'HPC::Runner::Command::Utils::Base'; | |||||||||
| 10 | 1 | with 'HPC::Runner::Command::Utils::Log'; | |||||||||
| 11 | 1 | with 'HPC::Runner::Command::Utils::Git'; | |||||||||
| 12 | 1 | with 'HPC::Runner::Command::execute_job::Utils::MCE'; | |||||||||
| 13 | |||||||||||
| 14 | 1 | command_short_description 'Execute commands'; | |||||||||
| 15 | 1 | command_long_description | |||||||||
| 16 | 'Take the parsed files from hpcrunner.pl submit_jobs and executes the code'; | ||||||||||
| 17 | |||||||||||
| 18 | 1 | option 'batch_index_start' => ( | |||||||||
| 19 | is => 'rw', | ||||||||||
| 20 | isa => 'Num', | ||||||||||
| 21 | required => 0, | ||||||||||
| 22 | predicate => 'has_batch_index_start', | ||||||||||
| 23 | documentation => | ||||||||||
| 24 | 'Counter to tell execute_array where to start reading in the infile.' | ||||||||||
| 25 | . ' Omit this option in order to run in single node.' | ||||||||||
| 26 | ); | ||||||||||
| 27 | |||||||||||
| 28 | sub BUILD { | ||||||||||
| 29 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
BUILD: not called CC=4 SCAR=30.0
| |||||||||||
| 30 | |||||||||||
| 31 | 0 | $self->gen_load_plugins; | |||||||||
| 32 | 0 | $self->job_load_plugins; | |||||||||
| 33 | |||||||||||
| 34 | 0 | my $job_meta; | |||||||||
| 35 | 0 | ▶ | if ( $self->metastr ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | $job_meta = decode_json( $self->metastr ); | |||||||||
| 37 | } | ||||||||||
| 38 | 0 | ▶ | return unless defined $job_meta; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | if(exists $job_meta->{job_cmd_start}){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | 0 | $self->counter($job_meta->{job_cmd_start} + $self->batch_index_start); | |||||||||
| 42 | } | ||||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | sub execute { | ||||||||||
| 46 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
execute: not called CC=1 SCAR=6.9
| |||||||||||
| 47 | |||||||||||
| 48 | 0 | $self->git_things; | |||||||||
| 49 | 0 | $self->run_mce; | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | 1 | 1; | |||||||||