Compilation was fine and I can use the ichol function for small matrices. However with the attached 144x144 matrix, I get the following error:
octave>> load A; L = ichol(A,struct('michol','on'));
error: ichol0: zero diagonal found.
The error is generated around the line 200:
// compensate diagonal MIC(0)
if (michol)
{
diag[k] += dropsum;
if (diag[k] <= 0.0)
{
std::cout << "diag1 " << diag[k] << " " << k << " " << dropsum << std::endl;
error ("ichol0: zero diagonal found.");
retval (0) = octave_value (k);
return retval;
}
}
Before the error, I have the following values diag[k]= -1.97638, k = 125 and dropsum = -34.6556. The matrix A is well positive-defined (min(eig(A)) = 13.804) and symmetric.
The modified incomplete cholesky factorization did work on matlab (R2013a). The variable L_matlab contains the result from matlab in case you want to know.
Do you have some ideas on what could be wrong?