HBSMC
Harwell Boeing
Sparse Matrix Collection


HBSMC is a dataset directory which is the Harwell Boeing Sparse Matrix Collection, a representative collection of large sparse matrices gathered from a large variety of application areas.

The matrices in HBSMC can be used to test, verify, and compare algorithms for solving sparse systems of linear equations. There are also some least squares problems and eigenvalue calculations.

The original collection contained just 36 matrices, and those are directly accessible here. For the more recent and much larger collection, you need to refer to the web site.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

DLAP, a FORTRAN90 library which carries out the iterative solution of sparse linear systems, by Anne Greenbaum and Mark Seager.

HB_IO, a C++ library which reads and writes sparse linear systems stored in the Harwell Boeing (HB) format for sparse matrices.

HB_READ, a FORTRAN90 library which reads files in the Harwell Boeing (HB) sparse matrix format; This is a simplified interface intended to handle only the most common format, complex unsymmetric assembled (CUA) or real unsymmetric assembled (RUA).

HB_TO_MM, a MATLAB program which converts a sparse matrix from Harwell Boeing (HB) to Matrix Market (MM) format.

HB_TO_MSM, a MATLAB program which converts a sparse matrix stored in a Harwell Boeing (HB) format to MATLAB sparse matrix format;

HB_TO_ST, a FORTRAN77 program which converts a sparse matrix from Harwell Boeing (HB) format to Sparse Triplet (ST) format.

SUPERLU, a C program which applies a fast direct solution method to sparse linear systems, and can read a matrix that is stored in the Harwell Boeing sparse matrix format.

Reference:

  1. Iain Duff, Roger Grimes, John Lewis,
    User's Guide for the Harwell-Boeing Sparse Matrix Collection,
    October 1992.
  2. Iain Duff, Roger Grimes, John Lewis,
    Sparse Matrix Test Problems,
    ACM Transactions on Mathematical Software,
    Volume 15, pages 1-14, March 1989.
  3. http://math.nist.gov/MatrixMarket/data/Harwell-Boeing/ the Matrix Market web site.

