-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU Count #8
Comments
I only have 8 cores, so /sys/devices/system/cpu/cpu7/online exists, but /sys/devices/system/cpu/cpu8/online does not. |
Weird, I thought I automatically detected number of core... Will check it later. |
same problem here IOError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/cpu6/online' attached file is log after |
How many cores do you have? Could you do |
got 6 cores in my pc
|
Also, do the following? $ cat /sys/devices/system/cpu/online |
sure! |
I think the cause of the failure is that /sys/devices/system/cpu/possible
contains CPU id 6, but there is actually no CPU 6. To workaround, try
change get_possible_cpus() (
https://github.com/junhe/wiscsee/blob/e0f086b04230747205056d8f4def42f9eb36c8d2/workrunner/cpuhandler.py#L4)
to
def get_possible_cpus():
return range(0, 6)
I hope this works for you..
…On Mon, Feb 17, 2020 at 10:58 PM luminus7 ***@***.***> wrote:
sure!
~$ cat /sys/devices/system/cpu/online
0-5
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AAEZ6JIFBYVIO3VP5LNJAL3RDNTIJA5CNFSM4EEKZ2F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMASUCQ#issuecomment-587278858>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEZ6JL5IXRVK6PDQQHRISDRDNTIJANCNFSM4EEKZ2FQ>
.
|
in wiscsee/workrunner/cpuhandler.py
this make successful test_all, and run_demo thank you for your fast and kind respond :) |
:)
…On Tue, Feb 18, 2020 at 8:32 PM luminus7 ***@***.***> wrote:
~$ cat /sys/devices/system/cpu/possible
0-7
in wiscsee/workrunner/cpuhandler.py
def get_possible_cpus():
f = open("/sys/devices/system/cpu/possible", 'r')
line = f.readline()
f.close()
# assuming format of 0-2,4,6-63
items = line.split(',')
cpus = []
for item in items:
if '-' in item:
a,b = item.split('-')
a = int(a)
b = int(b)
cpus.extend(range(a, b+1))
else:
cpus.append(int(item))
# return cpus
return range(0,6)
this make successful test_all, and run_demo
thank you for your fast and kind respond :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AAEZ6JPAHVL4PUVTOIQVI3TRDSK4HA5CNFSM4EEKZ2F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMGDWDQ#issuecomment-588004110>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEZ6JN3HOAXE3PZAWD2OI3RDSK4HANCNFSM4EEKZ2FQ>
.
|
When I walk through the tutorial, the example seems to assume I have more cores than I actually do, leading to the following exception:
======================================================================
ERROR: test_run (tests.test_demo.Test_TraceAndSimulateLinuxDD)
Traceback (most recent call last):
File "tests/test_demo.py", line 28, in test_run
obj.main()
File "config_helper/experiment.py", line 235, in main
self.run()
File "config_helper/experiment.py", line 226, in run
run_workflow(self.conf)
File "workflow.py", line 14, in run_workflow
wf.run()
File "workflow.py", line 23, in run
event_iter = self._run_workload()
File "workflow.py", line 43, in _run_workload
event_iter = runner.run()
File "workrunner/wlrunner.py", line 168, in run
return self.run_with_blktrace()
File "workrunner/wlrunner.py", line 202, in run_with_blktrace
cpuhandler.set_cpus(self.conf['n_online_cpus'])
File "workrunner/cpuhandler.py", line 69, in set_cpus
enable_all_cpus()
File "workrunner/cpuhandler.py", line 62, in enable_all_cpus
enable_n_cpus(len(possible_cpus))
File "workrunner/cpuhandler.py", line 93, in enable_n_cpus
switch_cpu(cpuid, 'ON')
File "workrunner/cpuhandler.py", line 53, in switch_cpu
f = open(path, 'w')
IOError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/cpu8/online'
The text was updated successfully, but these errors were encountered: