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

fix #434: determine threads/cores via extra package Hwloc, if CpuId fails #435

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

abpolym
Copy link
Member

@abpolym abpolym commented Dec 18, 2024

This PR should fix #434 .

Let me know if I need to add a test for this? It works now locally and Hwloc only triggers if CpuId fails (which is only in the case of ARM machines).

As soon as this works, I'll update the runtests.jl in the other packages accordingly.

@abpolym abpolym requested a review from bvdmitri December 18, 2024 07:28
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.56%. Comparing base (825eba3) to head (bf9f217).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #435   +/-   ##
=======================================
  Coverage   72.56%   72.56%           
=======================================
  Files         190      190           
  Lines        5493     5493           
=======================================
  Hits         3986     3986           
  Misses       1507     1507           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/runtests.jl Outdated
@@ -1,8 +1,10 @@
using Aqua, CpuId, ReTestItems, ReactiveMP
using Aqua, CpuId, ReTestItems, ReactiveMP, Hwloc
Copy link
Member

Choose a reason for hiding this comment

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

Do we need CpuId then? Can we just use Hwloc in all situations?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the only argument for CpuId is that it is very fast since you only have to run one instruction cpuid.
We only need it once so the theoretical performance increase is non-existant or minimal at best 😄.

Should I just remove the CpuId requirement 👍 👎 ?

@abpolym
Copy link
Member Author

abpolym commented Dec 18, 2024

Removed dependency for CpuId, runtests.jl only uses Hwloc now.

@bvdmitri bvdmitri merged commit 9368139 into main Dec 19, 2024
6 checks passed
@bvdmitri bvdmitri deleted the 434-parallelization branch December 19, 2024 15:35
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.

Parallelization in runtests.jl using ReTestItems and CpuId will not work for Apple M1 Pro CPU
2 participants