Impossible to load or save big files in BEAUti

276 views
Skip to first unread message

Adrien Boniface

unread,
May 22, 2018, 2:41:44 PM5/22/18
to beast-users
Hello all,
I am a new user of BEAST so maybe (I hope) my problems are just due to my lack of practice with the tool.
I am trying to load some pretty big files (up to 2Go) in BEAUti in order to then use BEAST, but I am unable to load and/or save test files of more than 300Mo.

I am actually not even able to load files bigger than 120Mo, but I managed to work my way around it by loading several 100Mo files and then saving them together.
But once it gets bigger than 300Mo, the BEAUti window will freeze when I hit the "save" (or "save as") button, and the terminal window shows this:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3332)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:472)
    at java.lang.StringBuffer.append(StringBuffer.java:310)
    at java.lang.StringBuffer.append(StringBuffer.java:97)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:486)
    at java.lang.StringBuffer.append(StringBuffer.java:338)
    at java.util.regex.Matcher.appendReplacement(Matcher.java:890)
    at java.util.regex.Matcher.replaceAll(Matcher.java:955)
    at java.lang.String.replaceAll(String.java:2223)
    at beast.util.XMLProducer.toXML(Unknown Source)
    at beast.app.beauti.BeautiDoc.toXML(Unknown Source)
    at beast.app.beauti.BeautiDoc.validateModel(Unknown Source)
    at beast.app.beauti.Beauti$ActionSave.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2237)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2295)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)


I don't know how to interprete all of those messages, can someone please help me ?
I am on a shared Linux machine.

Thanks in advance for any help !

Adrien

Andrés Parada

unread,
May 22, 2018, 3:15:28 PM5/22/18
to beast...@googlegroups.com
Hi, you can edit the beauti file in the bin folder to give it more memory

in this line $JAVA -Dlauncher.wait.for.exit=true -Xms256m -Xmx4g -Djava.library.path="$BEAST_LIB" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.app.beauti.BeautiLauncher -capture $*

you can increase -Xmx4g  to as much memory as you have, 8g will give 4 Gb of RAM


Cheers

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.
--

Postdoctoral Associate

Instituto de Cs Ambientales y Evolutivas
Universidad Austral de Chile
Campus Isla Teja s/n
Valdivia, Chile

Adrien Boniface

unread,
May 23, 2018, 5:28:10 AM5/23/18
to beast-users
Hi,

Thanks very much for answering so quickly.

I edited the beauti file to finally have the line as follows:
$JAVA -Dlauncher.wait.for.exit=true -Xms256m -Xmx16g -Djava.library.path="$BEAST_LIB" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.app.beauti.BeautiLauncher -capture $*

but when trying to load a 500Mo file it still doesn't work and shows this error:

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at java.util.Collections$UnmodifiableCollection$1.<init>(Collections.java:1039)
at java.util.Collections$UnmodifiableCollection.iterator(Collections.java:1038)
at beast.evolution.tree.Tree.listNodes(Unknown Source)
(the last line is repeated 1022 times)

Am I missing something?
Thanks in advance,

Adrien

Remco Bouckaert

unread,
May 27, 2018, 3:38:03 PM5/27/18
to beast...@googlegroups.com
Hi Adrien,

It looks like you are running out of stack-space, which you can fix by increasing the value for the -Xms option. However, I think you are a bit too optimistic about the capabilities of BEAST, which at the moment can handle perhaps a few thousand taxa, but I have not seen any analysis that handles tens of thousands.

Cheers,

Remco

Adrien Boniface

unread,
May 28, 2018, 4:56:27 AM5/28/18
to beast-users
Hi Remco,

Thank you for your answer, I will try changing the -Xms option.

However, I think you are a bit too optimistic about the capabilities of BEAST
 
I was fearing this would be a reason why I was not able of doing what I wanted.
Would you know of any tool that would be designed for handling this number of taxa ? Or I guess I'll have to limit my enthusiasm and select a representative subset of taxa.

Thanks for your help,

Adrien

Adrien Boniface

unread,
May 28, 2018, 11:20:02 AM5/28/18
to beast-users
Hi again,

I did not find how to edit my previous post, but I realized it might be helpful for others to see the whole output given by beauti when trying to load my 400Mo file, so you'll find it attached (only with few modifications to preserve privacy and security).

I also tried to change the -Xms option to -Xms32g, but the outcome remains identical.

Cheers,
Adrien
BEAUti_loading_error.txt
Reply all
Reply to author
Forward
0 new messages