-
Notifications
You must be signed in to change notification settings - Fork 26
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
Random failure in doctesting matrix_mod2_dense.pyx #475
Comments
Also, the doctest runs very inefficiently in Prefix when it passes. Prefix:
Gentoo:
The Gentoo machine is very old, the host machine (w/ Debian) of the Prefix is fairly new. |
Hum... can you post |
I thought that might be of interest.
|
I can replicate things from the Sage prompt.
|
I'm wondering if there is a subtle race condtion controlling this. On my Gentoo box where I have 4 threads
is always run in serial mode. The same is true for vanilla Sage on the same box. But the computer where Prefix is installed has 12 threads and the above code is run in parallel. I'm not sure why, but when the code is run |
You probably have openmp enabled for m4ri. If you recompile m4ri without it on the prefix (there shouldn't be a need to rebuild sage I think) does it improve things? Also do you have openmp enabled for m4ri in pure gentoo? The clue is to whether |
OK, I have |
Hum... Do you have |
Nope. No OPENMP anything defined anywhere. I noticed that |
Nope, it shouldn't. Just because there is no |
|
OK everything passes with openmp here on pure Gentoo. There may be a problem with openmp on your prefix. Although it could be a bug in m4ri that only appears in the right circumstances. |
I ran the tests again and this time only |
Randomness. I may have to check the openmp code. It shouldn't happen. |
The code may have buggy use of L3 cache in tuning. My processor
If I disable L3 cache by adding
to |
I may have to multipy the L1 and L2 cache by 1024? |
Well actually doing the above (setting L3=0) disables parallel testing. Not good, so its not implemented correctly. |
Multiplication by 1024 is necessary I believe (it says size in bytes). L3=0 disable parallel testing? You mean |
There is one thing to try, update ax_gcc_x86_cpuid.m4 in the m4 folder by the latest version from https://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html#ax_gcc_x86_cpuid |
Let me address the parallel testing, I'll report on updating the macro in another post. I misinterpreted my results. With L3=0 and |
Updating the macro file did not improve things. So far, the only thing that works here is setting L3=0. I was motivated to try L3=0 since my gentoo box, where everything is fine with |
It appears that if L3=0 then for building purposes the L3 CACHE value is set equal to the L2 CACHE value. Setting L3=L2 works here. |
OK, I will open an issue for upstream m4ri. But I have a feeling the macro for detecting the size of the cache may need an update which is in another upstream. |
@strogdon if you don't specify the L3 cache, what value does the autodetection give you? |
After
which are correct, but perhaps the issue is with how the CACHE values are used? |
Well, this may be a gentoo prefix issue! After unpacking the
all tests pass. The Debian gcc is |
Hum... could be issues with gcc or glibc. Still very curious. |
In prefix changing |
This is most unusual. Does it work with |
|
I can deal with that. The need for at least some optimisation is rare but not unheard of. It still makes me feel something is wrong in either the compiler or the program. But this can be filtered. |
Reproduced at |
This is in Prefix where I have Sage built with debugging enabled,
CFLAGS="-march=native -O0 -pipe -g -ggdb"
, ... , etc.I have seen the failure for some time. It always occurs when doctesting Sage. However, lately I see the failure when running the test individually - though randomly. Initially I thought the failure was due to my
CFLAGS
for debugging, but I'm not sure anymore.The text was updated successfully, but these errors were encountered: