Aaron Krohn

Added warning message for machines with too few cores;

@@ -140,6 +140,15 @@ def main(): @@ -140,6 +140,15 @@ def main():
140 140
141 # Core count 141 # Core count
142 ncpus = cpu_count() 142 ncpus = cpu_count()
  143 + if ncpus < 4:
  144 + sys.stderr.write("""
  145 +WARNING: This system does not have enough CPUs to utilize the benefits
  146 + of a parallelized directory walk. The system's built-in tools
  147 + would likely be as fast or faster for this process if it will
  148 + even run at all. Some systems have been found to hang.
  149 +""")
  150 + time.sleep(15)
  151 + sys.stderr.write('Process starting...')
143 152
144 # Keep track of our running processes 153 # Keep track of our running processes
145 procs = [] 154 procs = []
@@ -197,6 +197,16 @@ def main(): @@ -197,6 +197,16 @@ def main():
197 # Don't recurse 197 # Don't recurse
198 break 198 break
199 199
  200 + if ncpus < 4:
  201 + sys.stderr.write("""
  202 +WARNING: This system does not have enough CPUs to utilize the benefits
  203 + of a parallelized directory walk. The system's built-in tools
  204 + would likely be as fast or faster for this process if it will
  205 + even run at all. Some systems have been found to hang.
  206 +""")
  207 + time.sleep(10)
  208 + sys.stderr.write('Process starting...')
  209 +
200 # Distribute CPUs 210 # Distribute CPUs
201 n_writers = 1 211 n_writers = 1
202 n_statters = (ncpus - n_writers) / 2 212 n_statters = (ncpus - n_writers) / 2