<#2003 Incorrect number of repair_antennas iterati...
# openlane-development
g
#2003 Incorrect number of repair_antennas iterations - remove repair_antennas call from grt.tcl Issue created by jacobhaehn Description I have been trying to remedy antenna issues in a large design with many macros. I have been having issues similar to #1970, where the process gets killed after running out of memory. I can normally get through about 7-9 total repair_antenna iterations before the crash (looking at global.log), reducing antenna violations from 1431 to about 30, but always gets stuck on the last few (or maybe it's keeping previous iterations in memory and eventually runs out?). I have been trying to avoid a crash by reducing GRT_ANT_ITERS. However, since the repair_antenna flow was reworked in #1968, repair_antennas.tcl calls repair_antennas 3 times, each with GRT_ANT_ITERS: once in grt.tcl, once within itself, and then again in grt.tcl. For example, if I have GRT_ANT_ITERS=3, then it actually ends up running 9 total iterations (3, 3, 2) and the process is killed because I always run out of memory around the 9th total iteration. If I have GRT_ANT_ITERS=5, it still runs 9 total iterations, but 5 iterations of the first pass, then 3 on the second pass before crashing on the 9th total iteration. I suggest removing the repair_antennas call from grt.tcl so that repair_antennas is only called once from repair_antennas.tcl itself, making the true number of antenna repair iterations equal to GRT_ANT_ITERS. Additionally, let me know if you have any suggestions or fixes to prevent the crash in the first place. Expected Behavior GRT_ANT_ITERS should be the true total number of repair_antenna iterations. Environment report
Copy code
Kernel: Linux v6.2.0-26-generic
Distribution: ubuntu 22.04
Python: v3.10.12 (OK)
Container Engine: docker v24.0.4 (OK)
OpenLane Git Version: 5215ea7cc01e5311086e995905492f0e8fe1ceb6
pip: INSTALLED
python-venv: INSTALLED
---
PDK Version Verification Status: OK
---
Git Log (Last 3 Commits)

