Harwell-Boeing
The Harwell-Boeing (HB, also Boeing-Harwell) format is a text-based file format for exchanging sparse matrices. It was introduced in 1982 by Iain Duff, Roger Grimes, John Lewis and Bill Poole as the packaging format for the Harwell-Boeing collection of sparse matrix test problems, drawn from the Harwell laboratory (UK) and Boeing Computer Services. For years it was the most common mechanism for text-file interchange of sparse matrix data in the numerical linear algebra community, and remains widely readable today.
Structurally, HB is an 80-column, fixed-length ASCII format designed for portable Fortran I/O. A file opens with a header of four or five lines: line 1 carries a 72-character title plus an 8-character key; line 2 gives the line counts of the data blocks; line 3 encodes a three-character matrix type code together with the number of rows, columns and nonzeros; line 4 supplies the Fortran format descriptors for the data; and an optional line 5 describes right-hand-side vectors when present. The type code names the arithmetic (Real, Complex, Pattern), the structure (Symmetric, Unsymmetric, Hermitian, skew-symmetric, Rectangular) and the assembly (Assembled or Elemental).
The numerical payload uses compressed column storage (CCS), so much so that CCS is often just called the Harwell-Boeing format. The data blocks are: column start pointers, the row indices of the nonzeros, the optional numerical values, and optional right-hand sides, starting guesses and solutions. Storing only nonzeros makes it compact for the large, mostly-zero matrices that arise in finite-element models, circuit simulation and PDE discretizations.
In graph terms, a sparse matrix is an adjacency or incidence matrix, so HB files describe graphs implicitly, much as the Rutherford-Boeing (Rutherford-Boeing) and Matrix Market (Matrix Market) exchange formats do. Rutherford-Boeing is the direct successor: where HB required all supplementary data to live in one file, RB standardizes separate auxiliary files and relaxes several rigid conventions. Compared with graph-native encodings such as DIMACS or METIS, HB is matrix-centric rather than vertex/edge-centric.
Its limitations follow from its age. The dependence on exact Fortran fixed-width column formats makes hand-editing and parsing in modern languages error-prone; there is no metadata beyond the terse title and key; and it carries only a single matrix per file with no direct notion of edge labels or attributed graphs. For new work Matrix Market or Rutherford-Boeing are usually preferred, but HB persists because of the enormous legacy corpus of test matrices distributed in it.
Alternative Names: HB, Harwell-Boeing Exchange Format
| Feature | Harwell-Boeing |
|---|---|
| Multiple Graphs per Document | |
| Nodes | |
| Undirected Edges | |
| Directed Edges | |
| Hyperedges | |
| Mixed-directionality Edges | |
| Parallel Edges | |
| Self-loops | |
| Edges on Edges | |
| Nested Graphs in Nodes | |
| Nested Graphs in Edges | |
| Nested Graphs in Graphs | |
| Node Labels | |
| Edge Labels | |
| Attributes on Nodes | |
| Attributes on Edges | |
| Attributes on Graphs | |
| Typed Edges | |
Tools(Read & Write)
Read-only Tools
Frequently Asked Questions
What is a Harwell-Boeing file?
A Harwell-Boeing file stores a graph — its nodes, edges and attributes — in the Harwell-Boeing format (also: HB, Harwell-Boeing Exchange Format). See the feature table above for what it supports.
How do I open a Harwell-Boeing file?
Open it in a graph tool that supports Harwell-Boeing, or convert it to a format your tool reads. With GraphInOut you can convert Harwell-Boeing to GraphML, DOT, Connected JSON and more, right in your browser.
How do I convert a Harwell-Boeing file to another format?
Use the Convert from Harwell-Boeing link above: upload or paste your Harwell-Boeing file (input preset to Harwell-Boeing), choose a target format and download the result — free, no install.