Skip to content

Tests on CI should use multiple threads #1043

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

Open
PatrickHaecker opened this issue Apr 23, 2025 · 1 comment
Open

Tests on CI should use multiple threads #1043

PatrickHaecker opened this issue Apr 23, 2025 · 1 comment

Comments

@PatrickHaecker
Copy link
Contributor

We have bugs involving multi-threading (#963, #990) and should add regressions tests.

However, if I understand this correctly, they could even give a false sense of reliability, as CI runs PackageCompiler.jl single-threaded and so they would appear to succeed even if they would fail in a multi-threaded context. We could run processes we create from PackageCompiler.jl multithreaded, but I think the most realistic use case is to just set JULIA_NUM_THREADS for CI. This way everything in PackageCompiler.jl is automatically tested in a multi-threaded context.

@danielwe
Copy link

It's not uncommon to launch subprocesses with different env and args from runtests.jl. Here's one example: https://github.com/EnzymeAD/Enzyme.jl/blob/cbadb626de5f0d7c011356933422133ef9fdebd4/test/runtests.jl#L1634-L1639.

The benefit of this approach is that the different launch configurations explicitly become part of the test suite, so they won't inadvertently get lost when, say, the package moves to a different CI provider. They also become part of PkgEval runs.

But the best solution is whatever actually gets implemented. I don't use this package myself, just chiming in from the Discourse threads, so I won't put my name down for one or the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants