Issue 750 in beast-mcmc: -Infinity value always come out when i try to load xml

23 views
Skip to first unread message

beast...@googlecode.com

unread,
Oct 15, 2014, 6:05:48 AM10/15/14
to beas...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 750 by Quinn775...@gmail.com: -Infinity value always come out
when i try to load xml
https://code.google.com/p/beast-mcmc/issues/detail?id=750

What steps will reproduce the problem?
1 why it always offer -Infinity value when i try to beast in beagle? This
can be solved by few attempts. But i wonder how to fix it for ever. maybe
i set some wrong prior?


here is the problem, you see "-Inf"
##########################################################################
CompoundLikelihood(compoundModel)=(
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-9190.03,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-9317.2341
Total = -Infinity
)
Total = -Infinity

#######################################################################
What version of the product are you using? On what operating system?

beast 1.8 and beagle 2.1.2
##########################################################################
Please provide any additional information below.

sing discretized relaxed clock model.
over sampling = 1
parametric model = logNormalDistributionModel
rate categories = 1
Creating state frequencies model 'frequencies': Initial frequencies =
{0.25, 0.25, 0.25, 0.25}
Creating HKY substitution model. Initial kappa = 2.0
Creating site model:
4 category discrete gamma with initial shape = 0.5
initial proportion of invariant sites = 0.5
Using BEAGLE TreeLikelihood
Branch rate model used: discretizedBranchRates
Using BEAGLE resource 0: CPU
with instance flags: PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL
SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE PROCESSOR_CPU
FRAMEWORK_CPU
Ignoring ambiguities in tree likelihood.
With 56 unique site patterns.
Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Using BEAGLE TreeLikelihood
Branch rate model used: discretizedBranchRates
Using BEAGLE resource 0: CPU
with instance flags: PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL
SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE PROCESSOR_CPU
FRAMEWORK_CPU
Ignoring ambiguities in tree likelihood.
With 56 unique site patterns.
Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Using BEAGLE TreeLikelihood
Branch rate model used: discretizedBranchRates
Using BEAGLE resource 0: CPU
with instance flags: PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL
SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE PROCESSOR_CPU
FRAMEWORK_CPU
Ignoring ambiguities in tree likelihood.
With 56 unique site patterns.
Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Using BEAGLE TreeLikelihood
Branch rate model used: discretizedBranchRates
Using BEAGLE resource 0: CPU
with instance flags: PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL
SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE PROCESSOR_CPU
FRAMEWORK_CPU
Ignoring ambiguities in tree likelihood.
With 56 unique site patterns.
Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Using BEAGLE TreeLikelihood
Branch rate model used: discretizedBranchRates
Using BEAGLE resource 0: CPU
with instance flags: PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL
SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE PROCESSOR_CPU
FRAMEWORK_CPU
Ignoring ambiguities in tree likelihood.
With 56 unique site patterns.
Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Using BEAGLE TreeLikelihood
Branch rate model used: discretizedBranchRates
Using BEAGLE resource 0: CPU
with instance flags: PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL
SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE PROCESSOR_CPU
FRAMEWORK_CPU
Ignoring ambiguities in tree likelihood.
With 56 unique site patterns.
Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Creating swap operator for parameter branchRates.categories (weight=10.0)
Optimization Schedule: default
Likelihood computation is using a pool of 6 threads.
Creating the MCMC chain:
chainLength=20000000
autoOptimize=true
autoOptimize delayed for 200000 steps
Underflow calculating likelihood. Attempting a rescaling...
Underflow calculating likelihood. Attempting a rescaling...
Underflow calculating likelihood. Attempting a rescaling...
Underflow calculating likelihood. Attempting a rescaling...
Error running file: coi.xml
The initial model is invalid because state has a zero probability.

If the log likelihood of the tree is -Inf, his may be because the
initial, random tree is so large that it has an extremely bad
likelihood which is being rounded to zero.

Alternatively, it may be that the product of starting mutation rate
and tree height is extremely small or extremely large.

