Open fnoorbin opened 4 years ago
@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?
@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.
Hi, Is it pyRAPL available for windows? what can be used for windows?
when the "number" is set >1, is a for loop required to run the function or measureit decorator measures it in iteration of number itself?