The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.57k stars 551 forks source link

Improve reporting detail of: Error: detail_place.tcl, 31 domain error: argument not in valid range #3260

Open oharboe opened 1 year ago

oharboe commented 1 year ago

Description

This problem appears to originate inside STA, but I have very little to go on to track down the error. I think it is a problem in my design, but I'm not able to find out where to set a breakpoint in OpenROAD to study it in more detail.

==========================================================================
detailed place report_check_types -max_slew -max_cap -max_fanout -violators
--------------------------------------------------------------------------
Error: detail_place.tcl, 31 domain error: argument not in valid range
Command exited with non-zero status 1
Elapsed time: 0:12.08[h:]min:sec. CPU time: user 11.57 sys 0.50 (99%). Peak memory: 1832188KB.
make: *** [/home/oyvind/OpenROAD-flow-scripts/flow/Makefile:526: results/asap7/FooBar/base/3_5_place_dp.odb] Error 1

Suggested Solution

Some more clues in the error message so that it will be easier to set a breakpoint in the debugger to find out what is going on.

Additional Context

No response

maliberty commented 1 year ago

I'm confused as I don't see anything in OR/ORFS that generates such a message. Assuming it is throwing an exception you can do 'catch throw' in gdb to stop when an exception is thrown.

QuantamHD commented 1 year ago

The error comes from TCL.

test expr-22.5 {non-numeric floats} {
    list [catch {expr NaN} msg] $msg
} {1 {domain error: argument not in valid range}}
void
TclExprFloatError(
    Tcl_Interp *interp,     /* Where to store error message. */
    double value)       /* Value returned after error; used to
                 * distinguish underflows from overflows. */
{
    const char *s;

    if ((errno == EDOM) || TclIsNaN(value)) {
    s = "domain error: argument not in valid range";
    Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1));
    Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", s, NULL);
    } else if ((errno == ERANGE) || TclIsInfinite(value)) {

It's related to various tcl number parsing issues, or out of domain functions.

Not that familiar with ORFS, but if this is the TCL code in your script, it looks in correct.

detailed place report_check_types -max_slew -max_cap -max_fanout -violators

Should be

detailed_placement
report_check_types -max_slew -max_cap -max_fanout -violators
oharboe commented 1 year ago

@QuantamHD image

The failure occurs in line 108 below:

image

==========================================================================
detailed place report_check_types -max_slew -max_cap -max_fanout -violators
--------------------------------------------------------------------------
xxx 1
xxx 2
ttt 1b
Error: detail_place.tcl, 31 domain error: argument not in valid range
Command exited with non-zero status 1
QuantamHD commented 1 year ago

I guess the question is if check_max_slew_limit is NaN

vijayank88 commented 1 year ago

@oharboe Is make detail_place_issue creating reproducible test case?

oharboe commented 1 year ago

@oharboe Is make detail_place_issue creating reproducible test case?

Yes, but not one that I can share. Moreover deltaDebug.py doesnt whittle down the lib and lef files for macros, which makes it trickier.

oharboe commented 1 year ago

@maliberty Shared a testcase privately with you.