optix7course fails cuda-memcheck

While debugging my own application i discovered by chance that the optix7course project (https://gitlab.com/ingowald/optix7course) fails cuda-memcheck.

Running example 02 or above with cuda-memcheck produces an error similar to:

========= Host API memory access error at host access to 0x7f14dd0081d8 of size 1140 bytes
=========     Invalid range on access by cudaMemcopy source.
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib/x86_64-linux-gnu/libcuda.so.1 (cuMemcpyDtoDAsync_v2 + 0x219) [0x293d59]
=========     Host Frame:/usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.440.26 [0x14b2bb]
=========     Host Frame:/usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.440.26 [0x14bd0d]
=========     Host Frame:/usr/lib/x86_64-linux-gnu/libnvoptix.so.1 [0x167998]
=========     Host Frame:/usr/lib/x86_64-linux-gnu/libnvoptix.so.1 [0x72c875]
=========     Host Frame:./ex02_pipelineAndRayGen (_ZN3osc14SampleRenderer6renderEv + 0x69) [0x9519]
=========     Host Frame:./ex02_pipelineAndRayGen (main + 0x53) [0x85c3]
=========     Host Frame:/lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main + 0xe7) [0x21b97]
=========     Host Frame:./ex02_pipelineAndRayGen (_start + 0x2a) [0x88ba]
=========

What is the cause of this error? I am basing my own project on this example and i get the a similar error when running cuda-memcheck on it.

Hi Mattivc,

cuda-memcheck is not yet expected to work on OptiX applications. It will sometime in the future, but OptiX breaks CUDA conventions which confuses cuda-memcheck. The tools that do work with OptiX are Nsight Compute, Nsight Systems, Nsight VSE, and cuda-gdb.


David.