pythoncudactypesnvidiacula

Load CULA dense library into python on jetson tk1 board


Having successfully downloaded and installed the full CULA dense R18 package from this website (http://www.culatools.com/downloads/dense/) onto my jetson TK1 board, I haven't been able to load the library into python using ctypes. I've changed LD_LIBRARY_PATH in ./bashrc to include the directory which contains the libcula_lapack.so shared object file:

export PATH=/usr/local/cuda-6.0/bin:$PATH
LD_LIBRARY_PATH=/usr/local/cula/lib/
export LD_LIBRARY_PATH

but when I run the following code:

import ctypes
libculac = ctypes.cdll.LoadLibrary("libcula_scalapack.so")

I get this error:

libcula_scalapack.so: cannot open shared object file: No such file or directory

I have tried putting the full directory in as an argument etc. and I have also tried every .so file in the lib directory and lib64 directory in case I had the wrong file. When I put a text file within the same directory (or any directory for that matter) and call it in the LoadLibrary command, the aforementioned error code does not trigger unless I make a typo (another error message is of course triggered though as expected).

In contrast I have applied the exact same methodology (as far as I can tell) to importing cudart and npp libraries into python with great success. Any help would be greatly appreciated and please inform me if I've left out any important information or if I'm being very dense (pun intended). Thanks!

Board: Jetson TK1

CUDA: 6.0 (downloaded from https://developer.nvidia.com/jetson-tk1-support)

OS: L4T Ubuntu 14.04 (from https://developer.nvidia.com/jetson-tk1-support)

Language: Python 2.7


Solution

  • It appears as though the CULA library isn't compatible with ARM architectures, as indicated by the line "CULA uses the IntelĀ® Math Kernel Library (MKL) internally" in the Reference Guide, and hence not compatible with the Jetson TK1, which is a darn shame.