src-d / kmcuda

Large scale K-means and K-nn implementation on NVIDIA GPU / CUDA
Other
783 stars 144 forks source link

NameError: name 'gpu_0' is not defined #107

Closed mauroianni closed 4 years ago

mauroianni commented 4 years ago

Hi, I'm using libKMCUDA library to devise a python3 (3.6 is my current version) algorithm. In particular I'm working on p2v machines (equipped with a teslva v100) offered by open telekom cloud provider, with installed Ubuntu 18.04.

For what concern my current CUDA installation, running the 'nvidia-smi', what I obtain is:

Mon Apr 27 16:49:37 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64.00 Driver Version: 440.64.00 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla V100-PCIE... Off | 00000000:00:0D.0 Off | 0 |
| N/A 36C P0 35W / 250W | 0MiB / 16160MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

However, when I try to execute my python3 program (with -c flag), importing the libKMCUDA library, what I obtain is:

Traceback (most recent call last):
File "", line 1, in
NameError: name 'gpu_0' is not defined

While removing the import, the problem disappear.

I tried other CUDA-based python algorithm and them are executed correcly.

Do you have any idea about the origin of the problem?