id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,port
57878,octave @4.4.1_2+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound+sundials: bug in etree routine causing error,ndellingwood,MarcusCalhoun-Lopez,"The function etree is not working for symmetric, positive definite, square sparse matrices. The error message incorrectly claims a matrix is not sparse when in fact it is a sparse matrix.
This occurs with updated MacPorts 2.5.4 on a MacBook Pro mid-2015 with High Sierra 10.13.6
Reproducer:
{{{
>> Adense = [ 1 0 1.2 1.3 0; 0 20 0 -2.3 2.4; 1.2 0 3 0 3.4; 1.3 -2.3 0 14 0; 0 2.4 3.4 0 15];
>> A=sparse(Adense);
>> issymmetric(A)
ans = 1
>> eigs(A)
ans =
21.65099
15.33624
13.06686
2.78300
0.16291
# eigs(A) to show all eigenvalues are > 0 (i.e. A is positive definite)
>> issparse(A)
ans = 1
>> etree(A)
error: etree: S must be a sparse matrix
}}}
A fix for this bug in the HG Mercurial repo was reported on Nov 22, 2018 at this link:
http://hg.savannah.gnu.org/hgweb/octave/rev/0c7a9fa16998
For quick reference the key fixes, shown in the link above, are to modify
1) line 678 of file **libinterp/dldfcn/colamd.cc** so that it reads as follows:
`if (! args(0).issparse ())`
2) line 71 of file **libinterp/dldfcn/colamd.cc** so that it reads as follows:
`octave_idx_type i = (P ? Pinv[ridx[p]] : ridx[p]);`",defect,closed,Normal,,ports,2.5.4,fixed,upstream,,octave