OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

ORFS is using `report_cell_usage` which my OpenROAD is missing

Open hpretl opened this issue 1 year ago • 7 comments

Describe the bug

As stated above, the ORFS final_report.tcl is using report_cell_usage, but my build of OR does not have this command. What am I doing wrong?

Expected Behavior

Either the command report_cell_usage should not be used, or it should be available in OR.

Environment

Git commit: 391c9dfb8906659b9cc782fafd3a3835a069ca06
kernel: Linux 6.6.22-linuxkit
os: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
cmake version 3.22.1
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OpenROAD version: v2.0-13379-g391c9dfb8
-- System name: Linux
-- Compiler: GNU 11.4.0
-- Build type: RELEASE
-- Install prefix: /usr/local
-- C++ Standard: 17
-- C++ Standard Required: ON
-- C++ Extensions: OFF
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test C_COMPILER_SUPPORTS__-Wall
-- Performing Test C_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-foCMake Warning at src/CMakeLists.txt:245 (message):
  spdlog: SPDLOG_FMT_EXTERNAL=ON


rmat
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test C_COMPILER_SUPPORTS__-x
-- Performing Test C_COMPILER_SUPPORTS__-x - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-x
-- Performing Test CXX_COMPILER_SUPPORTS__-x - Failed
-- Performing Test C_COMPILER_SUPPORTS__c++
-- Performing Test C_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__c++
-- Performing Test CXX_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17 - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17 - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- TCL library: /usr/lib/aarch64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- TCL readline library: /usr/lib/aarch64-linux-gnu/libtclreadline.so
-- TCL readline header: /usr/include/aarch64-linux-gnu
-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.2", minimum required is "4.0")  
-- Found Boost: /usr/local/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0")  
-- boost: 1.82.0
-- Found Python3: /usr/include/python3.10 (found version "3.10.12") found components: Development Development.Module Development.Embed 
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11") 
-- spdlog: 1.9.2
-- Found BISON: /usr/bin/bison (found version "3.8.2") 
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.1") found components: doxygen dot 
-- STA version: 2.5.0
-- STA git sha: f8a9e1771b80899ff43189362725dff70c2ed057
-- System name: Linux
-- Compiler: GNU 11.4.0
-- Build type: RELEASE
-- Build CXX_FLAGS: -O3 -DNDEBUG
-- Install prefix: /usr/local
-- Found FLEX: /usr/bin/flex (found version "2.6.4") 
-- TCL library: /usr/lib/aarch64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- SSTA: 0
-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.2", minimum required is "3.0")  
-- STA executable: /foss/designs/openroad/src/sta/app/sta
-- Found Clp: /usr/local/lib/cmake/Clp/ClpConfig.cmake (found version "1.17.7") 
-- Found Cbc: /usr/local/lib/cmake/Cbc/CbcConfig.cmake (found version "2.10.7") 
-- Found SCIP: /usr/local/lib/cmake/scip/scip-config.cmake (found version "8.0.3") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- GPU is not enabled
-- TCL library: /usr/lib/aarch64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- GUI is enabled
-- Charts widget is not enabled
-- Found Boost: /usr/local/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0") found components: serialization 
-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS) 
-- Found Boost: /usr/local/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found suitable version "1.82.0", minimum required is "1.78")  
-- TCL library: /usr/lib/aarch64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- Found Boost: /usr/local/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0") found components: serialization system thread 
-- Found Boost: /usr/local/lib/cmake/Boost-1.82.0/BNumber of processor cores: 10
oostConfig.cmake (found version "1.82.0")  
-- Found Eigen3: /usr/share/eigen3/cmake/Eigen3Config.cmake (found version "3.4.0") 
-- TCL readline enabled
-- Tcl Extended disabled
-- Python3 enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmp.rUq28pVGL2

To Reproduce

Start OR in interactive mode, check for command report_cell_usage.

Relevant log output

No response

Screenshots

No response

Additional Context

No response

hpretl avatar Apr 25 '24 12:04 hpretl

report_cell_usage has been there since 2-19 so something odd is happening. When you start OR it will print the version, eg OpenROAD v2.0-13370-gffc2ed058 The bit after -g is the git commit id. What are you seeing?

maliberty avatar Apr 25 '24 15:04 maliberty

image Very weird. I have no idea what could have gone wrong...

hpretl avatar Apr 25 '24 19:04 hpretl

And when I type report_cell_usage in OpenROAD, I get this: image

hpretl avatar Apr 25 '24 19:04 hpretl

OK, now I think I have the full picture. @maliberty I think there might still be something to fix here, although something different than the original case:

  • In the new OpenROAD version that I have (see above), the command report_cell_usage is indeed there, and it works normally in the ORFS.
  • When openroad is started, and no design is loaded, when calling report_cell_usage a segfault occurs. That is not ideal.
  • When openroad is run interactively, the command completion typing report_ and then tab does not show report_cell_usage (while bringing up other commands, see above), which is also not ideal, and caused my confusion in the first place.

hpretl avatar Apr 25 '24 19:04 hpretl

Sounds like 2 separate issues. report_cell_usage needs to 1) check that a design is loaded and 2) be included in the Tcl help.

rovinski avatar Apr 25 '24 21:04 rovinski

I've fixed the crash in in #5010. Fixing the auto complete looks a harder (I hate tcl). I'll see if I can find a solution for that as it affects all the sta commands. Apparently tclreadline doesn't understand 'namespace import'

maliberty avatar Apr 28 '24 02:04 maliberty

@maliberty BTW, I found meanwhile another OR command that segfaulted when no design is loaded. Unfortunately, I forgot which one. Maybe all commands should be tested for running directly after OR start w/lo loading a design, that they exit gracefully instead of segfaulting. Could/should be added to the regression suit, I guess.

hpretl avatar May 01 '24 12:05 hpretl

Good idea, I'll add one (and I suspect fix a lot of issues).

maliberty avatar May 01 '24 16:05 maliberty

The hall of shame

  cluster_flops
  check_placement
  repair_antennas
  triton_part_design
  optimize_mirroring
  evaluate_part_design_solution
  place_endcaps
  highlight_path
  remove_fillers
  check_antennas
  global_placement_debug
  improve_placement
  pdngen
  insert_dft
  set_driving_cell
  tapcell
  tapcell_ripup
  preview_dft
  define_corners

maliberty avatar May 01 '24 17:05 maliberty

Oh yes, the repair_antennas was the one I found :-)

hpretl avatar May 01 '24 19:05 hpretl

#5032 adds the test but doesn't actually fix the problem yet. The 'skip' list there needs to be reduced down to just 'exit' (which shouldn't be tested).

maliberty avatar May 02 '24 16:05 maliberty

@arthurjolo please take care of fixing up the commands.

maliberty avatar May 02 '24 16:05 maliberty

Sure, will fix them.

arthurjolo avatar May 02 '24 17:05 arthurjolo

All are fixed except define_corners which will require an sta fix/update cycle.

maliberty avatar May 02 '24 21:05 maliberty