# Where does "Error: tdms_place.tcl, 35 cannot create std::vector larger than max_size()" Tool: Global Placement Subcategory: Memory allocation error ## Conversation ### oharboe I want to debug it, but I searched the code and couldn't find this error message in the source. ``` [INFO GPL-0003] SiteSize: 54 270 [INFO GPL-0004] CoreAreaLxLy: 2160 2160 [INFO GPL-0005] CoreAreaUxUy: 25922160 25922160 Error: tdms_place.tcl, 35 cannot create std::vector larger than max_size() Command exited with non-zero status 1 ``` ### maliberty My guess is this is an STL exception and not in the OR code. In gdb try 'catch throw' to see when it is being thrown. ### oharboe This is odd... 48000*96000 = 4608000000. Ah. overflow. ![image](https://github.com/The-OpenROAD-Project/OpenROAD/assets/2798822/ca384a53-04da-42fd-9039-014b3bdd89f9) ![image](https://github.com/The-OpenROAD-Project/OpenROAD/assets/2798822/a0156546-48aa-4c6c-84a1-ee9b89647226) ``` D$ git diff diff --git a/src/gpl/src/placerBase.cpp b/src/gpl/src/placerBase.cpp index 30ff82771..4f2c10b4e 100644 --- a/src/gpl/src/placerBase.cpp +++ b/src/gpl/src/placerBase.cpp @@ -1002,8 +1002,8 @@ void PlacerBase::initInstsForUnusableSites() { dbSet rows = db_->getChip()->getBlock()->getRows(); - int siteCountX = (die_.coreUx() - die_.coreLx()) / siteSizeX_; - int siteCountY = (die_.coreUy() - die_.coreLy()) / siteSizeY_; + long siteCountX = (die_.coreUx() - die_.coreLx()) / siteSizeX_; + long siteCountY = (die_.coreUy() - die_.coreLy()) / siteSizeY_; enum PlaceInfo { ``` gives me: ``` [INFO GPL-0002] DBU: 1000 [INFO GPL-0003] SiteSize: 54 270 [INFO GPL-0004] CoreAreaLxLy: 2160 2160 [INFO GPL-0005] CoreAreaUxUy: 25922160 25922160 Error: out of memory. ```