Git Product home page Git Product logo

Comments (10)

AMSSWANGYIJIA avatar AMSSWANGYIJIA commented on September 2, 2024

PS. many diagonal elements are zero valued.

from cktso.

chenxm1986 avatar chenxm1986 commented on September 2, 2024

It looks that this is not a problem of tuning the solver. There is some error and the entire solver process is not performed at all. The reported times are all 0 and values are random. Please check the return value of CKTSO_Analyze.

from cktso.

AMSSWANGYIJIA avatar AMSSWANGYIJIA commented on September 2, 2024

The return value of CKTSO_Analyze = -3

from cktso.

AMSSWANGYIJIA avatar AMSSWANGYIJIA commented on September 2, 2024

Our matrix data are in matrix market file format with matrix market format
"%%MatrixMarket matrix coordinate real general"

from cktso.

chenxm1986 avatar chenxm1986 commented on September 2, 2024

-3 means invalid matrix... does your matrix have duplicated entries(for example, you have two ai[i] of same ai[i] value and the double values of two ax[i] need to be accumulated, this case is not allowed in CKTSO)? This is the most possible reason. Other reasons are all related to value out of range or matrix singular (including ap[0]!=0, ap[n]<=0, ap[n]<n, any ap[i]<0, any ap[i]>ap[i+1], any ai[i]<0, or any ai[i]>=n).

from cktso.

chenxm1986 avatar chenxm1986 commented on September 2, 2024

another reason may be in the read code of mtx file. the code provided in the demos may not handle any case. they are simple and just provided for demo purpose. you may check if the read was correct or use you own read code.

from cktso.

AMSSWANGYIJIA avatar AMSSWANGYIJIA commented on September 2, 2024

Doctor Chen, thank you for your kindness help. The real problem is the duplicated entries. I fixed the bug and everything just worked fine. Since many of these matrix files are dumped for C or C++ scientific computation libraries to assemble a matrix in some so called "Add_Values" mode, it is very common to come into such a situation, i.e., in these libraries duplicate values will be accumulated automatically. I suggest, in my humble opinion, CKTSO could provide a simple tool to check and transform such "problematic" matrix market files into good ones.

from cktso.

chenxm1986 avatar chenxm1986 commented on September 2, 2024

Yes, this is a practical requirement in some applications. Actually we already have a simple internal tool that can remove duplicated entries. It needs to be called before every factorization. It leads to some additional latency and memory usage, especially when the matrix is very sparse. I am now thinking about how to integrate this funtion into CKTSO to eliminate these overheads.
I have q question about your case. You mentioned that KLU and PARDISO can solve your matrices. But KLU does not allow duplicated entries either (I did not check PARDISO carefully). How did you handle duplicated entries in KLU?

from cktso.

AMSSWANGYIJIA avatar AMSSWANGYIJIA commented on September 2, 2024

Well the answer is quite simple, both KLU and MKL PARDISO were called using PETSc APIs, the matrix was assembled using PETSc's own "Add_values-like" APIs.

from cktso.

AMSSWANGYIJIA avatar AMSSWANGYIJIA commented on September 2, 2024

PETSc matrix APIs handle these duplicate entries automatically.

from cktso.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.