Allow using -j to control the parallelism of concretization (#37608)
fixes #29464 This PR allows to use ``` $ spack concretize -j X ``` to set a cap on the parallelism of concretization from the command line
This commit is contained in:

committed by
GitHub

parent
0e87243284
commit
5c7dda7e14
@@ -29,6 +29,7 @@ def setup_parser(subparser):
|
||||
)
|
||||
|
||||
spack.cmd.common.arguments.add_concretizer_args(subparser)
|
||||
spack.cmd.common.arguments.add_common_arguments(subparser, ["jobs"])
|
||||
|
||||
|
||||
def concretize(parser, args):
|
||||
|
@@ -1475,7 +1475,10 @@ def _concretize_separately(self, tests=False):
|
||||
|
||||
# Solve the environment in parallel on Linux
|
||||
start = time.time()
|
||||
max_processes = min(len(arguments), 16) # Number of specs # Cap on 16 cores
|
||||
max_processes = min(
|
||||
len(arguments), # Number of specs
|
||||
spack.config.get("config:build_jobs"), # Cap on build jobs
|
||||
)
|
||||
|
||||
# TODO: revisit this print as soon as darwin is parallel too
|
||||
msg = "Starting concretization"
|
||||
|
Reference in New Issue
Block a user