LibSVM: Cross validation function does not return, Non terminating
===

I have not used libsvm before and was using the cross validation function as part of the library in C++ and the function never returns the callback. The function I am using is 

`void svm_cross_validation(const struct svm_problem *prob, const struct svm_parameter *param, int nr_fold, double *target);`

with nr_fold = 8. 

The only thing displayed was

`optimization finished,`

 `# iter = 1291`

` nu = 0.357647`

`obj = -265.976493,`

`rho = -1.007322`

`nSV = 2134, nBSV = 2122`

`Total nSV = 2134`

My program stops at that line. Does that mean that the cross validation is complete? If so, why does the function not return? 

In the libSVM FAQ, I read that if the program does not provide any output and keeps running, it may be because of blank spaces in the parameters? I have checked and do not have any.

Another possible source of error given is that the cache size may be too small, I have specified 7000 mb (I have 16 GB RAM), which should be enough.

Some information about my data:

 - 6800 training examples
 - 2 classes (division : 18 % / 72 %) (Could unbalancing be an issue in not producing any output?)
 - Only 3 attributes and each lies between -1 and 1. I did not scale them by getting the maximum minimum etc. so one of the attributes lies between 0 and 1 and the other 2 lie between -1 and 1.
EDIT: Perhaps, the above statement is a little unclear. The attributes lie between -1 and 1, but this is not through scaling. Rather, the function that outputs these values makes sure that they lie between -1 and 1.


svm_parameter values:

 - svm_type = C_SVC
 - kernel_type = RBF
 - gamma = pow(2,-5)
 - coef0 = 0
 - cache_size = 7500
 - eps = 0.001
 - C = pow(2,-3)
 - nr_weight = 0
 - weight_label = NULL
 - weight = NULL
 - nu = 0
 - p = 0
 - shrinking = 0
 - probability = 0

The parameters gamma and C, I just chose at random from the recommended values in the libsvm guide. Later I plan to do a coarse to fine grid search.

I was simply testing libsvm for the first time (so i likely am making a mistake?), as a test before using it. I am relatively new to ML and have taken a class 3 years back.

Perhaps I am not waiting for long enough? I waited for a day and the screen just showed that output. That is probably unlikely with 7000 mb cache right?

What kind of output is cross validation supposed to show? Questions such as 
http://stackoverflow.com/questions/9047459/retraining-after-cross-validation-with-libsvm
indicate that there should be another line "Cross Validation Accuracy = x%". However, that question was in Matlab and it used the function svm_train with -v option, rather than the svm_cross_validation function. 

EDIT Jul 20, 2012:I am actually passing non-const pointers. I will change it, but I don't think THAT could be the reason for the function not returning, right?

Thanks
Shanker