cuda error when px 2 run a executable file by cross compiling(Nsight)


I have a problem when i run a executable example file by cross compiling, the file just run several seconds and nothing displayed, just a transparent window. the error shows that:

vidia@tegra-ubuntu:~/Desktop/test2/Debug$ ./test4
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

[CUDA FFT Ocean Simulation]

Left mouse button          - rotate
Middle mouse button        - pan
Right mouse button         - zoom
'w' key                    - toggle wireframe
[CUDA FFT Ocean Simulation] 
GPU Device 0: "DRIVE PX 2 AutoChauffeur" with compute capability 6.1

CUDA error at ../src/oceanFFT.cpp:296 code=71(cudaErrorNotSupported) "cudaGraphicsGLRegisterBuffer(&cuda_heightVB_resource, heightVertexBuffer, cudaGraphicsMapFlagsWriteDiscard)"

thanks all…

Dear hanbinl,
Could you check compiling the sample on board directly to confirm if the issue with cross compilation or code?