solver: add a timeout handle for users (#47661)

This PR adds a configuration setting to allow setting time limits for concretization.

For backward compatibility, the default is to set no time limit.
This commit is contained in:
Massimiliano Culpo
2024-11-19 15:00:26 +01:00
committed by GitHub
parent 2e71bc640c
commit 68aa712a3e
3 changed files with 26 additions and 1 deletions

View File

@@ -55,3 +55,11 @@ concretizer:
splice:
explicit: []
automatic: false
# Maximum time, in seconds, allowed for the 'solve' phase. If set to 0, there is no time limit.
timeout: 0
# If set to true, exceeding the timeout will always result in a concretization error. If false,
# the best (suboptimal) model computed before the timeout is used.
#
# Setting this to false yields unreproducible results, so we advise to use that value only
# for debugging purposes (e.g. check which constraints can help Spack concretize faster).
error_on_timeout: true