Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 ディスカッション

Sparse matrices multiplication

dan789
ビギナー
2,051件の閲覧回数
May be this is not the right place to ask, but anyway...
I am looking for some package to perform simple operations with sparse matrices (vector-sparse matrix multiplication). The best solution would be to find some built-in function (I work with Compaq Visual Fortran for Windows). Could you please tell me, if there is some built-in package already, coming with CVF, such as Compaq Extended Math Library, or whatever else, that supports sparse matrices. If not, what free add-in would you reccommend? Thanks!
0 件の賞賛
8 返答(返信)
Jugoslav_Dujic
高評価コントリビューター II
2,051件の閲覧回数
dan789
ビギナー
2,051件の閲覧回数

Thank you,

So I am aware there are plenty of packages on this...

But what I am looking for is a simple operation: just the vector-sparse matrix multiplication. And I wonder, may be I already have some function for this included in my CVF package? Or a simple fortran code of several lines that I may include in my program?

If not, it seems that it would be simplier for me to write the code myself, rather then trying to understand how to deal with that large packages (BTW, most of them are for UNIX, and I am using Windows).

jcac
ビギナー
2,051件の閲覧回数

Dan,

Numerical Recipies discusses the solution of sparse linear systems, and so may use some concepts that would be useful to you if you end up writing your own routines.

The fortran77 and 90 versions are avaialable online, see www.nr.com

James

emc-nyc
ビギナー
2,051件の閲覧回数
Are you aware of, say, netlib (www.netlib.org)?

A GAMS search comes up with about 140 packages for sparse matrix operations.

Most are generic, i.e., not tuned to a particular compiler.

There are also packages such as BLAS, EISPACK, Harwell, Lanczos, Lanz, and y12m.
Steven_L_Intel1
従業員
2,051件の閲覧回数
CVF's CXML does include sparse matrix operations. Read the CXML documentation for more information.
david_jones
ビギナー
2,051件の閲覧回数
If your CVF version is one that came with IMSL included, then this includes banded and sparse matrices.
David Jones
emc-nyc
ビギナー
2,051件の閲覧回数
The code on, say, Netlib, has been used on IBM mainframes (VM and MVS), Crays, CDCs, Univacs, DEC VAX, inter alia.... Fortran is quite portable, and most of them are in Fortran. They are not "Unix"; they are mostly system-independent.





That being said, are the matrices you're dealing with large (say 100000 dof) or small (1000 dof)?

Message Edited by emc-nyc on 10-03-2005 09:54 AM

Message Edited by emc-nyc on 10-03-2005 09:55 AM

dan789
ビギナー
2,051件の閲覧回数

Ok, by this time I have already wrote my own code for this stuff. It's really just several lines of code. Of cause I may not be sure that this is the best solution (for speed). I did spent about a weektrying to find some existing solution and not to re-invent the wheel. But everything is too general, too complicated, (like solving a system of linear Eqs, which I don't need) and in most cases the installation files are for UNIX.

I use CVF6.6a right now, and I will relocate to the IFV soon.Thanks to this forum, I have found out that my previous CVF6.5 did not include extended math library. The CVF6.6a does now. But anyway, I have all these math libraries now, but there is no simple function like MATMUL that would do the multiplication of matrices, just threating them as sparse. Please correct me if I am wrong.

My matrices are... from 50x50 to 10000x10000. Most of the time I need just to multiply a (dense) vector by a sparse matrix. Very simple stuff. But very time-cunsuming.

返信