Accounting
HEAppE Middleware supports accounting of the resources used by the users. The accounting is based on the job execution and the resources used by the job. The accounting is comuted based on the specific Acounting formula defined for the Partition of the HPC cluster.
The accounting formula can consist of the HPC Job attributes provided by the workload manager (e.g. Slurm) which are parsed by the HEAppE. Accounting Formula
must consist of the Scheduler Job attributes, numbers and arithmetic operators +
, -
, *
, /
, %
and parentheses (
)
only. Example of the formula: ((NumNodes * RunTime) / 60) * 1.2 + 25
.
Each supercomputer center can have a different accounting formula for each queue or group of the queues. The accounting formula is defined in the seed file in the Accountings
section. Accounting formula has defined validity and the formula is valid only for the specific period of time. The validity is defined by the ValidFrom
and ValidTo
attributes in the seed file.
Accounting is computed for each job automatically, but user with the role Manager
can also trigger the computation of the accounting for the specific group and time period by calling the REST API endpoint heappe/Management/ComputeAccounting
. The accounting is computed asynchronously and the result is stored in the database. Status of the computation can be checked by calling the REST API endpoint heappe/Management/heappe/Management/AccountingState
.
Example of the manual accounting formula computation trigger:
The following example shows how to compute the accounting for the specific group and time period by calling the REST API endpoint
heappe/Management/ComputeAccounting
.$ curl -X POST "http://localhost:5000/heappe/Management/ComputeAccounting" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"SessionCode\": \"string\", \"StartTime\": \"2024-09-12T17:33:41.638Z\", \"EndTime\": \"2024-09-12T17:33:41.638Z\", \"ProjectId\": 1}"
Example Response
Accounting triggered for project 1.
Example of the accounting computation state check:
The following example shows how to check the status of the accounting computation by calling the REST API endpoint
heappe/Management/AccountingState
.$ curl -X POST "http://localhost:5000/heappe/Management/AccountingState" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"SessionCode\": \"string\", \"ProjectId\": 1}"
Example Response
Note
- The
State
attribute can have the following values:
Unknown
= 0,
Queued
= 1,
Running
= 2,
Finished
= 4,
Failed
= 8
Note
Computed accounting values are stored and can be retrieved by calling the JobReporting API endpoints
.