-
Notifications
You must be signed in to change notification settings - Fork 57
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
Setting minimum number of CPU cores for a build #3141
Comments
Are you asking for powerful builders, or do you want to find some build-time macro to limit the number of processes? (builds should not overcommit, seems like a packaging issue). |
These are issues at |
I recall that several years ago, I opened a discussion to enhance SPEC files to include minimal hw requirements. Minimal memory. Minimal number of CPUs. Exactly what you are asking for. But it was not welcomed and it was never implemented. I would be very skeptical about implementing something that works only in Copr. Please open the issue in RPM https://github.com/rpm-software-management/rpm/issues, and if it becomes part of SPEC format, we can read it and interpret it in the Copr. |
Long term I agree it should be in the spec format, but in the meantime, it can also be something defined manually for a whole copr project. wdyt? Discussion on upstream opened: rpm-software-management/rpm#2909 |
Why the build "oversubscribes"? Can't the %check section be fixed to respect |
For example |
But what if we give it 2x more CPU: 4 CPUs, it gets 4*2 overcommit, right? Why this isn't "just" 2x faster? I mean, this seems wrong. It seems that the package wants to use something like |
Don't take me wrong; we can offload your builds onto the powerful builders if you think this is the correct thing to do! It just feels like every package should be reasonably "buildable" on every machine, even if it is just a 2-core system. |
Ctest parallelization is orthogonal with the base parallelization, that is to say, if the base parallelization is 4, if you pass it Why it isn't just 2x faster is because of the oversubscription where the OS has to take over on each core and the overhead of that stopping and restating tasks creates an overhead especially with mpi where it is not shared memory. Buildability wise, yes it is buildable on any machine, it's just not testable. To be fair testing-farm can pick up the slack for that (once I figure out how to configure it), but there are certain tests that are not coverable like that, e.g. unit tests with hidden headers. |
This seems like it, yes: If the package build oversubscribes the machine that is known to have "just N CPUs", then it seems like a package bug to me. Or perhaps that's the point of the test to oversubscribe the machine? Dunno. This or that way, I assume it is a hard-to-fix issue in the package. We should go with this. What do you think? |
It's a limitation of the MPI+OpenMP infrastructure and the requirements for testing. MPI needs to spawn at least 2 workers, i.e. One issue is this MPI+OpenMP is standard in scientific code and most of HPC, so it is bound to happen/is happening to various packages as well. But, since these issues are only
For the package I am working on, I can do the former since it only provides regression tests. But having easier access to the latter will come in handy as others encounter this issue. Having the specifications of the normal and powerful builders will also be helpful for the packagers to decide which one to request. |
It's about telling us where you want to build the packages, copr namespace (owner, project, chroots), and the package name. Copr administrators then can finish the configuration. |
Except for powerful builders, there are these additional options:
I'm closing this for inactivity, but, feel free to continue with the request (or discuss). |
Any of those would be helpful. For now I have decoupled the build and test stage, where I had more control on |
Are there any ways to configure the copr project to only run on builders with at least
x
number of CPU cores? I've got a package where the difference is 1h on 4 cores and 3h+ on 2 cores due to oversubscription. This minimum requirement could either be set either on a project level or deduced from the.spec
file.The text was updated successfully, but these errors were encountered: