-
Notifications
You must be signed in to change notification settings - Fork 124
Add missing <cstdint> and <cstddef> headers. #214
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
base: develop
Are you sure you want to change the base?
Conversation
|
Also, if I run: all I get is a SegFault. ./omp-stream -s 1000000000 -n 2 --only Triadgives to correct result. (Note that our machine has enough RAM for the first call.) |
|
Ok. The problem with this SegFault is that due to the |
This is a requirement because some models need to own their own data, either intrinsically or for performance reasons. Ideally we'd not need two copies, so would need to migrate all checking routines to each model. See #128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand your comments, as goldC etc are initialised no matter what mode is run.
Line 518 in 2f00dfb
| T goldC = startC; |
OK, the problem is only with
goldC because it is initialised to zero. I think we need a nicer solution to ensure that this is checked properly.
This PR fixes a bug introduced in #188 due to not adding the necessary
<cstdint>headers when usinginptr_t.Additionally, as far as I understand the code, the current develop branch exhibits UB or, at best, implementation-defined behavior due to the new error checking introduced in #186. If I only enable, for example, the triad kernel,
goldCis never written and, therefore, is equal to 0 (the value ofstartCin theStream.hheader). However, later, the error is calculate as, which results in a division by zero and sets
eCto NaN. In thecheckfunction,eCis tested against NaN and reports a failing check, althoughvCis also zero, in which case the result should be marked as correct.I added a (ugly) hotfix, but I'm currently unable to implement a better fix due to time constraints.