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

Setting cores to 0 will use half of the available cores #3276

Merged
merged 5 commits into from
Dec 27, 2022

Conversation

keyboardDrummer
Copy link
Member

Setting cores to 0 will use half of the available cores.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@@ -40,7 +40,8 @@ public static class BoogieOptionBag {
o.Parse(SplitArguments(boogieOptions).ToArray());
}
});
DafnyOptions.RegisterLegacyBinding(Cores, (o, f) => o.VcsCores = f);
DafnyOptions.RegisterLegacyBinding(Cores,
(o, f) => o.VcsCores = f == 0 ? System.Environment.ProcessorCount / 2 : (int)f);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this round up? What happens on a machine with one core?

@keyboardDrummer keyboardDrummer merged commit 68f492a into dafny-lang:master Dec 27, 2022
@keyboardDrummer keyboardDrummer deleted the zeroCores branch December 27, 2022 17:36
RustanLeino pushed a commit to RustanLeino/dafny that referenced this pull request Dec 29, 2022
)

Setting cores to 0 will use half of the available cores.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
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

Successfully merging this pull request may close these issues.

None yet

2 participants