I am trying to give examples to my students for directly calling mkl from python (using intel/anaconda python 2.7 dist) in a Windows 10 environment.; simple examples first, then moving on to paradiso, etc. (Yes, everything works fine in python with auto linking of mkl for standard scipy and scipy.sparse functions.) The students will need ctypes for specialty routines like paradiso and for their own needed c++ code snippets.
MKL 2018.3 is installed and successfully accessed via c++ from VS2017. So all the various mkl_rt.dll etc are present in the appropriate redist dirs. I am afraid I am not that familiar with ctypes in a windows environment. In python, trying to start by running the matmult.py example posted here: (https://software.intel.com/en-us/articles/using-intel-mkl-in-your-python...) but python chokes on cdll statement. How do I edit the cdll line
from ctypes import * # Load the share library mkl = cdll.LoadLibrary("./libmkl_rt.so")
for a Windows environment? So far, none of the following work :
mkl=cdll.LoadLibrary(“.\mkl_rt.dll”) #with mkl_rt.dll in current directory mkl=cdll.LoadLibrary(“MKLPATH\mkl_rt.dll”) mkl=windll.LoadLibrary(“.\mkl_rt.dll”) #with mkl_rt.dll in current directory mkl=windll.LoadLibrary(“MKLPATH\mkl_rt.dll”) mkl=windll.LoadLibrary(“MKLPATH\mkl_rt”)
How do I edit the cdll line for a Windows environment?
OR is there a new version of matmult.py needed specific to Windows installation?
Given that we're using the Intel Python distribution - is there a better way to access things like paradiso than using ctypes + the independent MKL install?