Transfer compute jobs
To transfer compute jobs to PERSEUS, you can use the compute jobs API. This way, you can see all compute jobs related to a compute project within the project details view. Additionally, in case you use Andromeda, you allow your users to see their compute jobs as well.
You can transfer any number of jobs by using the endpoint /service/JobManager/add.
If you want to update an already transferred job, for example to change the state, simply transfer the job again.
PERSEUS will auto-detect if the job is already in the database by checking the job_id as well as the tuple group_id and group_index.
If a match is found, it will overwrite the existing job instead of creating a new one.
Attributes
Section titled “Attributes”A job contains the following information:
| Attribute | Type | Description |
|---|---|---|
| int | The job id given by the scheduler |
group_id | int | In case this job is a group / array job, the group’s id |
group_index | int | In case this job is a group / array job, the corresponding index |
job_name | str | A human readable job name |
| str | The ObjectId of the corresponding PERSEUS project |
| str | The identifier of the corresponding compute project |
| str | The identifier of the cluster the job was submitted to (has to
be identical with the |
partition | str | The partition the job was submitted to |
nodes | list[str] | The partition the nodes was submitted to |
allocated_resources | list[str] | The allocated resources of the job as human readable strings |
working_directory | str | The working directory of the job |
submitted | str | An ISO-formatted datetime string indicating when the job was submitted |
start | str | An ISO-formatted datetime string indicating when the job started (or will start) |
end | str | An ISO-formatted datetime string indicating when the job ended (or will end) |
time_limit | int | Given time limit in seconds |
user | str | The username of the user who submitted the job (to benefit from
all features, the username should be a property known to PERSEUS
by the |
state | str | The current state in which the job is in (see job states for further information) |
priority_id | str | The identifier of the priority used for submitting the job (see how to manage priorities for further information) |
reservation | str | The reservation used for job submission |
reason | str | A reason for non-successful job submission / finish |
cluster_cockpit_id | int | The identifier from cluster cockpit referencing this job |
additional_data | dict[str, Any] | Any data you want to save together with this job, for example further statistics |
Please see Services - JobManager in the API documentation for details on the related data models.
Job states
Section titled “Job states”The following states are available as job state. See job states in Andromeda for further reference.
| State | Meaning |
|---|---|
| RUNNING | The job has resources allocated and is currently running. |
| PENDING | The job is queued and waiting for resources to become available. |
| COMPLETED | The job finished successfully. |
| SUSPENDED | The job has an allocation but its execution is currently paused. |
| CANCELLED | The job was cancelled by a user or an administrator. |
| BOOT_FAIL | The allocated nodes failed to boot, so the job could not start. |
| DEADLINE | The job reached its configured deadline before it could complete. |
| FAILED | The job terminated with a non-zero exit code. |
| NODE_FAIL | One or more allocated nodes failed while the job was running. |
| OUT_OF_MEMORY | The job exceeded the memory available to it. |
| PREEMPTED | The job was stopped so higher-priority work could use its resources. |
| TIMEOUT | The job ran longer than its time limit and was stopped. |