libsvm icon indicating copy to clipboard operation
libsvm copied to clipboard

Octave 4.0 and parallelised LibSVM don't work together

Open MaxG87 opened this issue 9 years ago • 4 comments

I'm using Octave 4.0.0 on Kubuntu 15.10 (yes, the beta) on a 64bit machine. I applied the updated rules that were mentioned in April. I can compile without error message using 'make.m'. However, I cannot run it.

N = 10000;
L = randi(2,1,N);
D = [randn(1,N/2) randn(1,N/2)+1];
model = svmtrain(L',D');
error: /opt/libsvm/octave/svmtrain.mex: failed to load: /opt/libsvm/octave/svmtrain.mex: undefined symbol: GOMP_loop_guided_start

How can this error be resolved?

MaxG87 avatar Oct 19 '15 12:10 MaxG87

Hi, I have tested Octave 4.0.0 on Debian 9. It works well for 8-thread parallelism. Do you add the option "-lgomp" in make.m?

infwinston avatar Oct 20 '15 12:10 infwinston

Thank you. Replacing every 'mex ' with 'mex -lgomp ' did the trick.

MaxG87 avatar Oct 20 '15 13:10 MaxG87

You're welcome. Actually you can check the faq here, there is a step-by-step teaching for parallelizing libsvm using matlab/octave. http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f8032

infwinston avatar Oct 20 '15 13:10 infwinston

I've actually overseen this, I'm sorry.

Why isn't there simply a different branch or a code version able to do both?

MaxG87 avatar Oct 20 '15 13:10 MaxG87