Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6956 Discussions

how to use Cluster PARDISO and ScaLAPACK functions in python ctypes

Chaowen_G_
Beginner
408 Views

Hi:

I know I can use python ctypes to load libmkl_rt.so use mkl. However, libmkl_rt .so does not have all the Cluster PARDISO and ScaLAPACK functions. If I want to use such functions, I needs to -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lmkl_blacs_intelmpi_lp64 -liomp5. But ctypes just can load one shared library, I can not just load mkl_scalapack_lp64 or mkl_intel_lp64, because they all have undefined symbols. I want to ask how to use Cluster PARDISO and ScaLAPACK functions in python ctypes?

0 Kudos
1 Reply
Ying_H_Intel
Employee
408 Views

Hi Chaowen, 

I guess there is more than one way to link third-party static library or dynamic library to python.

But the first thing in my mind, as cluster Pardiso and scalapack is not in libmkl_rt.so, you can build one  Custom DLL, which link the function you wanted, then link the "custom.dll" instead of libmkl_rt.so. 

You can find the "custom dll " build tool in MKL install folder and some guide in the on-line articles. 

https://software.intel.com/en-us/articles/using-intel-mkl-in-your-python-programs

Best Regards,

Ying 

0 Kudos
Reply