I am trying to support automatic LP64/ILP64 dispatch for LAPACK eigensolvers such as DSYEVD and ZHEEVD using the OpenBLAS libraries bundled with the NVIDIA HPC SDK.
My environment is:
NVIDIA HPC SDK: 26.3
Compiler: nvfortran
Platform: Linux x86_64
The installation contains separate libraries:
liblapack_lp64.so
liblapack_ilp64.so
libblas_lp64.so
libblas_ilp64.so
I expected that the LP64 library might provide both the ordinary and explicit 64-bit LAPACK entry points, similar to Intel MKL and NVPL:
call zheevd(...) ! INTEGER(4)
call zheevd_64(...) ! INTEGER(8)
However, inspecting the NVHPC libraries gives the following result:
nm -D liblapack_lp64.so | grep -i zheevd
nm -D liblapack_ilp64.so | grep -i zheevd
Both libraries appear to export:
zheevd_
and neither appears to export:
zheevd_64_
I see the same behavior for DSYEVD.
At present, I understand the required usage to be:
LP64:
INTEGER(4) LAPACK arguments
call zheevd(...)
link -llapack_lp64 -lblas_lp64
ILP64:
INTEGER(8) LAPACK arguments
call zheevd(...)
link -llapack_ilp64 -lblas_ilp64
Because the LP64 and ILP64 libraries expose the same Fortran symbol names but use different integer ABIs, it appears that they cannot be linked into one ordinary executable and selected at runtime based on matrix size.
Could NVIDIA please clarify the following?
- Is this interpretation correct for the OpenBLAS libraries bundled with NVHPC?
- Must an application build separate LP64 and ILP64 executables or library variants?
- Is there any supported way to call both LP64 and ILP64 LAPACK interfaces from one executable?
- Does NVHPC provide alternate
_64symbols, wrappers, compiler options, or symbol-suffixed libraries that I have overlooked? - What exactly does
-Mmathlib=openblasselect with respect to LP64 versus ILP64? - Is there an NVHPC equivalent of the NVPL pattern in which an LP64 library also exports explicit
_64routines?