Errors while running Drive samples

Please provide the following info (tick the boxes after creating this topic):
Software Version
[*] DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
[*] Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
[*] DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.2.10884
[ .] other
[*] 1.9.1.10844

Host Machine Version
[*] native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hi, I flashed drive agx orin and I am trying to run samples application by doing cross-compilation following intructions given in this document Build and Run Sample Applications for DRIVE OS 6.x Linux | NVIDIA Docs.
These are the error messages

For cuda samples->

> nvidia@tegra-ubuntu:~/cuda_samples$ ./deviceQueryDrv
> ./deviceQueryDrv Starting...
> 
> CUDA Device Query (Driver API) statically linked version 
> libnvrm_gpu.so: NvRmGpuLibOpen failed, error=14
> checkCudaErrors() Driver API error = 0999 "unknown error" from file <deviceQueryDrv.cpp>, line 38.

For tensorrt samples->

nvidia@tegra-ubuntu:~/tensorrt1/bin$ ./sample_onnx_mnist
&&&& RUNNING TensorRT.sample_onnx_mnist [TensorRT v8510] # ./sample_onnx_mnist
[06/19/2023-10:46:28] [I] Building and running a GPU inference engine for Onnx MNIST
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=14

[06/19/2023-10:46:28] [W] [TRT] Unable to determine GPU memory usage
[06/19/2023-10:46:28] [W] [TRT] Unable to determine GPU memory usage
[06/19/2023-10:46:28] [I] [TRT] [MemUsageChange] Init CUDA: CPU +0, GPU +0, now: CPU 28, GPU 0 (MiB)
[06/19/2023-10:46:28] [W] [TRT] CUDA initialization failure with error: 999. Please check your CUDA installation:  http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
&&&& FAILED TensorRT.sample_onnx_mnist [TensorRT v8510] # ./sample_onnx_mnist

I have given cuda path in bashrc file

export PATH="/usr/local/cuda-11.4/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH"

This is result of nvcc --version command

nvidia@tegra-ubuntu:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Thu_Nov_17_10:44:35_PST_2022
Cuda compilation tools, release 11.4, V11.4.327
Build cuda_11.4.r11.4/compiler.32081285_0

SDK Manager Version which we used to flash was 1.9.2.10899

This works on my side as below:

nvidia@tegra-ubuntu:~/cuda_samples$ ./deviceQueryDrv
./deviceQueryDrv Starting…

CUDA Device Query (Driver API) statically linked version
Detected 1 CUDA Capable device(s)

Device 0: “Orin”
CUDA Driver Version: 11.8
CUDA Capability Major/Minor version number: 8.7
Total amount of global memory: 28458 MBytes (29840424960 bytes)
(16) Multiprocessors, (128) CUDA Cores/MP: 2048 CUDA Cores
GPU Max Clock rate: 1275 MHz (1.27 GHz)
Memory Clock rate: 1275 Mhz
Memory Bus Width: 128-bit
L2 Cache Size: 4194304 bytes
Max Texture Dimension Sizes 1D=(131072) 2D=(131072, 65536) 3D=(16384, 16384, 16384)
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 1536
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Texture alignment: 512 bytes
Maximum memory pitch: 2147483647 bytes
Concurrent copy and kernel execution: Yes with 2 copy engine(s)
Run time limit on kernels: No
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Concurrent kernel execution: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device supports Managed Memory: Yes
Device supports Compute Preemption: Yes
Supports Cooperative Kernel Launch: Yes
Supports MultiDevice Co-op Kernel Launch: Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 0 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
Result = PASS
nvidia@tegra-ubuntu:~/cuda_samples$

This looks the same as mine.

Have you modified anything after flashing DRIVE OS 6.0.6 to the devkit?

Thanks for the reply @VickNV
We tried to setup the proxy and docker in this machine, display was not working so we installed gdm3 in it.
Apart from these we did not change anything.
nvidia-smi is also not working.

nvidia@tegra-ubuntu:~$ nvidia-smi
-bash: nvidia-smi: command not found

nvidia-smi not being available on the Tegra platform is expected. To clarify which steps are impacting this issue, please try running the samples immediately after reflashing DRIVE OS.

We wanted to check the gpu usage that’s why asked for nvidia-smi.
How to check whether tensorrt and cuda installed properly,that might be one of the reason.

This is path given in bashrc file

export PATH="/usr/local/cuda-11.4/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH"

Have you tried this after power cycling the system?

Does this resolve your issue?

We got another orin and tried to run these samples there.It’s working.
Thanks for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.