Skip to content

school-brainhack/module_green_computing

Repository files navigation

module_green_computing

This repository contains the material to complete the exercises for the module "Green computing for neuroimaging".

Exercise 1

Instructions

Estimate the energy consumption and the carbon footprint generated by the analyses described in the following paper using the Green Algorithms calculator:

Files

Use the template (exercise1_template.csv) provided in the github repository to fill the relevant information, and add the corresponding output from Green Algorithms. After you have completed the template, compare your estimates with the ones provided in exercise1_v1.csv and exercise1_v2.csv, and reflect on the differences.

Exercise 2

Instructions

Calculate the total energy and carbon emissions for the jobs listed in the Slurm log file in the Github repository using the formula given below.

Equations

(1) CPU energy (Wh) = CPU time (hours) x TDP / number of CPU cores

(2) RAM energy (Wh) = Max Memory x VMC x Runtime (hours)

(3) Total energy (kWh) = ((CPU energy + RAM energy) / 1000) x PUE

(4) Carbon emissions (g) = Total energy x VMC x Carbon intensity

Glossary

Carbon emissions (g): quantity of carbon emitted to execute a job.

Carbon intensity (g): Grams of carbon dioxide emitted per KWh used. It varies by time and location.

  • Value: assume a value of 177g (average for the UK in 2025)
  • Where to find: In general, the online carbon intensity value can be retrieved from Electricity Maps

CPU energy: Electrical energy used by the Central Processing Units (CPUs) while executing a job.

  • Value: computed using the formula above

CPU time: Total time all CPU cores actually worked on a given task.

  • Value: provided in the log file under the TotalCPU column

Number of CPU cores: Available number of CPU cores on a given processor.

  • Value: assume a value of 32

Max memory: Maximum memory (GB) used at any point within a job.

  • Value: provided in the log file under the MaxRSS column

Power use effectiveness (PUE): Energy overheads used to performed computing.

  • Value: assume a value of 1.28KWh. This means for each KWh used for computing, 0.28 kWh were used for air conditioning, lighting, etc.

RAM energy: Energy used by the volatile memory of the system (Random Access Memory; RAM), which allows to store and retrieve data during a job's execution.

  • Value: computed using the formula above

Runtime: Total time needed for a job to finish running.

  • Value: provided in the log file under the Elapsed column

Thermal design power (TDP): Energy efficiency of a processor.

  • Value: 200W for the processor used here (AMD EPYC 7513)

Total energy: Sum of all electrical consumption required to execute the job.

  • Value: computed using the formula above

Volatile memory consumption (VMC): Energy (W) needed per GB of memory used.

  • Value: assume a value of 0.3725W

Files

You may write a python script from scratch or complete the jupyter notebook provided in the Github repository. The definition of the variables needed is provided in the glossary above. Do not forget to pay attention to the units of each variable.

About

Material for the module "Green computing"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors