File size: 9,504 Bytes
660c0b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# [INFO GPL-0075] Routability numCall: 1 inflationIterCnt: 1 bloatIterCnt: 0

Tool: Global Routing

Subcategory: Stuck in routine

## Conversation

### oharboe
So I thought my run was almost finished, it went fairly quickly for a while, but then it got stuck in "Routeability" below.

5 minutes until it got to the GPL-0075 progress message, then stuck there for at least 30 minutes.

What does this mean and what can I do about it?

The floorplan in my case looks quite reasonable and generous.

https://github.com/The-OpenROAD-Project/OpenROAD/blob/580bd35a8b17f0ea7ff8afafb6cf6d23b757063e/src/gpl/src/routeBase.cpp#L557

```

[NesterovSolve] Iter: 370 overflow: 0.254754 HPWL: 19171375971

[NesterovSolve] Iter: 380 overflow: 0.250836 HPWL: 18915207500

[NesterovSolve] Iter: 390 overflow: 0.225598 HPWL: 18784146027

[NesterovSolve] Iter: 400 overflow: 0.201047 HPWL: 18784861983

[INFO GPL-0075] Routability numCall: 1 inflationIterCnt: 1 bloatIterCnt: 0

```


### oharboe
A little bit of suspend/resume profiling using latest OpenROAD and release build...

Hmmm... curious. I don't think this is a performance problem, but there were a lot of exceptions thrown, so I had to turn off breakpoints on exceptions.

```

__cxa_throw (@__cxa_throw:3)



sta::DmpAlg::findDriverParams(double) (.cold) (@sta::DmpAlg::findDriverParams(double) (.cold):14)

sta::DmpPi::gateDelaySlew(double&, double&) (.cold) (@sta::DmpPi::gateDelaySlew(double&, double&) (.cold):50)

sta::DmpCeffDelayCalc::gateDelay(sta::LibertyCell const*, sta::TimingArc const*, float const&, float, sta::Parasitic const*, float, sta::Pvt const*, sta::DcalcAnalysisPt const*, float&, float&) (@sta::DmpCeffDelayCalc::gateDelay(sta::LibertyCell const*, sta::TimingArc const*, float const&, float, sta::Parasitic const*, float, sta::Pvt const*, sta::DcalcAnalysisPt const*, float&, float&):88)

sta::GraphDelayCalc1::findArcDelay(sta::LibertyCell*, sta::Pin const*, sta::Vertex*, sta::MultiDrvrNet*, sta::TimingArc*, sta::Parasitic*, float, sta::Vertex*, sta::Edge*, sta::Pvt const*, sta::DcalcAnalysisPt const*, sta::ArcDelayCalc*) (@sta::GraphDelayCalc1::findArcDelay(sta::LibertyCell*, sta::Pin const*, sta::Vertex*, sta::MultiDrvrNet*, sta::TimingArc*, sta::Parasitic*, float, sta::Vertex*, sta::Edge*, sta::Pvt const*, sta::DcalcAnalysisPt const*, sta::ArcDelayCalc*):112)

sta::GraphDelayCalc1::findDriverEdgeDelays(sta::LibertyCell*, sta::Instance*, sta::Pin const*, sta::Vertex*, sta::MultiDrvrNet*, sta::Edge*, sta::ArcDelayCalc*) (@sta::GraphDelayCalc1::findDriverEdgeDelays(sta::LibertyCell*, sta::Instance*, sta::Pin const*, sta::Vertex*, sta::MultiDrvrNet*, sta::Edge*, sta::ArcDelayCalc*):105)

sta::GraphDelayCalc1::findDriverDelays1(sta::Vertex*, bool, sta::MultiDrvrNet*, sta::ArcDelayCalc*) (@sta::GraphDelayCalc1::findDriverDelays1(sta::Vertex*, bool, sta::MultiDrvrNet*, sta::ArcDelayCalc*):108)

sta::GraphDelayCalc1::findDriverDelays(sta::Vertex*, sta::ArcDelayCalc*) (@sta::GraphDelayCalc1::findDriverDelays(sta::Vertex*, sta::ArcDelayCalc*):63)

sta::FindVertexDelays::visit(sta::Vertex*) (@sta::FindVertexDelays::visit(sta::Vertex*):74)

sta::BfsIterator::visit(int, sta::VertexVisitor*) (@sta::BfsIterator::visit(int, sta::VertexVisitor*):71)

sta::GraphDelayCalc1::findDelays(int) (@sta::GraphDelayCalc1::findDelays(int):47)

sta::Sta::checkSlewLimitPreamble() (@sta::Sta::checkSlewLimitPreamble():82)

rsz::RepairDesign::repairDesign(double, double, double, int&, int&, int&, int&, int&) (@rsz::RepairDesign::repairDesign(double, double, double, int&, int&, int&, int&, int&):65)

rsz::Resizer::findResizeSlacks() (@rsz::Resizer::findResizeSlacks():24)

gpl::TimingBase::updateGNetWeights(float) (@gpl::TimingBase::updateGNetWeights(float):18)

gpl::NesterovPlace::doNesterovPlace(int) (@gpl::NesterovPlace::doNesterovPlace(int):1262)

_wrap_replace_nesterov_place_cmd (@_wrap_replace_nesterov_place_cmd:20)

TclNRRunCallbacks (@TclNRRunCallbacks:37)

___lldb_unnamed_symbol1504 (@___lldb_unnamed_symbol1504:315)

Tcl_EvalEx (@Tcl_EvalEx:9)

```

Ooops.... from within the debugger(attaching) to the release build, I ran into an recursive loop below and a SEGFAULT.

Curiously, this infinite stack recursion does not appear with the debug build, which makes for an interesting debug exercise...

```

rsz::RepairDesign::repairNetJunc(std::shared_ptr<rsz::BufferedNet>, int, int&, sta::Vector<sta::Pin const*>&) (@rsz::RepairDesign::repairNetJunc(std::shared_ptr<rsz::BufferedNet>, int, int&, sta::Vector<sta::Pin const*>&):16)

rsz::RepairDesign::repairNet(std::shared_ptr<rsz::BufferedNet>, int, int&, sta::Vector<sta::Pin const*>&) (@rsz::RepairDesign::repairNet(std::shared_ptr<rsz::BufferedNet>, int, int&, sta::Vector<sta::Pin const*>&):82)

[deleted 100s if not 1000s of these]

(@rsz::RepairDesign::repairNet(std::shared_ptr<rsz::BufferedNet>, sta::Pin const*, float, int, sta::Corner const*):29)

rsz::RepairDesign::repairNet(sta::Net*, sta::Pin const*, sta::Vertex*, bool, bool, bool, int, bool, int&, int&, int&, int&, int&) (@rsz::RepairDesign::repairNet(sta::Net*, sta::Pin const*, sta::Vertex*, bool, bool, bool, int, bool, int&, int&, int&, int&, int&):356)

rsz::RepairDesign::repairDesign(double, double, double, int&, int&, int&, int&, int&) (@rsz::RepairDesign::repairDesign(double, double, double, int&, int&, int&, int&, int&):195)

rsz::Resizer::findResizeSlacks() (@rsz::Resizer::findResizeSlacks():24)

gpl::TimingBase::updateGNetWeights(float) (@gpl::TimingBase::updateGNetWeights(float):18)

gpl::NesterovPlace::doNesterovPlace(int) (@gpl::NesterovPlace::doNesterovPlace(int):1262)

_wrap_replace_nesterov_place_cmd (@_wrap_replace_nesterov_place_cmd:20)

TclNRRunCallbacks (@TclNRRunCallbacks:37)

___lldb_unnamed_symbol1504 (@___lldb_unnamed_symbol1504:315)

Tcl_EvalEx (@Tcl_EvalEx:9)

Tcl_Eval (@Tcl_Eval:11)

sta::sourceTclFile(char const*, bool, bool, Tcl_Interp*) (@sta::sourceTclFile(char const*, bool, bool, Tcl_Interp*):31)

ord::tclAppInit(Tcl_Interp*) (@ord::tclAppInit(Tcl_Interp*):128)

Tcl_MainEx (@Tcl_MainEx:111)

main (@main:742)

__libc_start_call_main (@__libc_start_call_main:29)

__libc_start_main_impl (@__libc_start_main@@GLIBC_2.34:43)

_start (@_start:15)

```




