Add missing <cstdint> and <cstddef> headers.#214
Add missing <cstdint> and <cstddef> headers.#214breyerml wants to merge 2 commits intoUoB-HPC:developfrom
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.
I'm not sure I understand your comments, as goldC etc are initialised no matter what mode is run.
Line 518 in 2f00dfb
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.
|
Closing as fixed in #202 and working to merge that to |
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.