5215ea7c 2023-09-20T15:53:26+03:00 Update `open_pdks` (#1992) - Mohamed Gaber -  (HEAD -> master, origin/master, origin/HEAD)
7e5a2e9f 2023-09-10T19:06:55+03:00 fix synthesis `chparam` issue (#1981) - Kareem Farid -  (tag: 2023.09.11)
0e8827eb 2023-09-10T19:04:45+03:00 `run_sta`: fix `-blackbox_check` not running when `-multi_corner` is not set (#1980) - Kareem Farid -  ()
---
Git Remotes

origin	<https://github.com/The-OpenROAD-Project/OpenLane> (fetch)
origin	<https://github.com/The-OpenROAD-Project/OpenLane> (push)
Reproduction material issue_reproducible.zip Relevant log output ``` 21-global.log for GRT_ANT_ITERS=3: (NOTE: I have removed warnings about nets requiring more than 10 diodes per gate for clarity) OpenROAD 0a6d0fd469bc674417036342994520ee2e0a2727 This program is licensed under the BSD-3 license. See the LICENSE file for details. Components of this program may be licensed under more restrictive licenses which must be honored. [INFO]: Reading ODB at '/home/george/Documents/batfive/designs/batfive/openlane_src/runs/RUN_2023.09.21_21.51.24/tmp/routing/./19-diodes_legalized.odb'… define_corners Typical read_liberty -corner Typical /home/george/.volare/sky130A/libs.ref/sky130_fd_sc_hd/lib/sky130_fd_sc_hd__tt_025C_1v80.lib Using 1e-12 for capacitance... Using 1e+03 for resistance... Using 1e-09 for time... Using 1e+00 for voltage... Using 1e-03 for current... Using 1e-09 for power... Using 1e-06 for distance... Reading design constraints file at '/openlane/scripts/base.sdc'… [INFO]: Setting output delay to: 15.0 [INFO]: Setting input delay to: 15.0 [INFO]: Setting load to: 0.033442 [INFO]: Setting clock uncertainty to: 0.25 [INFO]: Setting clock transition to: 0.15 [INFO]: Setting timing derate to: 5.0 % [INFO]: Setting signal min routing layer to: met1 and clock min routing layer to met1. [INFO]: Setting signal max routing layer to: met5 and clock max routing layer to met5. -congestion_iterations 50 -verbose -congestion_report_file /home/george/Documents/batfive/designs/batfive/openlane_src/runs/RUN_2023.09.21_21.51.24/tmp/routing/groute-congestion.rpt [INFO GRT-0020] Min routing layer: met1 [INFO GRT-0021] Max routing layer: met5 [INFO GRT-0022] Global adjustment: 30% [INFO GRT-0023] Grid origin: (0, 0) [INFO GRT-0043] No OR_DEFAULT vias defined. [INFO GRT-0088] Layer li1 Track-Pitch = 0.4600 line-2-Via Pitch: 0.3400 [INFO GRT-0088] Layer met1 Track-Pitch = 0.3400 line-2-Via Pitch: 0.3400 [INFO GRT-0088] Layer met2 Track-Pitch = 0.4600 line-2-Via Pitch: 0.3500 [INFO GRT-0088] Layer met3 Track-Pitch = 0.6800 line-2-Via Pitch: 0.6150 [INFO GRT-0088] Layer met4 Track-Pitch = 0.9200 line-2-Via Pitch: 1.0400 [INFO GRT-0088] Layer met5 Track-Pitch = 3.4000 line-2-Via Pitch: 3.1100 [INFO GRT-0019] Found 12385 clock nets. [INFO GRT-0001] Minimum degree: 2 [INFO GRT-0002] Maximum degree: 69 [INFO GRT-0003] Macros: 128 [INFO GRT-0004] Blockages: 878373 [INFO GRT-0053] Routing resources analysis: Routing Original Derated Resource Layer Direction Resources Resources Reduction (%) --------------------------------------------------------------- li1 Vertical 0 0 0.00% met1 Horizontal 41992020 8258718 80.33% met2 Vertical 31494015 8115807 74.23% met3 Horizontal 20996010 12149889 42.13% met4 Vertical 12597606 8029790 36.26% met5 Horizontal 4199202 2022856 51.83% --------------------------------------------------------------- [INFO GRT-0101] Running extra iterations to remove overflow. [INFO GRT-0197] Via related to pin nodes: 1651810 [INFO GRT-0198] Via related Steiner nodes: 62621 [INFO GRT-0199] Via filling finished. [INFO GRT-0111] Final number of vias: 1964780 [INFO GRT-0112] Final usage 3D: 11718913 [INFO GRT-0096] Final congestion report: Layer Resource Demand Usage (%) Max H / Max V / Total Overflow --------------------------------------------------------------------------------------- li1 0 0 0.00% 0 / 0 / 0 met1 8258718 2183050 26.43% 0 / 0 / 0 met2 8115807 2109692 25.99% 0 / 0 / 0 met3 12149889 513788 4.23% 0 / 0 / 0 met4 8029790 917197 11.42% 0 / 0 / 0 met5 2022856 100846 4.99% 0 / 0 / 0 --------------------------------------------------------------------------------------- Total 38577060 5824573 15.10% 0 / 0 / 0 [INFO GRT-0018] Total wirelength: 47897509 um [INFO GRT-0014] Routed nets: 315818 [INFO GRT-0006] Repairing antennas, iteration 1. [INFO GRT-0043] No OR_DEFAULT vias defined. [INFO GRT-0012] Found 1431 antenna violations. [INFO GRT-0015] Inserted 11969 diodes. [INFO GRT-0054] Using detailed placer to place 1115 diodes. [INFO GRT-0009] rerouting 218447 nets. [INFO GRT-0001] Minimum degree: 2 [INFO GRT-0002] Maximum degree: 71 [INFO GRT-0006] Repairing antennas, iteration 2. [INFO GRT-0043] No OR_DEFAULT vias defined. [INFO GRT-0012] Found 552 antenna violations. [INFO GRT-0015] Inserted 3492 diodes. [INFO GRT-0054] Using detailed placer to place 268 diodes. [INFO GRT-0009] rerouting 3890 nets. [INFO GRT-0001] Minimum degree: 2 [INFO GRT-0002] Maximum degree: 73 [INFO GRT-0006] Repairing antennas, iteration 3. [INFO GRT-0043] No OR_DEFAULT vias defined. [INFO GRT-0012] Found 136 antenna violations. [INFO GRT-0015] Inserted 1013 diodes. [INFO GRT-0054] Using detailed placer to place 196 diodes. [INFO GRT-0009] rerouting 741 nets. [INFO GRT-0001] Minimum degree: 2 [INFO GRT-0002] Maximum degree: 75 [INFO GRT-0006] Repairing antennas, iteration 1. [INFO GRT-0043] No OR_DEF… The-OpenROAD-Project/OpenLane