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

L3 cache detection issue #4

Open
kiwifb opened this issue Jun 24, 2017 · 5 comments
Open

L3 cache detection issue #4

kiwifb opened this issue Jun 24, 2017 · 5 comments

Comments

@kiwifb
Copy link
Contributor

kiwifb commented Jun 24, 2017

On sage-on-gentoo on a Debian prefix my friend Steve Trogdon noticed some random failures that seemed related to the use of openmp in m4ri. Disabling openmp solved made the issue go away.

After he investigated further it seems that the L3 cache of the machine is misdetected. Entering some safe values again made it go away.
See cschwan/sage-on-gentoo#475 for the full discussion. I am wondering if the L3 cache detection routine needs updating for newer cpus. The macro hasn't received an update in years (not only in m4ri but upstream as well).

@malb
Copy link
Owner

malb commented Jun 26, 2017

Hi there, from the discussion it seems the culprit isn't quite L3 detection, or am I misreading this?

@kiwifb
Copy link
Contributor Author

kiwifb commented Jun 26, 2017

You are right. I thought it was when I opened the issue but further discussion seem to indicate something more subtle.

@kiwifb
Copy link
Contributor Author

kiwifb commented Jul 5, 2017

It looks like compiling with no optimisation (-O0) leads to the breakage. That's something to remember. I guess the issue can closed.

@malb
Copy link
Owner

malb commented Jul 5, 2017

I think I'll leave the issue open, as this is too odd to ignore :)

@kiwifb
Copy link
Contributor Author

kiwifb commented Jul 6, 2017

OK then serious summary:
When compiled with openmp and -O0 some of m4ri tests fail

PASS: test_random
PASS: test_transpose
PASS: test_colswap
PASS: test_kernel
PASS: test_misc
PASS: test_smallops
PASS: test_ple
PASS: test_solve
FAIL: test_trsm
PASS: test_elimination
FAIL: test_invert
FAIL: test_multiplication

This can resolved by setting the size of the L3 cache to 0 or the same size than the L2 cache. The tests then pass.

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