Page 1 of 1

Out of memory error

Posted: Mon Jun 28, 2010 8:34 am
by moecurtin
I sometimes get the following error message when I'm running CMC:

java.lang.OutOfMemoryError: Java heap space

Is there anything I can do to stop this from happening?

Thanks

RE: Out of memory error

Posted: Mon Jun 28, 2010 9:55 am
by aymanh
Hi Moe,

Due to very fine sampling while running CMC, this can happen. One solution is to increase the heap-size used by the GUI (which I can explain if you're interested), but another possible solution that reduces the memory requirements significantly is to run CMC from the command line (as in cmc -S setup_file.xml).

Please check the user guide for details if you haven't done that before and let us know if you have any questions.

Good luck,
-Ayman

RE: Out of memory error

Posted: Mon Jun 28, 2010 11:53 am
by bazirker
I get heap memory errors regularly when using the plot tools (I use it to export data sometimes and make very large plots). I would be very interested to know how to increase the heap size used by the GUI.

RE: Out of memory error

Posted: Mon Jun 28, 2010 1:15 pm
by aymanh
Hi Chris,

In the file etc/opensim.conf you can modify the command line options given on the line:
default_options="-J-Xms24m -J-Xmx64m ...."

Try changing this line to
default_options="-J-Xms48m -J-Xmx128m ...."

or something similar depending on your machine.

-Ayman

RE: Out of memory error

Posted: Wed Jun 30, 2010 8:50 am
by moecurtin
Thanks a million Ayman!

Re: Out of memory error

Posted: Fri Aug 17, 2012 4:38 am
by stefan83
Dear Ayman,

I also get the same "out of memory error" when I run IK with the GUI. Are the changes of the opensim.conf affecting the IK running the GUI or from the command line? Could you tell a bit more about the heap size? What is it's maximum value?
You mentioned fine sampling rates could cause this problem. I'm using a sampling rate of 50 Hz over 4000 seconds (200000 samples). After 7% of processing the simulation I get this error. Is there a limited length of the TRC-file or a critical sampling rate?
I would be greatful to receive an answer.

Thanks -Stefan