Comments (2)
@altor @chakib-belgaid @rouvoy
I also have the same question as @fnoorbin, I'm trying to profile energy consumption on Windows but when I end up with the following stack trace:
File "C:\Users\kesha\Documents\NCSA\nengo.LIF_0.001_v4_nengo_synpase0.1_mp\reservoir.py", line 111, in initialize_reservoir
pyRAPL.setup()
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\pyRAPL.py", line 39, in setup
pyRAPL._sensor = Sensor(devices=devices, socket_ids=socket_ids)
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\sensor.py", line 59, in __init__
self._device_api[device] = DeviceAPIFactory.create_device_api(device, socket_ids)
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 186, in create_device_api
return PkgAPI(socket_ids)
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 137, in __init__
DeviceAPI.__init__(self, socket_ids)
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 68, in __init__
all_socket_id = get_socket_ids()
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 49, in get_socket_ids
for cpu_id in cpu_ids():
File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 31, in cpu_ids
api_file = open('/sys/devices/system/cpu/present', 'r')
FileNotFoundError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/present'
When I run the same code on a Linux system, I end up with the following stack trace:
Traceback (most recent call last):
File "/jet/home/kshivvy/spiking_reservoir_rl_elastica/reservoir.py", line 111, in initialize_reservoir
pyRAPL.setup()
File "/jet/home/kshivvy/.conda/envs/venv/lib/python3.8/site-packages/pyRAPL/pyRAPL.py", line 39, in setup
pyRAPL._sensor = Sensor(devices=devices, socket_ids=socket_ids)
File "/jet/home/kshivvy/.conda/envs/venv/lib/python3.8/site-packages/pyRAPL/sensor.py", line 68, in __init__
raise PyRAPLCantRecordEnergyConsumption(None)
pyRAPL.exception.PyRAPLCantRecordEnergyConsumption
Does your package support Windows, and if not do you know how I can profile how much energy certain lines of my Python code use?
from pyrapl.
@altor @chakib-belgaid @rouvoy
I also have the same question as @fnoorbin, I'm trying to profile energy consumption on Windows but when I end up with the following stack trace:
File "C:\Users\kesha\Documents\NCSA\nengo.LIF_0.001_v4_nengo_synpase0.1_mp\reservoir.py", line 111, in initialize_reservoir pyRAPL.setup() File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\pyRAPL.py", line 39, in setup pyRAPL._sensor = Sensor(devices=devices, socket_ids=socket_ids) File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\sensor.py", line 59, in __init__ self._device_api[device] = DeviceAPIFactory.create_device_api(device, socket_ids) File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 186, in create_device_api return PkgAPI(socket_ids) File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 137, in __init__ DeviceAPI.__init__(self, socket_ids) File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 68, in __init__ all_socket_id = get_socket_ids() File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 49, in get_socket_ids for cpu_id in cpu_ids(): File "C:\Users\kesha\Documents\NCSA\loihi\venv\lib\site-packages\pyRAPL\device_api.py", line 31, in cpu_ids api_file = open('/sys/devices/system/cpu/present', 'r') FileNotFoundError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/present'
When I run the same code on a Linux system, I end up with the following stack trace:
Traceback (most recent call last): File "/jet/home/kshivvy/spiking_reservoir_rl_elastica/reservoir.py", line 111, in initialize_reservoir pyRAPL.setup() File "/jet/home/kshivvy/.conda/envs/venv/lib/python3.8/site-packages/pyRAPL/pyRAPL.py", line 39, in setup pyRAPL._sensor = Sensor(devices=devices, socket_ids=socket_ids) File "/jet/home/kshivvy/.conda/envs/venv/lib/python3.8/site-packages/pyRAPL/sensor.py", line 68, in __init__ raise PyRAPLCantRecordEnergyConsumption(None) pyRAPL.exception.PyRAPLCantRecordEnergyConsumption
Does your package support Windows, and if not do you know how I can profile how much energy certain lines of my Python code use?
@kshivvy
This package could be used only with Linux and not Windows.
But I am no more able to use it with Linux, I think some permissions have changed by the Linux updates and then it was not accessible.
from pyrapl.
Related Issues (16)
- API proposal HOT 2
- GPU support HOT 1
- Measurements of multiple functions HOT 1
- DRAM consumption output HOT 3
- @pyRAPL.measure in demo code returns error: AttributeError: module 'pyRAPL' has no attribute 'measure' HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/present' i.e. Windows support HOT 1
- Windows os error HOT 1
- Measurements error HOT 3
- pyRAPL breaks pytest HOT 1
- Negative energy_uj measurement
- Add mongodb output class
- Portability
- change save methode to asynchrone in csv/mongo output
- QuickStart :
- revert the measure unit back to uJ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrapl.