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

Silent failures of kernels with incorrectly specified access type #229

Open
bozbez opened this issue Jun 28, 2022 · 0 comments
Open

Silent failures of kernels with incorrectly specified access type #229

bozbez opened this issue Jun 28, 2022 · 0 comments

Comments

@bozbez
Copy link
Collaborator

bozbez commented Jun 28, 2022

Currently the translator optimistically assumes that the user has specified the correct access type in the op_arg. In the case they didn't, the code will fail at run-time most likely in a way where the dataset values end up being incorrect or NaN, or with the kernel experiencing degraded performance due to increased MPI communication.

Complete static verification of access types is not possible as mappings are loaded at run-time, however it might be good to extend the translator to perform basic checks of the user kernel to check that the dataset pointers are not used in an obviously wrong manner.

One example of where could help this kernel function from MG-CFD that was incorrectly specifying OP_INC for it's argument which should've been OP_RW:

inline void dampen_ewt(double* ewt) {
    ewt[0] *= 1e-7;
    ewt[1] *= 1e-7;
    ewt[2] *= 1e-7;
}
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

1 participant