How to load ScaLAPACK library from Intel MKL (library inter-dependencies)?

Sideboard
Wed, 18 May 2022 08:07:46 +0000
Julia at Scale

Hi,

I am trying to use ScaLAPACK with @ccall to solve a linear system with QR decomposition. On my laptop it works fine with OpenMPI and directly searching for the default ScaLAPACK library:
const libscalapack = Base.Libc.Libdl.find_library("libscalapack")

Using Intel MKL (via OneAPI), however, doesn’t work here. It seemingly doesn’t find libmkl_scalapack_ilp64 but using dlopen directly, reveals a dependency cascade between different libmkl_* libraries (undefined symbol errors). Trying to load all needed libraries did finally let me load libmkl_scalapack_ilp64 but it ends in segmentation faults when actually calling routines.

Is it possible to use MPI.jl and/or MKL.jl to load the MKL system libraries (maybe with Base.Libc.Libdl.RTLD_GLOBAL) so that loading ScaLAPACK later has its dependencies fulfilled?

I would to like use the system-installed libraries instead of the binarybuilt Julia artifacts for use on HPC clusters.

Thanks!

5 posts - 2 participants