necrolyte2 / beast-mcmc

Automatically exported from code.google.com/p/beast-mcmc
0 stars 0 forks source link

BEASTMC3 app works. beastmc3 fails quietly. #681

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In stock 1.7.5 for Mac, testMC3.xml will run just fine when executed from the 
BEASTMC3 application.  However, running the command line version beastmc3 on 
the same testMC3.xml results in all the XML being loaded and the first three 
likelihood calculations taking place (one for each chain), but then the program 
quietly terminates.  I haven't figured out why.  I get same behavior when 
running dr.app.beast.BeastMC3 from IntelliJ with the most recent source.  Or 
when running 

java -cp beast.jar dr.app.beast.BeastMC3 testMC3.xml

If I recompile the full Mac application suite for 1.8.0pre, I can reproduce the 
issue.  The full BEASTMC3 application works to run testMC3.xml, while the 
command line program beastmc3 fails.

Original issue reported on code.google.com by trevor@bedford.io on 14 Mar 2013 at 6:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It dies around here (in MCMCMC.java):

        if (isPreBurninNeeded()) {
            int preBurnin = mcmcOptions.getCoercionDelay();
            if (preBurnin > 0) {
                MarkovChainListener burninListener = new BurninListener(preBurnin);

                chains[coldChain].addMarkovChainListener(burninListener);
                runChains(preBurnin, true);
                chains[coldChain].removeMarkovChainListener(burninListener);
                resetChains();
            }
        }

If coercion==true then it dies when it tries to initialise the BurninListener. 
If coercion==false it dies when isPreBurninNeeded is called. I don't understand 
why either.

Original comment by mdhall272 on 9 Sep 2013 at 4:27

GoogleCodeExporter commented 9 years ago
This sounds like threading issues.

Original comment by ramb...@gmail.com on 3 Oct 2013 at 7:29

GoogleCodeExporter commented 9 years ago

Original comment by ramb...@gmail.com on 3 Oct 2013 at 8:32

GoogleCodeExporter commented 9 years ago
At the end of BeastMC3, there is

        if (!window) {
            System.exit(0);
        }

If this is removed, or if a -window flag is supplied to beastmc3, it appears to 
work. 

Original comment by Graham...@gmail.com on 7 Feb 2014 at 11:59

GoogleCodeExporter commented 9 years ago
BEASTMC3 has been merged with BEAST but the System.exit(0) was there too. This 
would force an exit even if threads were running which may have been the issue. 
I have commented out this exit(0) as it wasn't needed (the main() method was 
about to return anyway).

Original comment by ramb...@gmail.com on 25 Aug 2014 at 1:38