Compiler search uses a pool of workers (#10190)

- spack.compilers.find_compilers now uses a multiprocess.pool.ThreadPool to execute
  system commands for the detection of compiler versions.

- A few memoized functions have been introduced to avoid poking the filesystem multiple
  times for the same results.

- Performance is much improved, and Spack no longer fork-bombs the system when doing a `compiler find`
This commit is contained in:
Massimiliano Culpo
2019-06-07 18:57:26 +02:00
committed by Todd Gamblin
parent 9c1c50fb76
commit 6d56d45454
17 changed files with 501 additions and 300 deletions

View File

@@ -5,6 +5,8 @@
"""Utility classes for logging the output of blocks of code.
"""
from __future__ import unicode_literals
import multiprocessing
import os
import re