### oharboe
Letting it run for a while, debug is MUCH slower than release, I see when I suspend in the debugger. There are 200000 nets to process in gen_brk_RSMT(), coeffADJ() is going through double loops for a total of 10000000 iterations...

![image](https://user-images.githubusercontent.com/2798822/229814542-0e59488f-6f61-46ca-9219-fe4cea5fb085.png)


```

grt::FastRouteCore::getEdgeCapacity(grt::FrNet*, int, int, grt::EdgeDirection) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/grt/src/fastroute/src/FastRoute.cpp:592)

grt::FastRouteCore::coeffADJ(int) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/grt/src/fastroute/src/RSMT.cpp:616)

grt::FastRouteCore::gen_brk_RSMT(bool, bool, bool, bool, bool) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/grt/src/fastroute/src/RSMT.cpp:662)

grt::FastRouteCore::run() (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/grt/src/fastroute/src/FastRoute.cpp:766)

grt::GlobalRouter::findRouting(std::vector<grt::Net*, std::allocator<grt::Net*>>&, int, int) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/grt/src/GlobalRouter.cpp:397)

grt::GlobalRouter::globalRoute(bool) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/grt/src/GlobalRouter.cpp:285)

gpl::RouteBase::getGlobalRouterResult() (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/gpl/src/routeBase.cpp:378)

gpl::RouteBase::routability() (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/gpl/src/routeBase.cpp:566)

gpl::NesterovPlace::doNesterovPlace(int) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/gpl/src/nesterovPlace.cpp:699)

gpl::Replace::doNesterovPlace(int) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/gpl/src/replace.cpp:343)

replace_nesterov_place_cmd() (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/build/src/gpl/CMakeFiles/gpl.dir/replaceTCL_wrap.cxx:1740)

::_wrap_replace_nesterov_place_cmd(ClientData, Tcl_Interp *, int, Tcl_Obj *const *) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/build/src/gpl/CMakeFiles/gpl.dir/replaceTCL_wrap.cxx:2190)

TclNRRunCallbacks (@TclNRRunCallbacks:37)

___lldb_unnamed_symbol1504 (@___lldb_unnamed_symbol1504:315)

Tcl_EvalEx (@Tcl_EvalEx:9)

Tcl_Eval (@Tcl_Eval:11)

sta::sourceTclFile(char const*, bool, bool, Tcl_Interp*) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/sta/app/StaMain.cc:95)

::tclAppInit(int &, char **, const char *, Tcl_Interp *) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/Main.cc:412)

ord::tclAppInit(Tcl_Interp*) (/home/oyvind/ascenium/OpenROAD-flow-scripts/tools/OpenROAD/src/Main.cc:440)

Tcl_MainEx (@Tcl_MainEx:111)

```

![image](https://user-images.githubusercontent.com/2798822/229812113-27d8013b-9fbc-4727-93ee-18fed95d3702.png)



### maliberty
You could try disabling each of these in turn to localize the cause
```

if {$::env(GPL_ROUTABILITY_DRIVEN)} {

    append global_placement_args " -routability_driven"

}

if {$::env(GPL_TIMING_DRIVEN)} {

    append global_placement_args " -timing_driven"

}

```
The stacks in rsz/sta are related to timing_driven.  If you see a stack in grt that is related to routability_driven.