Home > Archive > Fortran > March 2006 > Need suggestion on Sparse Matrix Library
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Need suggestion on Sparse Matrix Library
|
|
| andywenj@gmail.com 2006-03-24, 8:01 am |
| Dear all, I am s ing your advice on sparse matrix libray
a) which free sparse matrix solver library is most efficient for the
following problem ?
b) source files that convert a full matrix to a sparse matrix with
certain format that is required by the sparse solver
c) source files that can perform assignment on the nonzero element of
sparse matrix
I am aware of several sparse matrix solvers but i found they only solve
AX=B, with A and B in certain storage format, like direct sparse solver
of MKL, CXML, but they do not provide a subroutine that convert full
matrix to a sparse matrix
Any advice will be appreciated!
Thanks in advance!
given two integer m,n ( say m=10,n=10), according my problem, a square
band matrix H with dimension (8*m*n,8*m*n) can be generated. It is very
sparse and the nonzeros element are near the main diagonal, but I have
no idea of what exact structure of H is since H is generated by the
computer program.
There are also two sparse matrix s1 and s2 with the same dimension as H
and they are functions of a parameter E, E is a scalar.
The nonzoro elements of s1 locate in
s1( 1 : 2*n , 1 : 2*n
),
s1( 1 : 2*n, 4*m*n+1 : 4*m*n+2*n
),
s1( 4*m*n+1 : 4*m*n+2*n, 1 : 2*n
),
s1( 4*m*n+1 : 4*m*n+2*n, 4*m*n+1 : 4*m*n+2*n )
The nonzoro elements of s2 locate in
s2( 1+4*m*n-2*n : 4*m*n , 1+4*m*n-2*n : 4*m*n ),
s2( 1+8*m*n-2*n : 8*m*n , 1+8*m*n-2*n : 8*m*n ),
s2( 1+8*m*n-2*n : 8*m*n, 1+4*m*n-2*n : 4*m*n ),
s2( 1+4*m*n-2*n : 4*m*n, 1+8*m*n-2*n : 8*m*n )
hope this does not confuse you, for example, m=10,n=10
H is 800*800 matrix with nonzones near main diagonal ,
s1(1:20,1:20), s1(1:20,401:420),s1(401:420,1:20) ,s1(401:420,401:420),
s2(381:400,381:400),
s2(381:400,781:800),s2(781:800,381:400),
s2(781:800,781:800)
are nonzero elements.
Then I have to calculate the quadrature of the function quad_curr(E)
like this:
function quad_curr(E)
......
......
assign certain values (dependent on input E) to nonzero elements of
s1 and s2
quad_curr = trace( inv( E*I-H-s1-s2 ) * s1 ) ! the inv is the
inverse of matrix
! I is identity matrix, E is a scalar
! H is constant all over the program
end
since the quadrature will call quad_curr hundreds of thousands of
times, it is excepted that quad_curr can be as efficient as possible.
P.S: i have to do the quadrature about a thousand time, so the totle
call of quad_curr will be millions and my platform is windows 2003 and
CVF with CPU sempron 2800+
| |
| Bernhard Enders 2006-03-24, 8:01 am |
| Is it possible to convert your full matrix to an equivalent sparse
matrix? Try posting also at sci.math.num-analysis.
Bernhard.
| |
| Herman D. Knoble 2006-03-27, 8:00 am |
| For your info. Skip Knoble
Sparse Matrix Tools (free):
Freely Available Software for Linear Algebra on the Web by Jack Dongarra:
http://www.netlib.org/utk/people/Ja...arra/la-sw.html
FsPak: http://nce.ads.uga.edu/~ignacy/numpub/fspak/
LaPack (banded matrices) http://www.netlib.org/lapack/
MUMPS - MUltifrontal Massively Parallel sparse direct Solver:
http://www.enseeiht.fr/lima/apo/MUMPS/
SCSL - Scientific Computing Software Library: http://www.sgi.com/software/scsl.html
SPARSITY - Sparse Matrix software: http://www.cs.berkeley.edu/~yelick/sparsity/
Parallel Sparse Matrix BLAS: http://www.ce.uniroma2.it/psblas/
Optimized Sparse Kernel Interface (OSKI): http://bebop.cs.berkeley.edu/oski/
WATSON Sparse Matrix Package (not free): http://www-users.cs.umn.edu/~agupta/wsmp.html
SparsPak: http://www.psc.edu/~burkardt/src/sparspak/sparspak.html
On 23 Mar 2006 21:59:48 -0800, "andywenj@gmail.com" <andywenj@gmail.com> wrote:
-|Dear all, I am s ing your advice on sparse matrix libray
-|
-|a) which free sparse matrix solver library is most efficient for the
-|following problem ?
-|
-|b) source files that convert a full matrix to a sparse matrix with
-|certain format that is required by the sparse solver
-|
-|c) source files that can perform assignment on the nonzero element of
-|sparse matrix
-|
-|I am aware of several sparse matrix solvers but i found they only solve
-|AX=B, with A and B in certain storage format, like direct sparse solver
-|of MKL, CXML, but they do not provide a subroutine that convert full
-|matrix to a sparse matrix
-|
-|Any advice will be appreciated!
-|Thanks in advance!
-|
-|given two integer m,n ( say m=10,n=10), according my problem, a square
-|band matrix H with dimension (8*m*n,8*m*n) can be generated. It is very
-|sparse and the nonzeros element are near the main diagonal, but I have
-|no idea of what exact structure of H is since H is generated by the
-|computer program.
-|
-|There are also two sparse matrix s1 and s2 with the same dimension as H
-|and they are functions of a parameter E, E is a scalar.
-|
-|The nonzoro elements of s1 locate in
-|s1( 1 : 2*n , 1 : 2*n
-| ),
-|s1( 1 : 2*n, 4*m*n+1 : 4*m*n+2*n
-| ),
-|s1( 4*m*n+1 : 4*m*n+2*n, 1 : 2*n
-| ),
-|s1( 4*m*n+1 : 4*m*n+2*n, 4*m*n+1 : 4*m*n+2*n )
-|
-|The nonzoro elements of s2 locate in
-|s2( 1+4*m*n-2*n : 4*m*n , 1+4*m*n-2*n : 4*m*n ),
-|s2( 1+8*m*n-2*n : 8*m*n , 1+8*m*n-2*n : 8*m*n ),
-|s2( 1+8*m*n-2*n : 8*m*n, 1+4*m*n-2*n : 4*m*n ),
-|s2( 1+4*m*n-2*n : 4*m*n, 1+8*m*n-2*n : 8*m*n )
-|
-|hope this does not confuse you, for example, m=10,n=10
-|
-|H is 800*800 matrix with nonzones near main diagonal ,
-|
-|s1(1:20,1:20), s1(1:20,401:420),s1(401:420,1:20) ,s1(401:420,401:420),
-|
-|s2(381:400,381:400),
- |s2(381:400,781:800),s2(781:800,381:400)
,s2(781:800,781:800)
-|
-|are nonzero elements.
-|
-|Then I have to calculate the quadrature of the function quad_curr(E)
-|like this:
-|
-|function quad_curr(E)
-| ......
-| ......
-|
-| assign certain values (dependent on input E) to nonzero elements of
-|s1 and s2
-|
-| quad_curr = trace( inv( E*I-H-s1-s2 ) * s1 ) ! the inv is the
-|inverse of matrix
-|
-| ! I is identity matrix, E is a scalar
-|
-| ! H is constant all over the program
-|end
-|
-|
-|since the quadrature will call quad_curr hundreds of thousands of
-|times, it is excepted that quad_curr can be as efficient as possible.
-|
-|P.S: i have to do the quadrature about a thousand time, so the totle
-|call of quad_curr will be millions and my platform is windows 2003 and
-|CVF with CPU sempron 2800+
|
|
|
|
|