Open
Description
- Python version: 3.9.19
- Operating System: AlmaLinux 9.3 (Shamrock Pampas Cat)
- Pynvml version: 11.5.0
Description
I am using CodeCarbon to make some consumption measurements. However, this library uses pynvml in the background to access the graph information. I asked in the project repository and it seems that my problem is that pynvml is not working properly.
What I Did
I created this script
import pynvml
try:
pynvml.nvmlInit()
print("NVML initialized successfully")
handle = pynvml.nvmlDeviceGetHandleByIndex(0)
print(f"Device 0: {pynvml.nvmlDeviceGetName(handle)}")
total_energy = pynvml.nvmlDeviceGetTotalEnergyConsumption(handle)
print(f"Total energy consumption: {total_energy} mJ")
except pynvml.NVMLError as error:
print(f"Failed to initialize NVML: {error}")
finally:
pynvml.nvmlShutdown()
However, I got this output
NVML initialized successfully
Device 0: NVIDIA H100 PCIe
Failed to initialize NVML: System is not in ready state
I have tried several versions pynvml, but nothing. I can't find any additional information about the System is not in ready state
error either. How can I fix this error?
Metadata
Metadata
Assignees
Labels
No labels