TreeAnnotator error : java.lang.OutofMemoryError: Java heap space

993 views
Skip to first unread message

Vijay

unread,
Nov 14, 2006, 11:52:52 PM11/14/06
to beast-users
Dear Dr. Rambaut,


I am trying to summarise/annotate 100,000 trees using the program
TreeAnnotator v1.4. The application fails to launch with the following
error " java.lang.OutofMemoryError: Java heap space". I have generated
the trees in a single run using BEAST v1.4.

Is there a way I can increase the memory for the program on my
computer or is it a bug in the program.

I tried running this on a Windows Intel Xeon 2.9 Ghz 3MB and a Power
Mac G5 Quad 2.5 Ghz 6GB RAM, but I get the same error.

I would be grateful for any help provided.

Thanking you,
Vijay

Alexei Drummond

unread,
Nov 15, 2006, 5:15:57 PM11/15/06
to beast...@googlegroups.com
Hi Vijay,

Is there a particular reason you want to summarize such a large number
of trees? I generally find that 10,000 trees is more than sufficient
for most purposes. You may want to just adjust the logging frequency
of your MCMC chain so that you only write 10,000 trees instead 100,000
trees.

However, if you really want to summarize that many tree then you can
try to increase the amount of memory available to Java. You will have
to run the program via the command line using the following command:

java -Xmx1024m -Xms1024m -classpath beast.jar dr.app.tools.TreeAnnotator

The -Xmx and -Xms commands determine the maximum and starting amount
of memory that java is provided.

You will be able to find the beast.jar (on a Mac) by right-clicking
the TreeAnnotator v.1.4 and choosing Show Package Contents then
browsing to the Contents/Resources/Java/beast.jar

Vijay

unread,
Nov 18, 2006, 10:12:10 AM11/18/06
to beast-users
Dear Alexie
Thanks for the instructions. I managed to increase the memory for Java
on my mac and TreeAnnotator runs fine now.

I was in a hurry to look at the results then, so I also figured I can
resample fewer trees using LogCombiner without having to start another
run in BEAST.

Vijay

On Nov 16, 6:15 am, "Alexei Drummond" <alexei.drumm...@gmail.com>
wrote:

Gustavo Sánchez

unread,
Dec 9, 2014, 3:16:01 AM12/9/14
to beast...@googlegroups.com
Dear Alexei,
I am having the same trouble here with a pc of 8GB ram and my tree output of 4gb in Windows. I have tried to run the program via command line in order to use 6gb but this message appear:

The specified size exceed the maxium representable size.
Error: could not create the Java Virtual Machine
Error: a fatal exception has occurred. Program will exit

Could you help me to solve it?

Thank you very much
Reply all
Reply to author
Forward
0 new messages