TEXT FORMAT

Scotch

Scotch Graph Format

Scotch is the native source-graph file format of the Scotch software package for static mapping, graph and mesh partitioning, and sparse-matrix reordering. Scotch is developed by François Pellegrini and collaborators within the TADaaM team at Inria Bordeaux and LaBRI (Laboratoire Bordelais de Recherche en Informatique), and is distributed under the CeCILL-C license. The format is used to feed graphs into Scotch's command-line tools (such as gpart, gmap and gord) and, through its libScotch API, into scientific-computing codes that need to distribute unstructured meshes and matrices across processors or to reduce fill-in during sparse factorization. Files conventionally carry the ".grf" (or ".src") extension for the graph itself, with companion geometry stored separately in ".xyz" files.

A source graph file is plain ASCII text describing an undirected graph by adjacency. A version-number line is followed by a line giving the number of vertices (vertnbr) and the number of arcs (edgenbr), where the arc count is twice the number of edges because each edge is listed from both endpoints. A third line holds the base index (baseval, typically 0 for graphs written by C code and 1 for Fortran) and a three-digit numeric flag: a non-zero units digit signals that per-vertex weights (loads) are present, the tens digit signals per-edge weights, and the hundreds digit signals explicit vertex labels. The body then contains one record per vertex: an optional load, an optional label, the vertex degree, and the list of neighbor indices, each optionally preceded by its edge load. Because the graph is symmetric and stored twice, the format targets partitioning and ordering rather than directed-graph interchange.

Within the format-conversion landscape Scotch occupies the same niche as other numeric partitioning formats and is frequently discussed alongside METIS, Chaco and DIMACS; the METIS and Scotch ecosystems each provide converters that translate between the two, since many finite-element and linear-algebra codes support both. Scotch also exposes a subset of the METIS API for drop-in replacement. It is largely disjoint from the graph-visualization and semantic-web world, so it shares little with formats such as GraphML, GML or DOT beyond being a graph description.

The format's strengths are compactness, streaming-friendly line orientation, and a direct mapping to compressed-sparse adjacency structures used internally, making very large graphs (billions of vertices via the MPI-based PT-Scotch variant) practical. Its limitations are corresponding: it carries no arbitrary attributes, no styling or coordinates (geometry is offloaded to a separate file), no directed-edge or hyperedge semantics beyond the mesh extension, and its terse positional layout is easy to misread without the flag conventions, so it is best treated as a computational input format rather than a general graph interchange or archival format.

Alternative Names: Scotch source graph

File Extensions: .grf.src
FeatureScotch Graph Format
Multiple Graphs per Document not supported
Nodes supported
Undirected Edges supported
Directed Edges not supported
Hyperedges not supported
Mixed-directionality Edges not supported
Parallel Edges not supported
Self-loops not supported
Edges on Edges not supported
Nested Graphs in Nodes not supported
Nested Graphs in Edges not supported
Nested Graphs in Graphs not supported
Node Labels supported
Edge Labels not supported
Attributes on Nodes supported
Attributes on Edges supported
Attributes on Graphs not supported
Typed Edges not supported

Tools(Read & Write)

Frequently Asked Questions

What is a Scotch Graph Format file?

A Scotch Graph Format file stores a graph — its nodes, edges and attributes — in the Scotch Graph Format format (also: Scotch source graph). See the feature table above for what it supports.

How do I open a Scotch Graph Format file?

Open it in a graph tool that supports Scotch Graph Format, or convert it to a format your tool reads. With GraphInOut you can convert Scotch Graph Format to GraphML, DOT, Connected JSON and more, right in your browser.

How do I convert a Scotch Graph Format file to another format?

Use the Convert from Scotch Graph Format link above: upload or paste your Scotch Graph Format file (input preset to Scotch Graph Format), choose a target format and download the result — free, no install.