NPP within Python3 segfaults on malloc?

Hi,

I’m trying to replicate some code which used to be available at http://openvidia.sourceforge.net/index.php/OpenVIDIA/python and seems to be someone saved at https://github.com/mattsta/cudacam/blob/master/python/nppThresholding.py .

I’m running CUDA 9.0 with a Titan V card on Linux Mint (Ubuntu). Other Python-CUDA applications (e.g. homebrew CuPy stuff) work perfectly fine, even impressively so, compared to their speed when I had a 1080Ti installed.

The reduced offending code is:

from ctypes import *
npp_supp = CDLL("/usr/local/cuda/lib64/libnppisu.so")
npp_supp.nppiMalloc_8u_C1.restype = POINTER(c_char)
d_a = npp_supp.nppiMalloc_8u_C1(640, 480, 640)

I’ll sure be grateful if someone can help me figure out what I’m doing wrong here!