Make clingo the default solver#25502
Conversation
|
|
||
| default: | ||
| image: { "name": "ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01", "entrypoint": [""] } | ||
| image: { "name": "ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2021-05-15", "entrypoint": [""] } |
There was a problem hiding this comment.
Did you already check that the compilers this image has are the same as the 2020-09-01 tagged image? If not, pipeline jobs will end up doing a lot of duplicated bootstrapping. So in that case, we would either need to change the compiler we specify in the stacks that use the default image (at least share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml, but also maybe others), or else make a new image with the desired compilers already installed.
There was a problem hiding this comment.
No, I didn't. For build-systems it might not matter but I think it matters for e4s. I'll stop the pipeline.
There was a problem hiding this comment.
Phew, that explains why it was canceled! 😅 I was worried there for a sec, when I didn't see any new push or request for spackbot to start a pipeline.
There was a problem hiding this comment.
So, after a chat on slack with @eugeneswalker it seems to me that we'll be using the same compilers as before, so I'll restart the pipeline and see how many rebuilds it triggers.
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
lib/spack/spack/bootstrap.py
Outdated
| # We may need to compile code from sources, so ensure we have compilers | ||
| # for the current platform before switching parts. We use "spack compiler | ||
| # list" as it searches for compilers lazily i.e. only if we don't have | ||
| # them already in compilers.yaml | ||
| compiler_cmd = spack.main.SpackCommand('compiler') | ||
| compiler_cmd( | ||
| 'list', output=os.devnull, error=os.devnull, fail_on_error=False | ||
| ) |
There was a problem hiding this comment.
This doesn't actually ensure we have any compilers available for the current architecture -- if you have only compilers for a different OS, spack compiler list still won't find new ones.
We should explicitly call into the spack.compilers module and check whether we have any compilers for the current architecture.
There was a problem hiding this comment.
Updated the logic in 96ac691. Spack looks into compilers.yaml first and calls:
spack compiler findonly if we don't have a compiler for the current host.
cf4ccb8 to
9924ab5
Compare
| arch = spack.architecture.default_arch() | ||
| arch = spack.spec.ArchSpec(str(arch)) # The call below expects an ArchSpec object | ||
| if not spack.compilers.compilers_for_arch(arch): | ||
| compiler_cmd = spack.main.SpackCommand('compiler') |
There was a problem hiding this comment.
are we using SpackCommand in our code directly now?
Callable object that invokes a spack command (for testing).
is in its docstring
There was a problem hiding this comment.
Would rather not use it in the code, but in a pinch we can. It would be better to factor this so that it does not go through SpackCommand IMO.
There was a problem hiding this comment.
We use SpackCommand in two places in bootstrap.py. The fact is our cli commands are not always thin wrappers of API calls but they may have a fair amount of logic in them. I agree this should be refactored, but I'd prefer to do it in a PR focused on refactoring the API - so that it wouldn't be out of place refactoring other related calls in an internal module and the PR would be focused on a single objective.
5baed16 to
067c446
Compare
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
|
fyi @eugeneswalker |
becker33
left a comment
There was a problem hiding this comment.
Are the libtool/numactl changes really a part of this PR? Is that something that currently fails in clingo?
Mostly LGTM.
| git fetch origin ${{ github.ref }}:test-branch | ||
| git checkout test-branch | ||
| share/spack/qa/run-unit-tests | ||
| bin/spack unit-test -x -m "not maybeslow" -k "package_sanity" |
There was a problem hiding this comment.
Is there a reason we're not running the shell tests anymore?
There was a problem hiding this comment.
The libtool change was a quick workaround a month ago to not select libtool 2.4.2 in DAGs. The real issue has been then fixed in #25585 but since the package update also made sense in itself I kept it. I can extract that into another PR if it makes more sense.
There was a problem hiding this comment.
Is there a reason we're not running the shell tests anymore?
It's because of point 1. in the description (note that we are not running shell tests anymore only in the CentOS 6 tests):
CentOS 6 still uses the original concretizer as it can't connect to the buildcache due to issues with ssl (bootstrapping from sources requires a C++14 capable compiler)
I encountered issues with CentOS 6 in CI due apparently to using an old Python interpreter. Since it is my understanding (or maybe it's just a strong hope 😬 ) that the second after we release v0.17.0 we also drop Python 2.6 I worked around that issue by using the original concretizer and avoiding the:
$ spack spec mpileakswe have in the fast shell tests. Honestly I didn't investigate further the SSL error that was reported with Python 2.6, but let me know if I should dig deeper into it.
- [x] Change defaults/config.yaml
- [x] Add a fix for bootstrapping patchelf from sources
if compilers.yaml is empty
- [x] Make SPACK_TEST_SOLVER=clingo the default for unit-tests
We cannot download information from the binary caches: ==> [2021-08-19-09:26:29.002062] Unable to read index hash https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/index.json.hash Download failed: <urlopen error [Errno 1] _ssl.c:492: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol> 1
Remove preferences that may direct the solver towards libtool@develop Add a conflict to numactl
4a1b342 to
86ec71d
Compare
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
Modifications:
defaults/config.yamlcompilers.yamlis emptySPACK_TEST_SOLVER=clingothe default for unit-testsCaveats:
ssl(bootstrapping from sources requires a C++14 capable compiler)I did this since Radiuss is using that image and is already working with clingo, but it's not clear to me what are the differences between the two tags, so asked for @scottwittenburg review of that change.Thanks for the review @scottwittenburg