Closed RafiullahOmar closed 6 months ago
Hello, constant value for RAM is normal, but I think you are also in "constant mode" for CPU, did you allow users to read RAPL files ? Look at https://github.com/mlco2/codecarbon/issues/244#issue-987101271 for the way to do it.
Thanks, @benoit-cty. Actually, for the second part of the question regarding obtaining a constant value, the operating system is not Linux; it is Windows 11.
For Windows you have to install "Intel Power Gadget". But Intel deprecate it and switch to https://github.com/intel/pcm , which we do not support.
Sorry, the answer is no for both questions. They are in top priority but we have not enough volunteer.
Thanks, @benoit-cty. Could I have your opinion on whether CodeCarbon can measure the energy consumption of Intel Xeon CPUs running Ubuntu 22.04 OS? Does CodeCarbon have the capability to measure their energy consumption? As I could not find anything specific to Intel Xeon CPUs.
Yes, it work on all CPUs as soon as you allow the reading of RAPL files : https://github.com/mlco2/codecarbon/issues/244#issue-987101271
@benoit-cty, Sometimes I get this message: [codecarbon WARNING @ 03:54:28] We saw that you have a Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz but we don't know it. Please contact us.
I'va added it to the list : https://github.com/mlco2/codecarbon/pull/526
@benoit-cty did anyone added the CPU to the list as I still get the same warning?
Yes, but we still have to publish a new version and then you could update your local version of codecarbon
.
@benoit-cty Thanks! Could you please let me know when the closest possible date for publishing could be? I'm currently running some experiments on the mentioned CPU.
Hello, the version has been published : https://pypi.org/project/codecarbon/2.3.5/
`pip install -U codecarbon' to update your env.
Thank you, @benoit-cty . Even after updating to version 2.3.5, CodeCarbon still displays the following warnings: [codecarbon INFO @ 10:27:38] [setup] CPU Tracking... [codecarbon WARNING @ 10:27:38] No CPU tracking mode found. Falling back on CPU constant mode. [codecarbon WARNING @ 10:27:40] We saw that you have a Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz but we don't know it. Please contact us.
Oh, I see, I've added the i7-11370H
from your first message, not the Silver 4208
. Did you know how to submit a PR ? Or could you find the TDP ?
@benoit-cty , the TDP is 85W for Silver 4208, and the default value is also 85 in codecarbon. Therefore, I believe that I will give an accurate result without specifying the CPU(?). Nevertheless, I have also created a PR for adding Silver 4208 cpu.
Hi @benoit-cty @inimaz ,
I'd like to get your opinion on whether I'm correct or not before proceeding with my experiments:
I've received the following warnings:
[codecarbon WARNING @ 18:42:17] No CPU tracking mode found. Falling back on CPU constant mode.
[codecarbon WARNING @ 18:42:19] We detected that you have an Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz, but we don't have it in our database. Please contact us.
I have a question and two opinions that I'd like your feedback on:
Question: Despite confirming that RAPL is available, why am I still receiving this warning?
Opinions:
Hi, Yes, if you use #316 it will be accurate. Let me know if it works.
Hi @benoit-cty , I saw that a new version of codecarbon has been published. I assumed that it might have solved the problem of not recognizing the CPU and other warnings related to constant mode. However, when I upgrade its version and tested it, I received the same warning again as: [codecarbon WARNING @ 17:22:49] No CPU tracking mode found. Falling back on CPU constant mode. [codecarbon WARNING @ 17:22:50] We saw that you have a Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz but we don't know it. Please contact us.
Hello, unfortunatly, your CPU is not in the updated list : https://github.com/mlco2/codecarbon/blob/master/codecarbon/data/hardware/cpu_power.csv
I added it, but I don't know why it's not in the updated list. I remember the pull request being approved as well.
Oh, yes indeed it is in the list : https://github.com/mlco2/codecarbon/blob/master/codecarbon/data/hardware/cpu_power.csv#L3769
So you may fall under the bug https://github.com/mlco2/codecarbon/pull/551 that was fixed but not yet published on pypi, I will do it this week-end.
You're right. What do you think about below warning: [codecarbon WARNING @ 17:22:49] No CPU tracking mode found. Falling back on CPU constant mode. I verified that RAPL is accessible on the system, but CodeCarbon seems to be unable to access it. I run the part of the code responsible for RAPL access within CodeCarbon itself, but it couldn't access it.
Hello, could you try to update codecarbon ? The new version 2.4.2 will support your CPU.
For RAPL can you share the log in debug mode ?
And what say ls -l /sys/class/powercap/intel-rapl/intel-rapl:1/energy_uj
and cat /sys/class/powercap/intel-rapl/intel-rapl:1/energy_uj
?
Thanks, Now it recognized the CPU.
Thanks, only root can read your RAPL files, you have to do : sudo chmod -R a+r /sys/class/powercap/intel-rapl
Or look at https://github.com/mlco2/codecarbon/issues/244 for a permanent way to do it.
Thanks, @benoit-cty! resolved both issues. I'm currently receiving a warning message that isn't critical right now, but addressing it would improve CodeCarbon. [codecarbon WARNING @ 10:15:02] Invalid gpu_ids format. Expected a string or a list of ints.
Perfect @RafiullahOmar, I have created a separate issue to investigate that warning, thanks for telling us! You can see its state here #557
Closing this issue as we have already solved many issues in it.
Description
I couldn't find any information in the documentation about whether CodeCarbon can measure energy consumption for Intel Xeon CPUs with Ubuntu 22.04 OS. Does CodeCarbon measure its energy consumption? And, is getting the same values for RAM and CPU repeatedly after each 10 secs a normal behavior? for example getting 5.904338836669922 W for RAM and 42.5 W for CPU repeatedly as below: [codecarbon INFO @ 18:28:46] Energy consumed for RAM : 0.000173 kWh. RAM Power : 5.904338836669922 W [codecarbon INFO @ 18:28:46] Energy consumed for all CPUs : 0.001248 kWh. All CPUs Power : 42.5 W The details of processor is: Processor: 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz, 2995 Mhz, 4 Core(s), 8 Logical Processor(s) CodeCarbon version: 2.1.4 Python version: 3.10.11 Operating System: Windows 11