-
Notifications
You must be signed in to change notification settings - Fork 407
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
Change powerPC clocktic into 64 bit version and remove 32 bit version #5577
Conversation
Please revise the PR title, and I think this is good to go. |
@ndellingwood would you please confirm this resolves #5502 |
This might be hard for @ndellingwood to do, as the problem might not show in every run. I am currently trying with @ajpowelsnl to run it for an extended period of time to look into this. |
Repeat runs of tests without failures, a good sign :) |
Later introduction of the failing test aside, this may be worth cherry picking into 3.7.01 |
In #5502 we discovered that sometimes one of our tests fails on
PowerPC
. The failing test uses theClockTic
functionality to count the cycles that elapsed. The cycles counted as elapsed in the failing test is (in this case)11'258'999'065'812
. The testTestSharedSpace
uses a difference ofuint64_t
returned by theClockTic
to measure timings independent of the current frequency the core is running on. The differences is then added in aparallel_reduce
to compute the number of cycles needed for the memory accesses.As the difference of unsigned should not be affected by any overflow, I suspect something being wrong with how the
ClockTic
is read from the registers. I ended up looking at the documentation I found for the registers hereand
So I tried to split the implementation for PowerPC into a 32 and 64 bit version, as the 64 bit version apparently can read the register as one
unsigned long
value while the 32 bit needs to read two registers and add them like onx86
.If we have anyone who is good with
asm
and knows this kind of stuff: any help/insight/thing here is greatly appreciated.Also I might be looking in a completely wrong direction here ...