NVHPC on Jetson Nano

Hi,

I have a small modern Fortran code with OpenACC that I want to test on my Jetson Nano Developer Kit (regular 4GB version). I’ve successfully compiled it with NVIDIA HPC SDK 20.11, SBSA version:

$ nvfortran -acc=gpu -Minfo=acc ddot.f90 -o ddot.x
dot_product:
     42, Generating create(result,vecb(:),veca(:)) [if not already present]
     45, Generating present(vecb(:),veca(:))
         Generating copyin(n) [if not already present]
         Generating Tesla code
         46, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
     53, Generating present(result)
         Scalar last value needed after loop for result at line 63,66,78,81,79
         Accelerator serial kernel generated
         Generating Tesla code
     63, Generating present(result,vecb(:),veca(:))
         Generating copyin(n) [if not already present]
         Generating Tesla code
         65, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
             Generating reduction(+:result)
     73, Generating update self(result)

However, when I try to run it, I got an error message I’ve never seen before:

$ echo 100000000 | ./ddot.x
 Input vector length n:
 Using n =     100000000
Failing in Thread:1
call to cuModuleLoadDataEx returned error 209: No binary for GPU

Any help would be appreciated.

PS: Yeah, I know NVHPC 21.2 is available now, but haven’t got time to deploy it on the Jetson Nano

Hi,

What GPU is in the nano? Isn’t it a Maxwell? If so, I think the NV HPC compiler deprecated support for that?

  • Ron

Hi Ron,

Yes, it is Maxwell. It looks like it’s still supported, even though Maxwell is deprecated. I also tried compiling using -gpu=cc50, which succeeded, but when I ran the executable, it gives the same error message.

While we didn’t explicitly disable the Maxwell code gen on ARM, we don’t formally support it and only test using Volta and newer. Though, what CUDA driver version are you using? We do have a minimum driver of 450.36 (CUDA 11).

That might be the problem. The JetPack version that is currently installed carries CUDA 10.2, though I tried using the CUDA 11.1 that is bundled with NVHPC.

This is the result for the CUDA example deviceQuery, under 1_Utilities.

$ ./deviceQuery 
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "NVIDIA Tegra X1"
  CUDA Driver Version / Runtime Version          10.2 / 10.2
  CUDA Capability Major/Minor version number:    5.3
  Total amount of global memory:                 3964 MBytes (4156682240 bytes)
  ( 1) Multiprocessors, (128) CUDA Cores/MP:     128 CUDA Cores
  GPU Max Clock rate:                            922 MHz (0.92 GHz)
  Memory Clock rate:                             13 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 262144 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 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: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  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)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            Yes
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            No
  Supports Cooperative Kernel Launch:            No
  Supports MultiDevice Co-op Kernel Launch:      No
  Device PCI Domain ID / Bus ID / location ID:   0 / 0 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.2, CUDA Runtime Version = 10.2, NumDevs = 1
Result = PASS

Now the issue becomes how to upgrade CUDA on the Jetson Nano. If I use the CUDA Toolkit download links, it breaks the system. At least the “deb (network)” option does that.

Not sure this will work and I can’t test it, but try setting CUDA_HOME to a local CUDA 10.2 SDK install so the compiler will pick-up this CUDA toolset.

Nope, it doesn’t work. Same error message.

Edit: I have the multi-CUDA version installed:

$ dpkg -l nvhpc*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-===========================================================
ii  nvhpc-20-11                 20.11              arm64              NVIDIA HPC SDK 20.11
ii  nvhpc-20-11-cuda-multi      20.11              arm64              CUDA 11.0 files for NVIDIA HPC SDK 20.11
ii  nvhpc-2020                  20.11              arm64              NVIDIA HPC SDK 20.11 20XX symbolic links