Problems with nvfortran on Jetson AGX Orin

Hello,
I possess a Jetson AGX Orin 64GB Dev-kit. I’m trying to install Quantum Espresso on it, although it is not the problematic point here.
Currently I’m facing problem with nvfortran and cuda, since I’m not able to compile an example fortran code with GPU support.

The setup is as follows:

  • Machine set up via Nvidia SDKManager, installing JetPack6.2 (with cuda support);
  • CUDA12.6 correctly installed;
  • hpc_sdk 25.1 installed following this guide.

I’m failing to compile the following toy example:

program test_gpu_single_copy2
  use cudafor
  use iso_c_binding, only: c_loc, c_size_t, c_ptr
  implicit none
  integer, parameter :: n = 10
  real(4), device :: d_array(n)
  real(4), allocatable :: h_array(:)
  integer :: i, ierr
  integer(c_size_t) :: bytes
  type(c_ptr) :: h_ptr, d_ptr

  allocate(h_array(n))
  bytes = n * 4_c_size_t  ! 4 bytes per single-precision element

  ! Launch the kernel with one block of n threads
  call kernel_set_value<<<1, n>>>( d_array )
  ierr = cudaDeviceSynchronize()
  if (ierr /= 0) then
    print*, "cudaDeviceSynchronize error:", ierr
    stop
  end if

  ! Obtain C pointers explicitly from the Fortran arrays
  h_ptr = c_loc(h_array(1))
  d_ptr = c_loc(d_array(1))

  ! Call cudaMemcpy using the C pointers
  ierr = cudaMemcpy(h_ptr, d_ptr, bytes, cudaMemcpyDeviceToHost)
  if (ierr /= 0) then
    print*, "cudaMemcpy error:", ierr
    stop
  end if

  do i = 1, n

When I try to execute it with nvfortran -g -cuda -gpu=sm_87,cuda12.6 test_gpu.f90 -o test_gpu
it fails returning:

NVFORTRAN-S-0155-Could not resolve generic procedure cudamemcpy (test_gpu.f90: 28)
  0 inform,   0 warnings,   1 severes, 0 fatal for test_gpu

Any hint about what could be wrong? Thank you.

Hi,

The HPC SDK doesn’t support Jetson.
You can find this in our document below:

https://docs.nvidia.com/hpc-sdk/hpc-sdk-install-guide/index.html

This section describes how to install the HPC SDK from the tar file installer on Linux x86_64 or Arm Server systems with NVIDIA GPUs.

“Arm Server systems with NVIDIA GPUs” indicating the environment with dGPU (GPUs connected via PCIe).
Jetson is an iGPU (on-chip GPU) so is not included in the support range.

Thanks.

1 Like

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