cudaErrorUnknown when trying to run samples

Hi,

I just received my Nano and I installed the latest SD image (31-05-19).
I compiled the samples from cuda and no error.
Then when I want to launch any binary I got this message:

[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: "NVIDIA Tegra X1" with compute capability 5.3

CUDA error at oceanFFT.cpp:296 code=30(cudaErrorUnknown) "cudaGraphicsGLRegisterBuffer(&cuda_heightVB_resource, heightVertexBuffer, cudaGraphicsMapFlagsWriteDiscard)"

NB: I am headless with NoMachine and I changed the xorg.conf to avoid the blackscreen (hope it’s not the reason of the error).

Sincerely,
thomas

Hi,

After setting SD card, please remember to flash device and install our libraries with sdkmanager:
[url]https://developer.nvidia.com/embedded/jetpack[/url]

Have you applied this?
Thanks.

Hi,
For sure the SD card is flashed since I am logged into my Nano through NoMachine.

I didn’t install SDKManager because the host my PC is on Windows. Also I don’t think I need it to test cuda samples.
Here is the video from where I learn how to use it :Explore the JetPack 4.2 Samples on the NVIDIA Jetsons - YouTube

Basically what I did their was:

cd /usr/local/cuda
cd samples
./cuda-install-samples-10.0.sh ~
cd ~/NVIDIA_CUDA-10.0_Samples
make -j4
cd bin/aarch64/linux/release
./oceanFFT

Thanks

Hi,

To run CUDA sample, you will need the aarch64 CUDA toolkit from the SDKmanager.
Thanks.

The only build I can download is amd64 CUDA toolkit from here: Jetson Download Center | NVIDIA Developer

Hi,

You will need to install it from the SDK manager.
All the image and packages for Jetson are included in the SDK manager.

Maybe a ubuntu16.04 docker is a possible solution for your environment.
Thanks.

Hi,

Apparently if I flash the JetPack 4.2.1 SD card image, I already have all libraries from SDK manager installed.

I got the same error running this demo on a laptop with two graphic cards (Intel + Nvidia) using the “on-demand” PRIME profile. This sets most of apps to be rendered by Intel GPU, but still lets the Nvidia GPU access the display.

I solved this issue setting two environment variables that force rendering on the Nvidia device:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia ./oceanFFT

This works because the demo uses OpenGL interoperability to share memory across the Cuda context and OpenGL. This feature can’t be used when the Intel device is doing the rendering.

I am not sure if this is the case for Jetson, though.