Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Louis BECQUEY
/
RNANetLegacy
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Network
Create a new issue
Builds
Commits
Authored by
Louis BECQUEY
2020-02-20 22:07:09 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8ff97fd75c47526f75b095c73418d6ae1d2b3d3a
8ff97fd7
1 parent
5346ef89
Support both Intel and AMD
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
RNAnet.py
RNAnet.py
View file @
8ff97fd
...
...
@@ -477,8 +477,8 @@ def read_cpu_number():
# do not use os.cpu_count() on LXC containers
# it reads info from /sys wich is not the VM resources but the host resources.
# Read from /proc/cpuinfo instead.
p
=
subprocess
.
run
([
'grep'
,
'-
c'
,
'Intel(
'
,
'/proc/cpuinfo'
],
stdout
=
subprocess
.
PIPE
)
return
int
(
p
.
stdout
.
decode
(
'utf-8'
)[:
-
1
])
p
=
subprocess
.
run
([
'grep'
,
'-
Ec'
,
'(Intel|AMD)
'
,
'/proc/cpuinfo'
],
stdout
=
subprocess
.
PIPE
)
return
int
(
p
.
stdout
.
decode
(
'utf-8'
)[:
-
1
])
/
2
def
warn
(
message
,
error
=
False
):
if
error
:
...
...
Please
register
or
login
to post a comment