Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Sparse matrices multiplication

dan789
Débutant
3 073 Visites
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 Compliments
8 Réponses
Jugoslav_Dujic
Précieux contributeur II
3 073 Visites
0 Compliments
dan789
Débutant
3 073 Visites

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).

0 Compliments
jcac
Débutant
3 073 Visites

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

0 Compliments
emc-nyc
Débutant
3 073 Visites
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.
0 Compliments
Steven_L_Intel1
Employé
3 073 Visites
CVF's CXML does include sparse matrix operations. Read the CXML documentation for more information.
0 Compliments
david_jones
Débutant
3 073 Visites
If your CVF version is one that came with IMSL included, then this includes banded and sparse matrices.
David Jones
0 Compliments
emc-nyc
Débutant
3 073 Visites
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

0 Compliments
dan789
Débutant
3 073 Visites

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.

0 Compliments
Répondre