Dumping and loading states in BEAST v1.8.4

270 views
Skip to first unread message

Nick Fountain-Jones

unread,
Oct 3, 2017, 6:42:10 PM10/3/17
to beast-users

Hello, I have been running BEAST v1.8.4 using the option -dump_every 1000000, in order to checkpoint my analysis. The exact BEAST command is:

beast -threads 4 -seed 3141592 -beagle_CPU -dump_every 1000000 bayesian_skyline.xml


I was under the impression that I could use the option -load_dump to start a chain from the state with the dumped parameter values. However, I get the following error when trying -load_dump:

# BEAST v1.8.4

# Generated Tue Oct 03 11:40:59 CDT 2017 [seed=1507048858039]

# -load_dump beast_debug_2017.09.28.01.10.19 -threads 4 bayesian_skyline.xml

state Posterior Prior Likelihood rootHeight ucld.mean

Exception in thread "Thread-1" java.lang.RuntimeException: Unable to read state number from state file

at dr.inference.mcmc.DebugUtils.readStateFromFile(Unknown Source)

at dr.inference.mcmc.MCMC.chain(Unknown Source)

at dr.inference.mcmc.MCMC.run(Unknown Source)

at java.lang.Thread.run(Thread.java:745)

0.036 seconds


I assume I’m missing something in my command, but I couldn’t find any documentation on how to use dump/load. What would be the correct way to use these options? Would this be an appropriate way to resume an interrupted run in BEAST v1.8.4?


Cheers,


Nick

Andrew Rambaut

unread,
Oct 9, 2017, 5:14:58 AM10/9/17
to beast...@googlegroups.com, Nick Fountain-Jones
Hi Nick,

This feature was intended (in v1.8.4) for debugging purposes (so we can dump the state just before an error occurs and then restart from that point rather than from the beginning). In version 1.8.4 it did not work for all models. However, we are making this a feature useful for checkpointing in the next version of BEAST v1.X which hopefully be out soon (the pre-release version is always available from http://github.com/beast-dev/beast-mcmc if you are comfortable with downloading and compiling source code).

Best,
Andrew

--
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.

Andrew Rambaut

unread,
Oct 9, 2017, 5:15:09 AM10/9/17
to beast...@googlegroups.com
Hi Nick,

This feature was intended (in v1.8.4) for debugging purposes (so we can dump the state just before an error occurs and then restart from that point rather than from the beginning). In version 1.8.4 it did not work for all models. However, we are making this a feature useful for checkpointing in the next version of BEAST v1.X which hopefully be out soon (the pre-release version is always available from http://github.com/beast-dev/beast-mcmc if you are comfortable with downloading and compiling source code).

Best,
Andrew

On 3 Oct 2017, at 23:42, Nick Fountain-Jones <nfounta...@gmail.com> wrote:

Sam Hong

unread,
Oct 11, 2017, 4:16:48 PM10/11/17
to beast-users
Hello Andrew,

I was able to download and compile BEAST v1.10.0 Prerelease #VEME2017 from github, and I played around with one of the example datasets by first running

(1) beast -seed <seed> -dump_every 2000000 <xmlfile>
,

and then using

(2) beast -seed <previously used seed> -load_dump <dumped state 2000000> -dump_every 2000000 <xmlfile> .

In both cases, the runs were able to finish without any errors, but I notice that the values in state 4,000,000 from the first run are different from the ones in state 2,000,000 from the second run.

I was under the impression that these two states would have the same parameter values, assuming that all seeds and random numbers are the same in both runs.

Is this discrepancy something to be expected? Can I use this to resume an interrupted run?

Thank you!

Sam

Guy Baele

unread,
Oct 12, 2017, 9:17:09 AM10/12/17
to beast-users
Dear Sam,

This is work in progress so we are still testing certain scenarios, like the one you have mentioned here.

Best regards,
Guy


Op woensdag 11 oktober 2017 22:16:48 UTC+2 schreef Sam Hong:

Sam Hong

unread,
Oct 12, 2017, 12:55:54 PM10/12/17
to beast-users
Hi Guy,

Thank you for the reply, looking forward to the next release!

-Sam

BioinfoX

unread,
Nov 6, 2017, 2:24:53 AM11/6/17
to beast-users
Hi Andrew, 

This may not be related from what is asked previously, nevertheless, I have some question and verification about BEASTv1.8.4

So I finished installing this version of BEAST in Linux OS. I renamed all the .exe file into .jar file so it will work on me because I am using java 8 and for some reason it doesn't work (it requires java 6). When I renamed it, I was able to open it. 

I follow the tutorial of divergent rate using FPV data. I successfully created its BEAST XML file through BEAUTi as per suggested in the tutorial. Apparently, when I load it in the beast, I wasn't able to see the log file or affirm if it really does run. I don't know how to verify it. There's no resulting output file, I waited for some time but I still have no output. There's also no Log file. Please let me know if in some way, I did something wrong. Hoping to really hear from you soon. Thanks!

Andrew Rambaut

unread,
Nov 6, 2017, 6:32:35 AM11/6/17
to beast...@googlegroups.com
This is not related to the previous issue. If the files in the downloaded package are called .exe files then these are likely for Windows. To run on Linux you will need to download the Linux version of BEAST. The shell scripts are in the /bin directory and should be run from the command line to see any error messages that appear.

Best,
Andrew
Reply all
Reply to author
Forward
0 new messages