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.

Example of the accounting formula:

Table below shows the example of the accounting formula for the specific partition of the HPC cluster. The accounting formula is defined in the Accountings section of the seed file or as a part of the REST API call. The accounting formula is defined in the Formula attribute.

Resource Accounting Formula

HEAppE Formula

allocated nodes * time

NumNodes * RunTime

allocated nodes * time / 8

NumNodes * RunTime / 8

HEAppE Accounting Numerical and Time Attributes

The HEAppE accounting formula can consist of the following numerical and time attributes. The attributes are parsed from the workload manager (e.g. Slurm) job attributes and are used in the accounting formula.

Attribute

Description

NumNodes

Number of allocated nodes.

NumCPUs

Total number of allocated CPUs.

NumTasks

Total number of tasks assigned to the job.

RunTime

Total runtime of the job (HH:MM:SS).

TimeLimit

Maximum runtime limit allowed for the job (HH:MM:SS).

SubmitTime

Timestamp when the job was submitted.

StartTime

Timestamp when the job started running.

EndTime

Timestamp when the job ended.

EligibleTime

Timestamp when the job became eligible for scheduling.

AccrueTime

Timestamp when the job began accruing priority.

SecsPreSuspend

Seconds accrued before a suspend (if any).

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.