CodePatternMax OrderMax Nonzeroes Note
abb313_pra.txt pattern rectangular assembled313x1761557 Sudan survey
add20_rua.txt real unsymmetric assembled2395x239517319 Steve Hamm 20 bit adder
arc130_rua.txt real unsymmetric assembled85x85304 Laser problem
ash85_psa.txt pattern symmetric assembled85x85304 Holland survey
ash219_pra.txt pattern rectangular assembled219x85438 Survey of Holland
ash292_psa.txt pattern symmetric assembled292x2921250 UK survey
ash331_pra.txt pattern rectangular assembled331x104662 Scotland survey
ash608_pra.txt pattern rectangular assembled608x1881216 England survey
ash958_pra.txt pattern rectangular assembled958x2921916 UK survey
bp_0000_rua.txt real unsymmetric assembled822x8223276 Simplex method basis
bp_0200_rua.txt real unsymmetric assembled822x8223802 Simplex method basis
bp_0400_rua.txt real unsymmetric assembled822x8224028 Simplex method basis
bp_0600_rua.txt real unsymmetric assembled822x8224172 Simplex method basis
bp_0800.txt real unsymmetric assembled822x8224534 Simplex method basis
bp_1000.txt real unsymmetric assembled822x8224661 Simplex method basis
bp_1200.txt real unsymmetric assembled822x8224726 Simplex method basis
bp_1400.txt real unsymmetric assembled822x8224790 Simplex method basis
bp_1600.txt real unsymmetric assembled822x8224841 Simplex method basis
cannes24_psa.txt pattern symmetric assembled24x2492 Lucien Marro symmetric pattern
cg05_cua.txt complex unsymmetric assembled25x25105 Complex test matrix for SUPERLU
cg10_cua.txt complex unsymmetric assembled100x100460 Complex test matrix for SUPERLU
cg20_cua.txt complex unsymmetric assembled400x4001920 Complex test matrix for SUPERLU
cmat_cua.txt complex unsymmetric assembled1280x128022778 Complex test matrix for SuperLU
curtis54_pua.txt pattern unsymmetric assembled54x54291 Stiff biochemical ODE's
dwg961a_cua.txt complex unsymmetric assembled961x9613405 Dispersive waveguide structures
eris1176_psa.txt pattern symmetric assembled1176x11769864 Electrical network
fs_541_1_rua.txt real unsymmetric assembled541x5414285 Stage 1 of stiff atmospheric ODE
fs_541_2_rua.txt real unsymmetric assembled541x5414285 Stage 2 of stiff atmospheric ODE
fs_541_3_rua.txt real unsymmetric assembled541x5414285 Stage 3 of stiff atmospheric ODE
fs_541_4_rua.txt real unsymmetric assembled541x5414285 Stage 4 of stiff atmospheric ODE
g05_rua.txt real unsymmetric assembled25x25105 Real test matrix for SUPERLU
g10_rua.txt real unsymmetric assembled100x100460 Real test matrix for SUPERLU
g20_rua.txt real unsymmetric assembled400x4001920 Real test matrix for SUPERLU
gent113_pua.txt pattern unsymmetric assembled113x113655 Statistical application
ibm32_pua.txt pattern unsymmetric assembled147x1471298 IBM conference ad
illc1033.txt real rectangular assembled1033x3204732 Unsymmetric least squares problem
jagmesh1_psa.txt pattern symmetric assembled936x9363600 George: small hole square
jagmesh2_psa.txt pattern symmetric assembled1009x10093937 George: graded L
jagmesh3_psa.txt pattern symmetric assembled1089x10894225 George: plain square
jagmesh4_psa.txt pattern symmetric assembled1440x14405472 George: large hole square
jagmesh5_psa.txt pattern symmetric assembled1180x11804465 George: plus-shaped region
jagmesh6_psa.txt pattern symmetric assembled1377x13775185 George: H-shaped domain
jagmesh7_psa.txt pattern symmetric assembled1138x11384294 George: 3 hole problem
jagmesh8_psa.txt pattern symmetric assembled1141x11414303 George: 6 hole problem
jagmesh9_psa.txt pattern symmetric assembled1349x13495225 George: pinched hole problem
lund_a_rsa.txt real symmetric assembled147x1471298 stiffness and mass
lund_b_rsa.txt real symmetric assembled147x1471294 stiffness and mass
mahindas_rua.txt real unsymmetric assembled1258x12587682 Unsymmetric matrix
mhd1280b_cua.txt complex unsymmetric assembled1280x128022778 Alfven sprectra in magnetohydrodynamics
shl_000_rua.txt real unsymmetric assembled663x6631687 Simplex method basis
shl_200_rua.txt real unsymmetric assembled663x6631726 Simplex method basis
shl_400_rua.txt real unsymmetric assembled663x6631712 Simplex method basis
str_000_rua.txt real unsymmetric assembled363x3632454 Simplex method basis
str_200_rua.txt real unsymmetric assembled363x3633068 Simplex method basis
str_400_rua.txt real unsymmetric assembled363x3633157 Simplex method basis
str_600_rua.txt real unsymmetric assembled363x3633279 Simplex method basis
utm300_rua.txt real unsymmetric assembled300x3003155 UTM
will57_pua.txt pattern unsymmetric assembled57x57281 Jacobian of a switch circuit
will199_pua.txt pattern unsymmetric assembled199x199701 Stress analysis
young1c_csa.txt complex unsymmetric assembled841x8414089 David Young aero research matrix

The following table lists the contents of the current version of the collection.

CodeDisciplineMatricesMax OrderMax Nonzeroes
ACOUSTAcoustic scattering48414089
AIRTFCAir traffic control1287315032
ASTROPHAstrophysics276524382
BCSPWRPower network matrices14530013571
BCSSTRUC1Dynamic analysis in structural engineering 26200342943
BCSSTRUC2Static analysis in structural engineering 51194880519
BCSSTRUC3Structures, eigenproblems2215439133840
BCSSTRUC4Dynamic analysis in structural engineering 54410111717
BCSSTRUC5Structures, linear equations36446091029655
BCSSTRUC6Structural engineering2334513047
CANNESFinite elements in aircraft design188385424
CEGBFinite elements in structural engineering 433069378
CHEMINPChemical engineering plant models54251339
CHEMWESTChemical engineering1620217353
CIRPHYSCircuit physics19916027
COUNTERXCounter examples, small matrices31176
DWTEverstine test set, ship structures30268023853
ECONAUSAustralian economic models11252990158
ECONIEAEconomic models9497x50753403
FACSIMILEChemical kinetics problems107605976
GEMATOptimal power flow problems3492947369
GRENOBLESimulation of Computer Systems711075664
JAGMESHFinite element model problem914405472
LANPROLinear equations in structural engineering 79608402
LAPLACEModel PDE problems39004322
LAPUUnassembled Laplace finite element matrices 12564
LNSFluid flow modeling7393725407
LOCKHEEDUnassembled structural engineering matrices 4349113507
LSHAPEGraded L-shape patterns21346613681
LSQLeast squares surveying problems4185010608
MANTEUFFELUnassembled finite element matrices10 597615680
NNCENGFlow in networks14344710
NUCLNuclear reactor core modelling313748606
OILGENOil reservoir modelling19500520033
PLATZOceanography4191917159
PORESReservoir modeling312249613
PSADMITPower system networks411382596
PSMIGRDemography33140543162
SAYLOROil reservoir modeling3356422316
SHERMANOil reservoir modeling5500520033
SMTAPEOriginal Harwell test set368224841
STEAMOil recovery360013760
WATTPetroleum Engineering2186511550

