I'm trying to solve a structurally symmetric problem, but for some reason, with the attached program, everything fails except if mtype = 11. Could you help me understand why please ? I've exported the matrix to MATLAB and max(sort(I) - sort(J)) = 0, so the matrix should be indeed structurally symmetric.
Thank you in advance.
MKL doesn’t check what the exact type of input matrix is. It might be the good feature request for the future implementation, but we don’t do that right now. For this partially case, it seems your input matrix is not real and structurally symmetric but this is nonsymmetric. You may try to check it by himself if the input matrix is nonsymmetric. You may try to use mkl_dcsradd ( ….. ) routine with the request == 1 and when the second matrix will be the same but transposed. Then you need to check the number of nonzeroes into resulted matrix C. In the case if this nnz will be different compare with original matrix, that’s mean the input matrix is nonsymmetric.
During investigation of your case I found out that the matrix you've provided doesn't contain all diagonal elements.
According to documentation all diagonal elements must be stored for structurally symmetric matrix (please find description of ja array in https://software.intel.com/ru-ru/node/521678). You can set them to zero and put in values array to avoid problem on reordering phase.