jade.hpc.hpc_submitter.AsyncHpcSubmitter

class jade.hpc.hpc_submitter.AsyncHpcSubmitter(hpc_manager, status_collector, run_script, name, submission_group, output, job_id=None, dry_run=False)[source]

Bases: AsyncJobInterface

Used to submit batches of jobs to multiple nodes, one at a time.

Methods

cancel()

Cancel the job.

create_from_id(hpc_manager, ...)

Create an instance of a job_id in order to check status.

get_blocking_jobs()

Return the job names blocking this job.

get_id()

Return the ID of the job.

is_complete()

Return True if the job is complete.

remove_blocking_job(name)

Remove the name from the job's blocking list.

run()

Run the job.

set_blocking_jobs(jobs)

Set the blocking jobs.

Attributes

cancel_on_blocking_job_failure

Cancel the job if a blocking job fails.

hpc_manager

Return the HpcManager object.

job_id

name

Return the job name.

return_code

Returns the return code of the job.

cancel()[source]

Cancel the job.

property cancel_on_blocking_job_failure

Cancel the job if a blocking job fails.

classmethod create_from_id(hpc_manager, status_collector, job_id)[source]

Create an instance of a job_id in order to check status.

Parameters:

job_id (str)

property hpc_manager

Return the HpcManager object.

Return type:

HpcManager

is_complete()[source]

Return True if the job is complete.

Note: this must be called until the job actually completes.

Return type:

bool

Raises:

ExecutionError – Raised if statuses cannot be retrieved.

get_id()[source]

Return the ID of the job.

Return type:

int

property name

Return the job name.

Return type:

str

property return_code

Returns the return code of the job.

Returns:

0 means success, otherwise failure

Return type:

int

run()[source]

Run the job.

Returns:

Returns GOOD if the job was successfully started.

Return type:

Status

get_blocking_jobs()[source]

Return the job names blocking this job.

Returns:

Empty set means that the job is not blocked.

Return type:

set

remove_blocking_job(name)[source]

Remove the name from the job’s blocking list.

Parameters:

name (str) – name of job that is now finished

set_blocking_jobs(jobs)[source]

Set the blocking jobs.

Parameters:

jobs (set) – names that are blocking