HB Sparse Matrix Storage

The Harwell Boeing Sparse Matrix Collection uses a special kind of sparse matrix storage for most of the matrices in the collection.

The standard sparse matrix format is column oriented. That is, the matrix is represented by a sequence of columns. Each column is held as a sparse vector, represented by a list of row indices of the entries in an integer array and a list of the corresponding values in a separate real array. A single integer array and a single real array are used to store the row indices and the values, respectively, for all the columns.

Data for each column are stored in consecutive locations. The columns are stored in order, and there is no space between columns. A separate integer array holds the location of the first entry of each column, and the first free location. For symmetric and Hermitian matrices, only the entries of the lower triangle are stored, including the diagonal. For antisymmetric matrices, only the strict lower triangle is stored.

Here is a simple example of a 5 by 5 matrix:

        1.0 -3.0  0.0 -1.0  0.0
        0.0  0.0 -2.0  0.0  3.0
        2.0  0.0  0.0  0.0  0.0
        0.0  4.0  0.0 -4.0  0.0
        5.0  0.0 -5.0  0.0  6.0
      

The Harwell Boeing format essentially thinks of this matrix as a collection of 5 column vectors:

        1.0 -3.0 -2.0 -1.0  3.0
        2.0  4.0 -5.0 -4.0  6.0
        5.0
      
All the entries in a column share the same column index, of course, but to completely identify an entry, we will also need to remember what row it belonged to.

This matrix would be stored in the arrays

as follows:
        Subscripts:   1    2    3    4    5    6    7    8    9   10   11

        COLPTR        1    4    6    8   10   12
        ROWIND        1    3    5    1    4    2    5    1    4    2    5
        VALUES      1.0  2.0  5.0 -3.0  4.0 -2.0 -5.0 -1.0 -4.0  3.0  6.0
      
We can recover column 5 of the original matrix, say, by observing that its first entry is in position COLPTR(5)=10 of arrays ROWIND and VALUES. This entry is in row ROWIND(10)=2 and has value VALUES(10)=3.0. Other entries in column 5 are found by scanning ROWIND and VALUES to position COLPTR(6)-1, that is, position 11. Thus, the only other entry in column 5 is in row ROWIND(11)=5 with value VALUES(11)=6.

HB Finite Element Matrix Storage

The Harwell Boeing finite element storage format is used for those matrices derived from finite element problems.

Matrices arising in finite element applications are usually assembled from numerous small elemental matrices. The collection includes a few sparse matrices in original unassembled form. The storage of the individual unassembled matrices is based on the general sparse format, which stores a matrix as a list of matrix columns. The elemental representation stores the matrix as a list of elemental matrices. Each elemental matrix is represented by a list of the row/column indices (variables) associated with the element and by a small dense matrix giving the numerical values by columns, or in the symmetric case, only the lower triangular part. The lists of indices are held contiguously, just as for the lists of row indices in the standard format. The dense matrices are held contiguously in a separate array, with each matrix held by columns. Although there is not a one to one correspondence between the arrays of integer and numerical values, the representation does not hold the pointers to the beginning of the real values for each element. These pointers can be created from the index start pointers (ELTPTR) after noting that an element with NU variables has NU*NU real values, or (NU*(NU+1))/2 in the symmetric case.

The unassembled finite element storage scheme can be illustrated with a small, 5 by 5 symmetric example matrix:

        5.0  0.0  0.0  1.0  2.0
        0.0  4.0  3.0  0.0  6.0
        0.0  3.0  7.0  8.0  1.0
        1.0  0.0  8.0  9.0  0.0
        2.0  6.0  1.0  0.0 10.0
      
which is to be assembled from four symmetric elemental matrices:
            1   4         1   5        2   3   5        3   4
        1 (2.0 1.0)   1 (3.0 2.0)  2 (4.0 3.0 6.0)  3 (2.0 8.0)
        4 (1.0 7.0)   5 (2.0 8.0)  3 (3.0 5.0 1.0)  4 (8.0 2.0)
                                   5 (6.0 1.0 2.0)
      
The variable indices are indicated by the integers marking the rows and columns. Because this matrix is symmetric, only the diagonal and lower triangular elements are to be stored. Using the arrays: the matrix would be stored as follows:
 
        Subscripts:  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
        ELTPTR:      1       3       5           8      10
        VARIND:      1   4   1   5   2   3   5   3   4
        VALUES:      2.  1.  7.  3.  2.  8.  4.  3.  6.  5.  1.  2.  2.  8.  2.
      

You can go up one level to the DATASETS directory.


Last revised on 18 February 2014.