NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Welcome to LabVIEW Sparse Linear Algebra Library

The functionality previously provided by the Sparse Linear Algebra Library (SLAL) on NI Labs will be included in an official LabVIEW software add-on in the near future. To request enrollment in the beta program, evaluate the software, and provide feedback, please contact Product Manager Casey Weltzin at casey.weltzin@ni.com.

Description:
The Sparse Linear Algebra Library (SLAL) provides sparse matrix data types and various operations on sparse matrix data types in LabVIEW. It is designed as a powerful supplement to the existing dense matrix data types in LabVIEW such that you can take full advantage of the large number of zeros for both storage and computation.

Software Requirements:

  • Windows XP or later
  • LabVIEW 2009 (32-bit)

Please feel free to ask questions here.

Thanks,

Qing

0 Kudos
Message 1 of 13
(9,699 Views)

The installation notes state that HPAL must be removed before installing this library.  Can you explain why this is so, and whether these two packages will eventually coexist?

0 Kudos
Message 2 of 13
(4,003 Views)

Some of Sparse Linear Algebra Library functions also call Intel MKL routines. We found some performance issue if there are two seperated dll. So we decide to combine HPAL and SLAL into one installer. The SLAL installer also includes the HPAL VIs. The only difference is that dll is at a different location.

0 Kudos
Message 3 of 13
(4,003 Views)

Thanks - it wasn't clear from the original notes.

0 Kudos
Message 4 of 13
(4,003 Views)

Thanks for reminding. I slightly revise the homepage. I hope it is clear now.

0 Kudos
Message 5 of 13
(4,003 Views)

Is there a straight-forward way to install this for more than one version of LabVIEW?  With the release of LV2011 I would like to able to install for this, but the installer sees it is already installed on 2010 and won't do anything else.

0 Kudos
Message 6 of 13
(4,003 Views)

One solution is to copy the whole folder 'C:\Program Files\National Instruments\LabVIEW 2009\vi.lib\addons\High Performance Computing' into the same location of LV 2011. Then mass compile all the VIs.

0 Kudos
Message 7 of 13
(4,003 Views)

Thanks.  I thought that would probably work, but wasn't sure if any other files were placed anywhere else.

0 Kudos
Message 8 of 13
(4,003 Views)

So, I started playing around with SLAL for a case of blocked bi-diagonal matrix. I didn't seem able to use the CSR format. From the Intel site, the row indices point to the first element of each row. For a NxM block (M=2N) this would seem to be 0, M, 2M etc. However, I got an error trying that. I could use the COO format where you put in the row of each element (which is slightly wasteful in my case). I would like to see the blocked sparse format: BSR. Many problems result in blocks [ like mine 😉 ]. And there are methods of solving by blocks that are much quicker than a general approach.

I also find it difficult to use the build Sparse matrix functions. It would be nice to add or set (dense or blocked) matrices in at any point in the sparse matrix by just defining a row,col starting point. I would have preferred to set the dimensions of the sparse matrix first, and then set each block as I calculate it. [Come to think of it, the "Set Submatrix" VI is kind of dumb as it requires the total number of rows and cols. You should just input the starting row and col and wire in the submatrix. You already have the dimensions of the submatrix, so just set it. End of digression.] So, I basically have to use the COO for each block (adding the starting col for each block into the cols input) and then Build by Row. Here is my Sparse matrix:

Sparse Blocked.jpg

There is no help for any of these VIs, so I am not sure about some issues. I am assuming the the MKL Pardiso Solver includes the Init -> Analysis -> Facorization -> Adv-Solver -> Clean-Up. Is that correct? I have to run multiple solving iterations. Should I use the Adv functions and iterate the Factorization -> Adv-Solver part (doing Init, Analysis, ... Clean-Up only once)?

I get the same solution as building the full matrix and using HPAL LU decomp (I am glad to report). Thanks for making this available. Please take my feedback into consideration for future releases.

0 Kudos
Message 9 of 13
(4,003 Views)

Thanks for your feedback. Here are my comments:

1. For the error on using CSR format, one possible problem is that the length of row index should be equal to the number of rows + 1. The last elements should be the number of nonzeros. If that is not the case, would you mind to send me your vi? It would be helpful to identify the problem.

2. Block algorithms are definitely one of our interests. We have solution for block bidiagonal/tridiagonal solver. The only problem is how to organize these functionalities into the library.

3. I agree that having a 'Set Submatrix' VI is helpful, especially for block matrix. Thanks again for this suggestion.

4. If your matrix is not changing during the iterations, you can call 'Init -> Analysis -> Facorization' before the loop, and just call 'Adv-Solver' in the loop, then 'Clean-Up' after loop.

0 Kudos
Message 10 of 13
(4,003 Views)