ucb-bar / chisel2-deprecated

chisel.eecs.berkeley.edu
387 stars 89 forks source link

JVM out of memory when running sbt for rocket-chip #412

Open richardarase opened 9 years ago

richardarase commented 9 years ago

richard@richard-HP-ENVY-15-Notebook-PC:~/Rocket/rocket-chip$ cd emulator richard@richard-HP-ENVY-15-Notebook-PC:~/Rocket/rocket-chip/emulator$ make debug cd /home/richard/Rocket/rocket-chip && java -Xmx2048M -Xss8M -XX:MaxPermSize=128M -jar sbt-launch.jar "project rocketchip" "elaborate Top --noIoDebug --backend c --configInstance rocketchip.DefaultCPPConfig --targetDir emulator/generated-src-debug --debug --vcd --ioDebug" sbt appears to be exiting abnormally. The log file for this session is at /tmp/sbt8961713207461919529.log java.lang.OutOfMemoryError: Java heap space Error during sbt execution: java.lang.OutOfMemoryError: Java heap space make: *\ [generated-src-debug/Top.DefaultCPPConfig.h] Error 1

ben-k commented 9 years ago

The typical fix to this is to increase the maximum heap size allocated to Java, e.g. by changing the argument to -Xmx4G. You can make this change in the top-level Makefrag.

That said, 2GB is usually enough for this, so perhaps something else is going on.

sdtwigg commented 9 years ago

Do you have the same issue for non-debug compilations?

Debug mode does increase the build complexity slightly (although usually moreso in compilation time, not required memory)

ccelio commented 9 years ago

Jim has an incoming fix that should help greatly (by not spitting out two copies of the .cpp files).

richardarase commented 9 years ago

Yes, the same issue for non debug compilation.

Richard

On May 10, 2015, at 2:05 AM, Stephen Twigg notifications@github.com wrote:

Do you have the same issue for non-debug compilations?

Debug mode does increase the build complexity slightly (although usually moreso in compilation time, not required memory)

— Reply to this email directly or view it on GitHub https://github.com/ucb-bar/chisel/issues/412#issuecomment-100607263.