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

Use a formula for the number of cores used #2284

Merged
merged 11 commits into from
Jul 25, 2024
Merged

Use a formula for the number of cores used #2284

merged 11 commits into from
Jul 25, 2024

Conversation

payetvin
Copy link
Contributor

@payetvin payetvin commented Jul 24, 2024

close #2266

Copy link
Member

@flomnes flomnes left a comment

Choose a reason for hiding this comment

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

Good ! But then you don't need a std::map then, so please remove it.

uint computeNumberOfCores(uint nbLogicalCores, Antares::Data::NumberOfCoresMode ncMode)
{
switch (ncMode)
{
    case ncMin: return 1;
    case ncLow: return std::ceil(nbLogicalCores / 4.);
    // etc.
}
}

@flomnes
Copy link
Member

flomnes commented Jul 25, 2024

Could you also add some tests ?

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 25, 2024
@payetvin payetvin requested a review from flomnes July 25, 2024 12:25
Copy link

@flomnes flomnes merged commit 6f412e7 into develop Jul 25, 2024
8 checks passed
@flomnes flomnes deleted the fix/nb-core branch July 25, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Number of cores in parallel
2 participants