-
Notifications
You must be signed in to change notification settings - Fork 17
Some minor fixes and cleanups #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some minor fixes and cleanups #212
Conversation
according to section "Building with profile feedback" in https://gcc.gnu.org/install/build.html > It is possible to use profile feedback to optimize the compiler itself. > This should result in a faster compiler binary. > Experiments done on x86 using gcc 3.3 showed approximately 7 percent speedup on compiling C programs.
FWIW, I think |
Is this a pre-cleanup PR to work towards removing the "stackinator-compiler-bootstrap"? |
Co-authored-by: Mikael Simberg <[email protected]>
Well, I'm not sure how to answer 😁 There are two open topics, namely "compiler bootstrapping" and "compilers as dependencies", that are somehow related from my point of view. At the moment I'm looking more on the latter topic (for which I'm going to open a PR with some exploratory work I did), which somehow involves also the former one. More generally, these are small things that I found out while I was studying different parts of the codebase, and I thought they were worth being fixed. I think the answer might be: it is some cleanup work I found myself doing while I was studying the codebase (also) for that topic. But nothing strictly required or preparatory I would say. |
Some context: we should "fork" stackinator soon - keeping the current I am actually a bit reluctant to invalidate the build caches and make a change to how compilers are built in the "old" branch. It works and it ain't broke, and all that. Can we instead focus on making this change in the "new" version? |
After the meeting we had last week, IIUC we target for this PR just changes that do not alter the behaviour and now new functionalities (that will end up in the fork targeting spack 1.0). With the last commit b16745e I reverted the change about In order to do a quick summary check, I've run
and I compared the
As it can be seen above, despite it is a trivial tests, at least it confirms that current status of the PR should end up doing exactly the same, while without the last commit we were getting a different gcc (because of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks Alberto!
Relevant changes are: - drop `compilers.yaml` in favour of `packages.yaml` - use variants to distinguish bootstrap compiler (aka `bootstrap`) from bootstrapped compiler (aka `gcc`); - use `+profiled` for bootstrapped compiler (it was left out from #212) ## Notes ### Distinguishing compilers from various steps Currently the tool build a bootstrapped gcc compiler explicitly via these steps: 1. `gcc@7` look for system compiler 2. `gcc@12 % gcc@7` build a bootstrap compiler using the system one 3. `gcc@12 % gcc@12` build a bootstrapped compiler using the bootstrapp one from previous step Before `[email protected]` this was doable, because compilers were separate from packages. Indeed, we can simplify saying that `%` was looking into `compilers.yaml`. Unfortunately, this is not possible anymore since compilers have become packages, so `%` looks into `packages.yaml`. Previously compilers information from one step to the next were passed via `compilers.yaml`, while now it is passed via `packages.yaml`. This turns out to be a problem when compilers in two steps are of the same version, e.g. step 2 and step3, where with `spack compiler find` we get something like ```yaml # packages.yaml packages: gcc: external: spec: gcc@12 ... ``` and when we do `spack concretize gcc@12` we get it concretized to that one already specified as external, no matter what `variants:` we ask for. The current workaround (see 5a0f1e2) is to: - make the external spec more specific (using `yq`) - make the requested spec more specific (`variants` are not enough)
Changelog:
Makefile.compilers
(70f1ebb)ruff
topyproject.toml
About first point, I currently went for enabling
gcc +profiled
in the template as it was in the unused hard-coded variants, just because it sounds like a good thing. I'm not sure how much difference it will make, but it can make a difference in terms of cache reuse for future uenv builds. Indeed, AFAICT,spack info gcc
reportswhich means that before this PR stackinator was configuring the bootstrapped compiler as
gcc+bootstrap~profiled
and now it should (implicitly) becomegcc+bootstrap+profiled
.Waiting for your comments about this decision, which we can easily revert and keep the bootstrapped compiler as
gcc+bootstrap~profiled
.