Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IPDSnelting
spec.py
Commits
7e6404bd
Commit
7e6404bd
authored
Sep 07, 2010
by
Andreas Zwinkau
Browse files
Correct hw_ncores setting
parent
a18027fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec.py
View file @
7e6404bd
...
...
@@ -233,8 +233,12 @@ def generate_spec_config(options):
contents
.
append
(
""
)
contents
.
append
(
"hw_cpu_name = %s"
%
cpuinfo
[
"model name"
])
contents
.
append
(
"hw_cpu_mhz = %s"
%
cpuinfo
[
"cpu MHz"
])
contents
.
append
(
"hw_nchips = %d"
%
(
1
+
int
(
cpuinfo
[
"processor"
])))
contents
.
append
(
"hw_ncores = %d"
%
int
(
cpuinfo
[
"cpu cores"
]))
chips
=
(
1
+
int
(
cpuinfo
[
"processor"
]))
cores_per_chip
=
int
(
cpuinfo
[
"cpu cores"
])
cores
=
cores_per_chip
*
chips
contents
.
append
(
"hw_nchips = %d"
%
chips
)
contents
.
append
(
"hw_ncores = %d"
%
cores
)
contents
.
append
(
"hw_ncoresperchip = %d"
%
cores_per_chip
)
contents
.
append
(
"hw_vendor = %s"
%
cpuinfo
[
"vendor_id"
])
contents
.
append
(
"hw_memory = %s"
%
meminfo
[
"MemTotal"
])
contents
.
append
(
""
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment