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
Beginner
1,343 Views
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 Kudos
8 Replies
Jugoslav_Dujic
Valued Contributor II
1,343 Views
0 Kudos
dan789
Beginner
1,343 Views

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 Kudos
jcac
Beginner
1,343 Views

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 Kudos
emc-nyc
Beginner
1,343 Views
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 Kudos
Steven_L_Intel1
Employee
1,343 Views
CVF's CXML does include sparse matrix operations. Read the CXML documentation for more information.
0 Kudos
david_jones
Beginner
1,343 Views
If your CVF version is one that came with IMSL included, then this includes banded and sparse matrices.
David Jones
0 Kudos
emc-nyc
Beginner
1,343 Views
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 Kudos
dan789
Beginner
1,343 Views

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 Kudos
Reply