cudaPointerGetAttributes + cuda-memcheck

There is any solution to avoid cuda-memcheck to report or ignore errors from cudaPointerGetAttributes or cuPointerGetAttribute?

For example, in a mpi cuda-aware program, in my case I use MVAPICH2, it seems that in each communication function it calls cuPointerGetAttribute to check if the pointer is a device buffer.
The problem is if there are a lot of pure host buffers, then cuda-memcheck triggers all these checks in cuPointerGetAttribute as errors.
This can be pretty annoying for a cuda-aware program.

It’s not possible to single this particular API error out, and ignore it only, AFAIK.

However, you can enable or disable the reporting of API errors in general, but leave other types of error reporting intact (such as memory access checking)

You may want to read the cuda-memcheck manual:

http://docs.nvidia.com/cuda/cuda-memcheck/index.html#using-cuda-memcheck

the command line switch for controlling API error reporting is report-api-errors

cuda-memcheck --help will give you abbreviated help also.

Note that these types of API errors reported by cuda-memcheck are informational, they don’t interrupt the application processing in any way. So there are probably ways to just filter them out, e.g. with grep or another tool.