New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verilator crashes throwing std::bad_alloc exception #750
Comments
Original Redmine Comment
|
Original Redmine Comment It's unrolling some loop. Maybe it needs more than 4GB. Or maybe the unroll count is set too high, or there's a bug, but the code will be needed to say. Run with --debug and in the .tree file search for the "nodep" value that is printed in the backtrace. That'll show {f###} where f is a letter corresponding to the filename and ### is the line number. |
Original Redmine Comment Do you mean cells.tree? nodep=0x6c6eebf0 is mentioned there but I do not see filename or line number.
|
Original Redmine Comment You didn't say if running with more memory fixed it. That's the first thing to do. Otherwise, see the "debuging" chapter of internals.txt. It's line 144 of file bkk which is many files into your design. It looks like it doesn't print the filenumbers unless it doesn't crash, so to get that, run with --gdb, then at the prompt do: p nodep->dumpGdb() |
Original Redmine Comment I think I figure out what file corresponds to "bkk". Here is code around line 144:
I do not have machine with more than 4G at the momement. Is it known that Verilator is hungry for memory? What memory is required to build OpenRISC? |
Original Redmine Comment Many designs take more than 4GB; generally the assumption is there are huge memory machines available for synthesis etc anyways so it's not a big deal. It's a little surprising it's out of memory relatively early in the process, but given it is a generate loop it is a lot less likely a bug and there's also not much you can do to get around it as generates have to be unrolled. You could try changing the loop bound to just 2 and make sure it makes additional progress. I have no idea if OpenRISC has been done before, but other groups at Sun have used it. |
Original Redmine Comment I will try to build verilator on my 16G workstation and see how it goes. But I hoped that at least Verilator compiler is not that crazy about memory; that could save some resources when many tests are compiled and run on a grid. |
Original Redmine Comment Did not re-test yet. But going to close ticket so it does not hang around. |
Author Name: Igor Lesik
Original Redmine Issue: 750 from https://www.veripool.org
Original Date: 2014-04-24
Original Assignee: Igor Lesik
I am trying to compile a big project with Verilator on 4 cores 4G ram machine. Seems that Verilator slowly eats all available memory and then crashes when "new" can't allocate more memory.
The text was updated successfully, but these errors were encountered: