From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Labs Toolkits

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Sparse Linear Algebra Library

*Note* This page contains information regarding the Sparse Linear Algebra Library offering on NI Labs for archive purposes. 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.

While most functionality included in the NI Labs release is included in the beta software, there may be some discrepancies between this NI Labs page and the beta software / end product. Please see the beta software documentation for the most up-to-date summary of features and reference information.

_______________________________________

Introduction

The sparsity of a matrix is a measure of zero elements in a matrix. A sparse matrix usually denotes a matrix with large sparsity. Unlike a matrix in dense form that stores zero elements explicitly, the sparse matrix is designed specifically to store nonzero elements, or nonzeros, only. It is an approach to conquer the inability to store extremely large matrix in dense form when a large portion of the elements are zeros. Also, sparse matrices are needed to enable faster computations and improve the accuracy of results. The sparse matrices appear in a wide range of scientific and engineering applications such as computational fluid dynamics, finite element methods, graph theory, optimization, structural mechanics and etc.

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.


Features

The Sparse Linear Algebra Library includes the following features. Download the Quick Reference Guide for the entire list of functions.


Numeric, Comparison and Manipulation

The Sparse Linear Algebra Library provides arithmetic, comparison and manipulation operations on sparse matrices including

  • Adds and subtracts sparse matrices as well as other arithmetic operations.
  • Conjugates on complex sparse matrix, gets and sets real and imaginary parts.
  • Converts sparse matrices from one data type to another.
  • Converts full matrices to sparse matrices and vice versa.
  • Compares and validates sparse matrices.
  • Initializes and builds sparse matrices.
  • Gets and sets attributes and elements in sparse matrices.
  • Creates sparse matrices from various storage formats.


Sparse Linear Algebra

The Sparse Linear Algebra Library offers functions to perform linear algebra computations and analysis on sparse matrices including matrix multiplication, transposition and solver for sparse triangular systems.


PARDISO Solver

The PARDISO solver is a parallel direct sparse solver.  It is a thread-safe, high-performance, robust, memory efficient and easy to use software for solving large sparse symmetric and asymmetric linear systems of equations on shared memory multiprocessors. For more information on PARDISO solver, please visit http://pardiso-project.org.


The Sparse Linear Algebra Library exposes the PARDISO interface from Intel® Math Kernel Library (Intel® MKL).  SLAL provides a simplified interface as well as a conventional interface by which you need to initialize a solver, analyze the sparse system, perform the factorization, solve the system and lastly clean up the solver. Both interfaces can be used to solve sparse asymmetric, symmetric and positive definite systems with single or multiple right-hand sides.


Sparse Matrix Visualization

The Sparse Linear Algebra Library provides various ways to render a sparse matrix. Sparse plot controls are available to simplify your work of sparse matrix visualization. You can view the sparse pattern or structure of a sparse matrix in both 2D and 3D ways. You can also view the graph representation of a sparse matrix.


File I/O

The Sparse Linear Algebra Library offers functions to read and write sparse matrices into files in exchange formats. Then, you can read sparse matrices which were saved by external libraries or packages into LabVIEW and vice versa.


Matrix Market Exchange Format

The Matrix Market exchange formats are ASCII-based file formats designed to facilitate the exchange of matrix data. The file formats were designed and adopted for the Matrix Market, a NIST repository for test data for use in comparative studies of algorithms for numerical linear algebra. For more information on Matrix Market and the exchange format, please visithttp://math.nist.gov/MatrixMarket/.

The Sparse Linear Algebra Library includes functions to read and write sparse matrices from and into files in the Matrix Market exchange format.


Sparse Probe

The Sparse Linear Algebra Library includes probe VI for sparse matrix data types. You can use the sparse probe to view the data in a sparse matrix as a VI runs. The sparse probe can display the following information of a sparse matrix.

  • Matrix attributes including data type, size, number of nonzeros and etc.
  • The values, row and column indices of nonzeros.
  • The full matrix representation for sparse matrix not larger than 500-by-500.
  • Sparse pattern in 2D.

To use the sparse probe, you can right-click a wire of sparse matrix and select Custom Probe>>Sparse Matrix Probe from the shortcut menu.


System Requirements

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


Installation Notes

  • For access to the sparse matrix functionality in LabVIEW, please request enrollment in the beta program by contacting casey.weltzin@ni.com
  • Note that the beta program also includes functionality previously included in the High Performance Analysis Library software on NI Labs
Contributors