File size: 7,769 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
135
136
137
138
139
# [WARNING STA-0139] ... 63.3687 is not a float.

Tool: OpenSTA

Subcategory: Locale issue

## Conversation

### oharboe
I get a lot of these warnings when I run `make gui_final`

This is with the latest ORFS.

What are they?

```

$ make DESIGN_CONFIG=designs/asap7/mock-array-big/Element/config.mk place

```


```

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 397, 63.3687 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 397, 79.0805 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 397, 106.935 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 397, 156.622 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 397, 248.596 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 397, 432.982 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 0.36 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 0.72 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 1.44 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 2.88 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 5.76 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 11.52 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 406, 23.04 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 415, 12.8576 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 415, 15.7364 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 415, 21.3969 is not a float.

[WARNING STA-0139] /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lib/asap7sc7p5t_AO_RVT_TT_nldm_211120.lib.gz line 415, 32.5931 is not a float.

```

### vijayank88
@oharboe 
I ran with latest commit and not able to get similar logs.

### maliberty
The report says 'make place' and 'make gui_final' which are not a compatible pair.   I can't reproduce this either even running all the way through.

### oharboe
```

rm -rf results/

make DESIGN_CONFIG=designs/asap7/mock-array-big/Element/config.mk place
make DESIGN_CONFIG=designs/asap7/mock-array-big/Element/config.mk gui_place
```



```
$ make DESIGN_CONFIG=designs/asap7/mock-array-big/Element/config.mk gui_place
[INFO][FLOW] Using platform directory ./platforms/asap7
[INFO-FLOW] ASU ASAP7 - version 2
Default PVT selection: BC
ODB_FILE=./results/asap7/mock-array-big_Element/base/3_place.odb /home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin/openroad -gui  ./scripts/gui.tcl

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

This plugin does not support propagateSizeHints()

OpenROAD v2.0-8114-gaa1f8060d 

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.

[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 0.72 is not a float.
[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 1.44 is not a float.

[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 2.88 is not a float.
[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 5.76 is not a float.

[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 11.52 is not a float.
[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 23.04 is not a float.

[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 82, 46.08 is not a float.
[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 96, 0.72 is not a float.

[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 96, 1.44 is not a float.
[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 96, 2.88 is not a float.

[WARNING STA-0139] ./platforms/asap7/lib/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz line 96, 5.76 is not a float.
```



### oharboe
@maliberty Aha! This is a locale issue. In their wisdom a hundred years ago, Norwegians decided to use "," to separate integers from fractions in floating point... So "12.34" is not a valid float in Norwegian locale, rather "12,34" is.



The evidence that this is the problem is that setting `LC_NUMERIC="en_GB.UTF-8"` fixes the problem.



In this case, the locale is decided by the format that is being parsed, it is not a human readable/writeable number.



Let's see if this works: https://github.com/Pinata-Consulting/OpenSTA/tree/lock-down-strtof-locale



Yep :-)



This also explains why we don't see this when we run from docker, only local install.

### maliberty
Brazil has the same issue.  https://github.com/The-OpenROAD-Project/OpenROAD/blob/6920ac530b6959f742e75b7f55062b1642730b14/src/Main.cc#L217  attempts to solve this.  Do none of the locales exist on your systems?

### maliberty
Would you try your strtof check along with getlocale after these various points to try to see what's going on.  I think this works in Brazil so I'm trying to understand what's different here.  @luis201420 any insights?



### maliberty
Perhaps it relates to LC_NUMERIC or another.  Can you try unsetting all LC_* but LC_ALL in your environment to see if that matters?

### oharboe
@maliberty @luis201420 With this change, I no longer get the warnings.



This is just a quick hack, I think it would be better if someone who knows what is going on and are aware of other edgecases articulates the pull request :-)



```
diff --git a/src/gui/src/gui.cpp b/src/gui/src/gui.cpp
index 355aa6842..7d79d99a3 100644
--- a/src/gui/src/gui.cpp
+++ b/src/gui/src/gui.cpp
@@ -1141,6 +1141,16 @@ int startGui(int& argc,
   }
   main_window->show();

 

+  // This avoids problems with locale setting dependent

+  // C functions like strtod (e.g. 0.5 vs 0,5).

+  std::array locales = {"en_US.UTF-8", "C.UTF-8", "C"};
+  for (auto locale : locales) {
+    if (std::setlocale(LC_ALL, locale) != nullptr) {

+      break;

+    }

+  }

+

+

   gui->setLogger(open_road->getLogger());
 
   main_window->setDatabase(open_road->getDb());
```



### maliberty
@luis201420 will you look at this since you can reproduce it

### oharboe
I guess this has been identified as a bug in OpenROAD, given that there are frameworks that set the locale after OpenROAD has set the locale.