Skip to content
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

Test Ubuntu 24.04 in CI workflows. #414

Closed
wants to merge 3 commits into from

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Oct 16, 2024

This PR tests Ubuntu 24.04 in CI workflows. See rapidsai/shared-workflows#248.

Contributes to rapidsai/build-planning#74.

@bdice bdice added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Oct 16, 2024
@bdice
Copy link
Contributor Author

bdice commented Oct 17, 2024

It appears there is a failure due to the change to rockylinux8 for conda C++ builds (we want to build on a system with the oldest supported glibc).

Formatting build metrics
awk: cmd. line:1: error: division by zero attempted

I'll look into this (a bit later). This also affects RAFT.

@bdice
Copy link
Contributor Author

bdice commented Oct 21, 2024

Testing is complete. rapidsai/shared-workflows#248 has been merged, so we can close this.

@bdice bdice closed this Oct 21, 2024
AyodeAwe pushed a commit that referenced this pull request Oct 21, 2024
Fixes an issue in CI computations of sccache hit rates. See
#414 for details.
@bdice
Copy link
Contributor Author

bdice commented Oct 21, 2024

Following up: I forgot that the fix in build.sh needed to be merged for CI to pass. That was corrected in rapidsai/raft#2474 and #420.

The decision to use python here is pragmatic: there wasn't a good alternative that I could see.

The root cause of the problem was that awk throws an error for expressions with divide-by-zero even if that branch isn't taken!

$ echo - | awk "{ if (1 > 0) { print \"yes\" } else { printf \"%.2f\", 0 / 0 } }"
awk: cmd. line:1: error: division by zero attempted

We are using shell variables to provide the $COMPILE_REQUESTS and $CACHE_HITS so the awk command sees a literal 0 / 0 and fails, even though the conditional never goes down that path. It's like a compile-time error.

Other tools like bc also fail here, due to lacking a concept of NaN. Using python is the next best choice to avoid overcomplication, and it can be done in a one-line command like the previous awk command.

HIT_RATE=$(python3 -c "print(f'{${CACHE_HITS} / ${COMPILE_REQUESTS}:.2f}' if ${COMPILE_REQUESTS} else 'nan')")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant