Skip to main content

HPC energy and carbon emissions toolkit - calculate your computational carbon footprint for HPC through CLI, Jupyter, and script-based workflows.

Project description

GRACE-HPC logo

Docs Status

GRACE-HPC

Green Resource for Assessing Carbon & Energy in HPC

gracehpc is a lightweight Python package designed to enable users and operators of SLURM-based HPC systems to estimate and analyse the carbon footprint of their computational workloads. It calculates and displays energy consumption, Scope 2 (operational) and Scope 3 (embodied) carbon emissions for your jobs ran on the system, using SLURM accounting logs and user-specified parameters.

Documentation

For a complete guide to the methodology, installation, and usage of GRACE-HPC, please visit the Official Documentation here.

How to use it?

The package prioritises user experience, accessibility, and flexibility by offering three usage modes designed to accommodate a wide range of users.

  1. Command-line Interface

The tool can be used directly from the command line of your HPC system with simple commands and a wide range of arguments. Ideal for quick analyses for users more comfortable with a lower-level interface and output.

  1. Python Function Call

The same core engine can be called via a function in a Python Script (.py) or a Jupyter Notebook (.ipynb). This mode is ideal for workflow integration and automation, allowing the tool to be embedded into larger Python applications. It also returns the raw datasets produced by the tool for further exploration and user-led analysis afterwards. If you want flexibility, this is the mode for you.

  1. Interactive Jupyter Interface

A simple, widget-based interface can be launched from a Jupyter Notebook (.ipynb) displaying a rich output containing HTML text boxes and interactive plots. This mode allows users to experiment with different parameters without any coding, visualising interesting plots instantly within a single .ipynb notebook. Ideal for users wanting a higher-level, interactive experience.

Key Features

  • Flexible Job Selection: Specify a date range to process jobs for, individual Job IDs, or both.

  • Job Log Extraction: Extracts and processes job details (such as runtime, resource allocation, and usage) using SLURM's sacct command.

  • Energy Consumption: Calculates energy consumption using both usage data and system energy counters (if available).


  • Scope 3 Emissions: Includes Scope 3 (embodied) emissions estimates for a few HPC systems that have undergone a lifecycle assessment and calculated a per node-hour scope 3 emissions factor (Isambard 3, Isambard-AI, Archer 2).

  • Contextual Equivalents: Results include CO₂e equivalents such as the driving, tree-months and flying to help users interpret and understand the scale of the environmental impact.

  • Rich Output Options: View results in the terminal, export to CSV, load as DataFrames, or display interactively in notebooks with instant plots.

The overall goal of this tool is not to serve as a definitive energy and carbon cluster monitoring tool, but rather to provide accessible estimates that inform and raise awareness about the environmental impact of HPC workloads - promoting more sustainable, carbon-aware practices.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gracehpc-0.1.0.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gracehpc-0.1.0-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

File details

Details for the file gracehpc-0.1.0.tar.gz.

File metadata

  • Download URL: gracehpc-0.1.0.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.2 Darwin/24.5.0

File hashes

Hashes for gracehpc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29dd1135d2a9c5ade10c7a07ed0614866dac1291cee5b30357c214219bab16cc
MD5 87c566787534378afd703f1196b05cbe
BLAKE2b-256 fb96ddcbdb5d81d52cece59de5746664a26a06429729314215f6f94826f90067

See more details on using hashes here.

File details

Details for the file gracehpc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gracehpc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 52.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.2 Darwin/24.5.0

File hashes

Hashes for gracehpc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38f400ee87bc3be16d35b343e9111f974b3a3e22d7621c59afd48ad50e824e26
MD5 244844a9fe2668385b9d4d1b52c352b8
BLAKE2b-256 8ea77f81bcc733875c179a6c519518a479109848b605b2533e9cb22f36607c0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page