Comments (10)
PS. many diagonal elements are zero valued.
from cktso.
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.
The return value of CKTSO_Analyze = -3
from cktso.
Our matrix data are in matrix market file format with matrix market format
"%%MatrixMarket matrix coordinate real general"
from cktso.
-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.
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.
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.
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.
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.
PETSc matrix APIs handle these duplicate entries automatically.
from cktso.
Related Issues (12)
- Support in-place transpose `x` in `CKTSO_L_MV` HOT 4
- Parallel performance HOT 7
- FPGA utilization? HOT 3
- Native support when b is a 2D matrix HOT 9
- Support Apple Silicon M1 and M2 Series HOT 4
- Support custom or natural ordering HOT 2
- Paper access HOT 2
- Support single precision HOT 5
- always return -8 from factorization HOT 8
- Support inplace for CKTSO_L_SolveMV HOT 1
- Helper function for the case when B is an identity matrix HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cktso.