Finally, it may be that the initial state is incompatible with
one or more 'hard' constraints (on monophyly or bounds on parameter
values. This will result in Priors with zero probability.

The individual components of the posterior are as follows:
The initial posterior is zero:
CompoundLikelihood(compoundModel)=(
LogNormal(kappa)=-1.8654,
Uniform(frequencies)=0.0,
Exponential(alpha)=-0.3069,
Gamma(pInv)=-0.4231,
Exponential(ucld.stdev)=0.0986,
Uniform(yule.birthRate)=-230.2585,
BirthDeathGernhard08Model/yule(treeModel)=-630649.0281
Total = -630881.7832675388
),
CompoundLikelihood(compoundModel)=(
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-9190.03,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-Inf,
BeagleTreeLikelihood(treeLikelihood[treeLikelihood_6])=-9317.2341
Total = -Infinity
)
Total = -Infinity


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

beast...@googlecode.com

unread,
Dec 17, 2014, 5:14:36 AM12/17/14
to beas...@googlegroups.com
Updates:
Status: Accepted
Owner: ramb...@gmail.com
Labels: beast v1.8.1 Milestone-Release1.8.2

Comment #1 on issue 750 by ramb...@gmail.com: -Infinity value always come
This looks to be an issue with scaling when the initial tree is a random
(extremely low probability) tree. Perhaps dynamic scaling should do scaling
always for the first 1000 steps to get over this hump?

beast...@googlecode.com

unread,
Feb 17, 2015, 2:53:14 AM2/17/15
to beas...@googlegroups.com

Comment #2 on issue 750 by armanbilge: -Infinity value always come out when
Actually, I suspect that this is issue is related to multithreading. See
the issue I made today on GitHub:
https://github.com/armanbilge/BEAST3/issues/21

beast...@googlecode.com

unread,
Feb 17, 2015, 3:00:40 AM2/17/15
to beas...@googlegroups.com

Comment #3 on issue 750 by ramb...@gmail.com: -Infinity value always come
I agree this is probably due to synchronisation issues with threads. This
issue is related: https://code.google.com/p/beast-mcmc/issues/detail?id=756

Need to do a deeper examination of the threading issues - I suspect some
synchronization on most objects referenced in TreeLikelihood in the initial
traversal of the tree.

beast...@googlecode.com

unread,
Feb 17, 2015, 3:48:36 AM2/17/15
to beas...@googlegroups.com

Comment #4 on issue 750 by armanbilge: -Infinity value always come out when
Thanks for the pointer—I think that I may have found the problem.
BaseSubstitutionModel.getEigenDecomposition() has decompose() in a
synchronized block. However, the HKY and TN93 models override
getEigenDecomposition() without using synchronization. Adding synchronized
to their method signatures for getEigenDecomposition() appears to solve the
problem for me. It looks like all of the issues reported involved analyses
using HKY.

beast...@googlecode.com

unread,
Feb 17, 2015, 5:30:48 AM2/17/15
to beas...@googlegroups.com

Comment #5 on issue 750 by ramb...@gmail.com: -Infinity value always come
Thanks. I will look into this in more detail. My feeling is it is better to
build the thread synchronization at the point where these classes are
accessed (i.e., TreeLikelihood) rather than relying on all these classes
being thread safe.

beast...@googlecode.com

unread,
Mar 5, 2015, 4:23:20 AM3/5/15
to beas...@googlegroups.com

Comment #6 on issue 750 by ramb...@gmail.com: -Infinity value always come
I am struggling to replicate this by creating a new XML. Could you post an
example XML where it happens?

beast...@googlecode.com

unread,
Mar 27, 2015, 8:17:07 PM3/27/15
to beas...@googlegroups.com

Comment #7 on issue 750 by wbsi...@gmail.com: -Infinity value always come
I too am getting the "Underflow calculating likelihood. Attempting a
rescaling... " in v1.8.2 on a dual Xeon (8 core total) MacPro Snow Leop. I
chose 8 cores from the pulldown menu rather than leave at the default
of "automatic". The analyses continues to run without errors.
I have attached the xml for replication

Attachments:
Acantho_BeastMar11run1.xml 54.8 KB

beast...@googlecode.com

unread,
Mar 27, 2015, 8:26:54 PM3/27/15
to beas...@googlegroups.com

Comment #8 on issue 750 by ramb...@gmail.com: -Infinity value always come
"Underflow calculating likelihood. Attempting a rescaling... ": These
messages don't mean anything is wrong. This is not related the issue above.
Reply all
Reply to author
Forward
0 new messages