Toggle navigation
Toggle navigation
This project
Loading...
Sign in
code
/
ParallelWalk
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Network
Create a new issue
Builds
Commits
Authored by
Aaron Krohn
2017-03-22 12:58:56 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6992165efb8d3af2c08db7b84beb1c8cb02f7f41
6992165e
1 parent
51ce7245
Added warning message for machines with too few cores;
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
walker.py
walker_attr.py
walker.py
View file @
6992165
...
...
@@ -140,6 +140,15 @@ def main():
# Core count
ncpus
=
cpu_count
()
if
ncpus
<
4
:
sys
.
stderr
.
write
(
"""
WARNING: This system does not have enough CPUs to utilize the benefits
of a parallelized directory walk. The system's built-in tools
would likely be as fast or faster for this process if it will
even run at all. Some systems have been found to hang.
"""
)
time
.
sleep
(
15
)
sys
.
stderr
.
write
(
'Process starting...'
)
# Keep track of our running processes
procs
=
[]
...
...
walker_attr.py
View file @
6992165
...
...
@@ -197,6 +197,16 @@ def main():
# Don't recurse
break
if
ncpus
<
4
:
sys
.
stderr
.
write
(
"""
WARNING: This system does not have enough CPUs to utilize the benefits
of a parallelized directory walk. The system's built-in tools
would likely be as fast or faster for this process if it will
even run at all. Some systems have been found to hang.
"""
)
time
.
sleep
(
10
)
sys
.
stderr
.
write
(
'Process starting...'
)
# Distribute CPUs
n_writers
=
1
n_statters
=
(
ncpus
-
n_writers
)
/
2
...
...
Please
register
or
login
to post a comment