Skip to content

Instantly share code, notes, and snippets.

@steveroush
Created February 6, 2026 00:32
Show Gist options
  • Select an option

  • Save steveroush/dcd61df689be44ada7ef91af877d79e9 to your computer and use it in GitHub Desktop.

Select an option

Save steveroush/dcd61df689be44ada7ef91af877d79e9 to your computer and use it in GitHub Desktop.
Graphviz / dot init_rank test: init_rank_21.gv
/*********************************************************************
as of version <<dot - graphviz version 14.1.3~dev.20260124.0732 (20260124.0732)>>
this file: init_rank_21.gv
triggers the 'trouble in init_rank' bug
(see https://gitlab.com/graphviz/graphviz/-/issues/1213)
***********************************************************************/
/***********************************************************************
gvstats.gvpr output:
file: init_rank_21.gv
nodes: 27
edges: 44
clusters: 7
connected graphs: 1
HTML labels: 0
record nodes: 0
(degree is the count of edges connecting to a node)
degree: 2 node count: 3
degree: 3 node count: 16
degree: 4 node count: 7
degree: 6 node count: 1
***********************************************************************/
digraph anonymous {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
subgraph cluster__1 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.1" [Xgroup=GA,
fontname="Courier New",
label="\N",
shape=cds];
"n.2" [Xgroup=GA,
fontname="Courier New",
label="\N",
shape=circle];
"n.3" [Xgroup=GA,
fontname="Courier New",
label="\N",
shape=circle];
"n.4" [Xgroup=GA,
fontname="Courier New",
label="\N",
shape=circle];
"n.5" [Xgroup=GA,
fontname="Courier New",
label="\N",
shape=circle];
}
subgraph cluster__2 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.6" [Xgroup=GB,
fontname="Courier New",
label="\N",
shape=cds];
"n.7" [Xgroup=GB,
fontname="Courier New",
label="\N",
shape=circle];
"n.8" [Xgroup=GB,
fontname="Courier New",
label="\N",
shape=circle];
}
subgraph cluster__3 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.9" [Xgroup=GC,
fontname="Courier New",
label="\N",
shape=cds];
"n.10" [Xgroup=GC,
fontname="Courier New",
label="\N",
shape=circle];
"n.11" [Xgroup=GC,
fontname="Courier New",
label="\N",
shape=circle];
}
subgraph cluster__4 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.12" [Xgroup=GD,
fontname="Courier New",
label="\N",
shape=cds];
"n.13" [Xgroup=GD,
fontname="Courier New",
label="\N",
shape=circle];
"n.14" [Xgroup=GD,
fontname="Courier New",
label="\N",
shape=circle];
"n.15" [Xgroup=GD,
fontname="Courier New",
label="\N",
shape=circle];
"n.16" [Xgroup=GD,
fontname="Courier New",
label="\N",
shape=circle];
}
subgraph cluster__5 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.17" [Xgroup=GE,
fontname="Courier New",
label="\N",
shape=cds];
"n.18" [Xgroup=GE,
fontname="Courier New",
label="\N",
shape=circle];
"n.19" [Xgroup=GE,
fontname="Courier New",
label="\N",
shape=circle];
"n.20" [Xgroup=GE,
fontname="Courier New",
label="\N",
shape=circle];
}
subgraph cluster__6 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.21" [Xgroup=GF,
fontname="Courier New",
label="\N",
shape=cds];
"n.22" [Xgroup=GF,
fontname="Courier New",
label="\N",
shape=circle];
"n.23" [Xgroup=GF,
fontname="Courier New",
label="\N",
shape=circle];
"n.24" [Xgroup=GF,
fontname="Courier New",
label="\N",
shape=circle];
}
subgraph cluster__7 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.25" [fontname="Courier New",
label="\N",
shape=cds,
style=invis];
"n.26" [fontname="Courier New",
label="\N",
shape=rectangle,
style=rounded];
"n.27" [fontname="Courier New",
label="\N",
shape=rectangle,
style=rounded];
}
subgraph g__8 {
graph [Xcompound=true,
Xoutputorder=nodesfirst,
nodesep=.75,
rank=min,
rankdir=LR,
ranksep=0.4,
splines=true
];
"n.1";
"n.6";
"n.9";
"n.12";
"n.17";
"n.21";
"n.25";
}
"n.1":e -> "n.2":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.1":s -> "n.6":n [fontname="Courier New",
style=invis];
"n.2":e -> "n.3":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.2" -> "n.7" [constraint=false,
fontname="Courier New",
style=dashed];
"n.3":e -> "n.4":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.3" -> "n.27" [constraint=false,
fontname="Courier New",
style=dashed];
"n.4":e -> "n.5":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.4" -> "n.19" [constraint=false,
fontname="Courier New",
style=dashed];
"n.5" -> "n.20" [constraint=false,
fontname="Courier New"];
"n.6":e -> "n.7":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.6":s -> "n.9":n [fontname="Courier New",
style=invis];
"n.7":e -> "n.8":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.7" -> "n.10" [constraint=false,
fontname="Courier New",
style=dashed];
"n.8" -> "n.11" [constraint=false,
fontname="Courier New"];
"n.9":e -> "n.10":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.9":s -> "n.12":n [fontname="Courier New",
style=invis];
"n.10":e -> "n.11":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.10" -> "n.15" [constraint=false,
fontname="Courier New",
style=dashed];
"n.11" -> "n.16" [constraint=false,
fontname="Courier New"];
"n.12":e -> "n.13":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.12":s -> "n.17":n [fontname="Courier New",
style=invis];
"n.13":e -> "n.14":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.13" -> "n.18" [constraint=false,
fontname="Courier New",
style=dashed];
"n.14":e -> "n.15":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.14" -> "n.27" [constraint=false,
fontname="Courier New",
style=dashed];
"n.15":e -> "n.16":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.15" -> "n.27" [constraint=false,
fontname="Courier New",
style=dashed];
"n.16" -> "n.5" [constraint=false,
fontname="Courier New"];
"n.17":e -> "n.18":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.17":s -> "n.21":n [fontname="Courier New",
style=invis];
"n.18":e -> "n.19":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.18" -> "n.22" [constraint=false,
fontname="Courier New",
style=dashed];
"n.19":e -> "n.20":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.19" -> "n.23" [constraint=false,
fontname="Courier New",
style=dashed];
"n.20" -> "n.24" [constraint=false,
fontname="Courier New"];
"n.21":e -> "n.22":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.21":s -> "n.25":n [fontname="Courier New",
style=invis];
"n.22":e -> "n.23":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.22" -> "n.26" [constraint=false,
fontname="Courier New",
style=dashed];
"n.23":e -> "n.24":w [Xarrowhead=none,
dir=none,
fontname="Courier New",
style=solid];
"n.23" -> "n.27" [constraint=false,
fontname="Courier New",
style=dashed];
"n.24" -> "n.27" [constraint=false,
fontname="Courier New"];
"n.25" -> "n.26" [fontname="Courier New",
style=invis];
"n.26" -> "n.27" [fontname="Courier New",
style=invis];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment