problem in execute MC3 in BEAST 2

146 views
Skip to first unread message

Bing-Hong Huang

unread,
May 16, 2017, 11:06:02 AM5/16/17
to beast-users
Dear experts,

I have followed the instruction of  this website and make the input with beauti to run METROPOLIS COUPLED MCMC
https://www.beast2.org/2016/09/27/metropolis-coupled-mcmcmc3-works/
and installed the packages BEASTlab in Beauti (ver 2.4.6)

However, I got this error messages

Error 110 parsing the xml input file

validate and intialize error: java.io.FileNotFoundException: \tmp\MCMCMC.xml (系統找不到指定的路徑。)

Error detected about here:
  <beast>
      <run id='mcmc' spec='beast.inference.MCMCMC'>

java.lang.RuntimeException: java.io.FileNotFoundException: \tmp\MCMCMC.xml (系統找不到指定的路徑。)
at beast.inference.MCMCMC.initAndValidate(Unknown Source)
at beast.util.XMLParser.initBEASTObjects(Unknown Source)
at beast.util.XMLParser.parse(Unknown Source)
at beast.util.XMLParser.parseFile(Unknown Source)
at beast.app.BeastMCMC.parseArgs(Unknown Source)
at beast.app.beastapp.BeastMain.main(Unknown Source)
at beast.app.beastapp.BeastLauncher.main(Unknown Source)
Caused by: java.io.FileNotFoundException: \tmp\MCMCMC.xml (系統找不到指定的路徑。)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at java.io.FileWriter.<init>(FileWriter.java:90)
... 7 more


Would any one know how to solve these problems?
100-mc3-4.xml

Remco Bouckaert

unread,
May 16, 2017, 7:43:24 PM5/16/17
to beast...@googlegroups.com
The MCMCMC class tries to write a temporary file in folder \tmp\, but that may not exists on your computer. 
One way to fix the problem is to create that folder.

Another way is to upgrade to BEASLabs v1.7.1, which allows you to specify the temporary folder by adding a tempDir attribute in which you can specify the folder where temporary files can be written. For example, to write in the “/temp” folder instead of "/tmp”, you could edit the XML like so:

<run id='mcmc' spec=‘beast.inference.MCMCMC’ tempDir=“/temp/“>

Cheers, Remco

--
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.
<100-mc3-4.xml>

Bing-Hong Huang

unread,
May 16, 2017, 11:27:11 PM5/16/17
to beast-users
Dear Remco Bouckaert

Thank you for kindly reply.
I have tried the second option for my case.
(PS1  My os is windows 7, and I do not have path "\tmp\" (it seems to me that the path here is for Linux?)
(PS2 The version of BEAST I ran was 2.4.6)

The beast 2.4.6 do not recognize the attribute "tempDir".
It always returns this messages:
This BEASTInterface (mcmc) has no input with name tempDir. Choose one of these inputs: chains,resampleEvery,heatedMCMCClass,chainLength,state,init,storeEvery,preBurnin,numInitializationAttempts,distribution,operator,logger,sampleFromPrior,operatorschedule



Would there be any resolution for BEAST 2?



Remco Bouckaert於 2017年5月17日星期三 UTC+8上午7時43分24秒寫道:

Remco Bouckaert

unread,
May 17, 2017, 3:41:32 PM5/17/17
to beast...@googlegroups.com
MCMC has indeed no tempDir input, because MCMC  should not need to write any temporary files.
MCMCMC does have a tempDir input (if you install BEASLabs v1.7.1).

For MCMC, you should not add a tempDir attribute, but for MCMCMC you could if there is not /tmp/ folder available.

Cheers,

Remco
Reply all
Reply to author
Forward
0 new messages