Skip to content

Silent failures of kernels with incorrectly specified access type #229

@bozbez

Description

@bozbez

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions