Compiling a simple CUDA Fortran example (attached):saxpy.txt (841 Bytes) with the HPC SDK Fotran compiler:
$nvfortran saxpy.cuf -lcublas -lcublasLt -lcurand /usr/bin/ld: cannot find libcublas.so /usr/bin/ld: cannot find libcublasLt.so /usr/bin/ld: cannot find libcurand.so pgacclnk: child process exit status 1: /usr/bin/ld
Math libraries are in the LD_LIBRARY_PATH, still the linker cannot find them. However, explicitly indicating the location with -L, compiles and links perfectly:
$nvfortran saxpy.cuf -L/nvidia/hpcsdk/Linux_x86_64/20.5/math_libs/10.2/lib64/ -lcublas -lcublasLt -lcurand
The SDK does not provide a module for math_libs, however we have created additional modules to loads math_libs so they can complement the compilers.
What are we missing?