Skip to content

gitlab ci install binary deps faster#33248

Merged
alalazo merged 2 commits intospack:developfrom
haampie:fix/gitlab-ci-faster-setup
Oct 26, 2022
Merged

gitlab ci install binary deps faster#33248
alalazo merged 2 commits intospack:developfrom
haampie:fix/gitlab-ci-faster-setup

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Oct 12, 2022

This PR does a few things:

  • Parallel install of binary dependencies from buildcache (with redundant build edges pruned in the DAG)
  • Improve legibility:
    1. Reduce verbosity installing buildcache deps, so that users get to see the build log for the source build
    2. Show timers for binary installation, so we get more insight into why a job is slow.
    3. Use GNU Make's output sync feature to get orderly output when installing deps in parallel
    4. Remove a few spack -d flags, so we get to see the build logs before hitting the max log size.

Screenshot from 2022-10-20 11-42-10
...
Screenshot from 2022-10-20 11-44-14

This PR is built on top of these parts:

@spackbot-app spackbot-app bot added commands core PR affects Spack core functionality update-package labels Oct 12, 2022
@spackbot-app spackbot-app bot added the tests General test capability(ies) label Oct 12, 2022
@haampie haampie force-pushed the fix/gitlab-ci-faster-setup branch 4 times, most recently from 08dd758 to 4d1af00 Compare October 12, 2022 18:48
@haampie haampie force-pushed the fix/gitlab-ci-faster-setup branch from 4d1af00 to 5d6b6ba Compare October 12, 2022 21:58
@spackbot-app spackbot-app bot added the python label Oct 12, 2022
@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 12, 2022

For reference:

or

@haampie haampie force-pushed the fix/gitlab-ci-faster-setup branch from e042d71 to 82cb426 Compare October 13, 2022 09:15
@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 13, 2022

@trws funnily enough we're hitting a broken gmake -Orecurse in Ubuntu 20.04 based containers :D I have no clue what they're doing... maybe they have some patches that broke it or so. The flag effectively has no effect. Fixed in a later version of Ubuntu.

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 14, 2022

Unfortunately the GNU make situation in our builders is rather sad:

  • macOS system make is 3.81(too old for --output-sync)
  • Amazon Linux 2 has gmake 3.82 (too old for --output-sync)
  • Ubuntu 20.04 has a broken --output-sync gmake

Bootstrapping gmake is an option...

@haampie haampie force-pushed the fix/gitlab-ci-faster-setup branch from 253ae0b to 0e8b9fa Compare October 14, 2022 13:40
@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 14, 2022

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 14, 2022

I've started that pipeline for you!

@trws
Copy link
Copy Markdown
Contributor

trws commented Oct 14, 2022

Unfortunately the GNU make situation in our builders is rather sad:

* macOS system make is 3.81(too old for --output-sync)

* Amazon Linux 2 has gmake 3.82 (too old for --output-sync)

* Ubuntu 20.04 has a broken --output-sync gmake

Bootstrapping gmake is an option...

lets do that, or grab a statically linked one, or upgrade it from the package managers, or something.

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 14, 2022

@spackbot run pipeline

(@zackgalbreath @scottwittenburg: seems like the above has triggered on the old HEAD of this PR -- I've force pushed and if you follow the link below, you get Merge 253ae0b into 0de1f98 but the force pushed commit was 0e8b9fa as you can see above).

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 14, 2022

I've started that pipeline for you!

@spackbot-app spackbot-app bot added the gitlab Issues related to gitlab integration label Oct 14, 2022
@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 14, 2022

It's a one-liner to install julia's cross-compiled version, more people should use julia as a package manager

@haampie haampie force-pushed the fix/gitlab-ci-faster-setup branch from b9ec4a0 to 5b3c49b Compare October 16, 2022 09:42
@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 23, 2022

Now seeing https://gitlab.spack.io/spack/spack/-/jobs/3862768 which is probably #31387, added #33478 and #33477 to improve at least the error... (I don't think it's a blocker since gitlab will retry and it happens at the start)

@haampie haampie force-pushed the fix/gitlab-ci-faster-setup branch from 100248f to 7756eab Compare October 24, 2022 11:15
Copy link
Copy Markdown
Contributor

@kwryankrattiger kwryankrattiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two gripes that don't need to be fixed, mostly just notes for me later when we get to the CI module refactor

  • Downloading the make isn't my favorite, but I don't have a better solution, so end of gripe 😞
  • Windows CI, whenever ever it happens, will likely not work well with this. So it will eventually need to be an option instead of always on. Other options would be adding Ninja (@haampie and I talked about this briefly) or adding finer-grained parallel install support in spack itself.

Thanks for your work on this @haampie

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 24, 2022

For windows we'd need to do some refactoring anyways, since we're now generating and executing a shell script. There's already room for spack env depfile --generator ninja, (currently it only supports make as a value). Downloading make is not great, but it can be moved in the base images.

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 24, 2022

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 24, 2022

I've started that pipeline for you!

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 24, 2022

how do I make gitlab ci pass on this pr... Merge develop into here?

@kwryankrattiger
Copy link
Copy Markdown
Contributor

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 24, 2022

I've started that pipeline for you!

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 24, 2022

merging develop s.t. hopefully the openblas hash changes by in something more favorable...

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 24, 2022

@zackgalbreath what can I do to make this PR pass? Apparently merging develop doesn't change the openblas hashes. Why is it failing in this PR?

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 25, 2022

ping @scottwittenburg / @zackgalbreath / @kwryankrattiger, no clue how to proceed here.

@scottwittenburg
Copy link
Copy Markdown
Contributor

I'm not sure what you can do while there is a broken openblas on develop. You might get @tgamblin to merge this in spite of the failure if you think it's enough of an emergency to get this in.

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 25, 2022

It's not an emergency, but this is a ridiculous situation to be in... I don't need to fix openblas here, it's unrelated to my PR. Now my PR is blocked by it :|.

@scottwittenburg
Copy link
Copy Markdown
Contributor

but this is a ridiculous situation to be in

I agree it's unfortunate, sorry. But what policy do you disagree with specifically? That we fail PRs that generate broken hashes? Or just that it affects this particular PR? Keep in mind that one policy is not to prune "untouched" specs from a stack if the PR touched the spack.yaml for that stack, and this PR touches every spack.yaml. So maybe you disagree with how we don't prune "untouched" specs when the affected stack's spack.yaml was touched?

@tgamblin in case you're interested in discussing whether any of these policies should be revisited.

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 25, 2022

@zackgalbreath unmarked openblas cause it's a buildmachine related issue (apparently their makefile still checks the host arch even wtih DYNAMIC_ARCH=1, and the cpu type of the build node was something weird?)

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 25, 2022

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 25, 2022

I've started that pipeline for you!

Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should eventually bootstrap make and tar too.

@alalazo alalazo merged commit a2520e8 into spack:develop Oct 26, 2022
@haampie haampie deleted the fix/gitlab-ci-faster-setup branch October 26, 2022 08:16
becker33 pushed a commit to RikkiButler20/spack that referenced this pull request Nov 2, 2022
* Fast Gitlab CI job setup, and better legibility

* Use a non-broken, recent GNU Make
charmoniumQ pushed a commit to charmoniumQ/spack that referenced this pull request Nov 19, 2022
* Fast Gitlab CI job setup, and better legibility

* Use a non-broken, recent GNU Make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands core PR affects Spack core functionality gitlab Issues related to gitlab integration python tests General test capability(ies) update-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants