Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.56k stars 216 forks source link

std::bad_alloc when loading from file using Python interface #148

Closed yuxhuang closed 5 years ago

yuxhuang commented 5 years ago

Hi,

I have a consistently reproducible std::bad_alloc error when trying to load a trained model SVC().load_from_file('/path/to/model'). On Windows,

  File "path\to\thundersvm.py", line 473, in load_from_file
    thundersvm.get_sv(csr_row, csr_col, csr_data, data_size, c_void_p(self.model))
OSError: exception: access violation reading 0x00000000000000AB

And on Linux,

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

On both Windows and Linux, I built the code from your master branch with CUDA 10.0.

Attached is the model file that causes the error. SVC.zip

QinbinLi commented 5 years ago

Hi @yuxhuang

Thanks for your feedback. We have fixed this bug. You can update the library and try again.

yuxhuang commented 5 years ago

@GODqinbin thanks, it works fine now. Much appreciated.