resetting lnL

228 views
Skip to first unread message

Pascal Title

unread,
Jul 14, 2020, 3:55:19 PM7/14/20
to PAML discussion group
I'm running mcmctree on my university's HPC.
But these jobs are aborting, with the final text printed to the screen being "Resetting lnL". This always seems to happen in the fine-tuning stage.

These jobs probably take a week to run, and I haven't yet been able to replicate this on my own computer.

Does anyone have an idea as to what the source of this problem could be?

I've attached the output in full.

thanks!
-Pascal
mcmctree_AR_2.5.o5278754

pasca...@gmail.com

unread,
Jul 17, 2020, 1:34:22 PM7/17/20
to PAML discussion group
Actually, this is not just happening on the HPC, but also on a local computer.

pasca...@gmail.com

unread,
Jul 18, 2020, 1:01:43 PM7/18/20
to PAML discussion group
And this issue is cropping up with PAML v4.9j.

Ziheng

unread,
Aug 25, 2020, 3:23:56 PM8/25/20
to PAML discussion group
i think this is about the mcmctree program and assume that you are using the option of approximate likelihood calculation with usedata = 2.
the problem occurred when the initial parameter values are too poor, so that lnL lost significance digits.
lnL0 = -10568810464394.92
if the program runs despite the warning, you can simply ignore the messages.
i seem to remember that i rewrote the code for generating initial parameter values.  the most recent version is at the github site
dev/ branch.  you need to compile the code.
i have been too busy to prepare a release.
good luck, ziheng

l04...@gmail.com

unread,
Sep 17, 2020, 8:42:37 AM9/17/20
to PAML discussion group
I have used the paml v4.10.0 which released in several days ago to analyze my datasets.
It still got the "restting lnL error" and stop after the fine tune step. Furthermore, it got a positive lnL instead of negative which is weird. 

Is it possible to avoid this kind of error instead of fixing the initial parameter values? 

If you are interested in my datasets, you could find it at the attachment. 

best regards, tianhua

dataset.rar

Ziheng

unread,
Nov 8, 2020, 6:42:07 AM11/8/20
to PAML discussion group
(i) i took a look at your data files.
the strange lnL values are due to poor starting values, as i mentioned earlier.  when i run mcmctree in paml.4.10, the problem does not show up.  

(ii)
ndata = 25

you have 25 loci, which are all very short.  alignments do not look trustable.  
i suggest that you check the alignments carefully.  you might want to concatenate the loci and analyze them as one parition.  or think about how to partition the data and perhaps use 2 or 3 partitions.
note that the posterior time estimates in analysis of the same sequence data using one partition or multiple partitions are typically very different.   

the following review gives a brief intro to the problems.

dos Reis M, Donoghue PCJ, Yang Z. 2016. Bayesian molecular clock dating of species divergences in the genomics era. Nat Rev Genet 17:71-80.

 best, ziheng


pasca...@gmail.com

unread,
Nov 8, 2020, 11:37:02 PM11/8/20
to PAML discussion group
Hi,
I am also getting the "Resetting lnL" message, that terminates the mcmctree run. I am using the approximate likelihood calculation approach, with PAML v4.10.0.
I am running several alternative configurations with this dataset, where the differences are in terms of the fossil calibration densities. Most of them appear to run fine, but two of them have this problem.

I have attached my files, should those prove to be helpful.

Any thoughts as why this is happening for some runs, but not others, and how to avoid this?
thanks!
-Pascal
pascal_files.zip
screenOutput.txt

pasca...@gmail.com

unread,
Nov 10, 2020, 8:07:16 AM11/10/20
to PAML discussion group
I will just add that this dataset does run with PAML v4.9h. I don't get the "Resetting lnL" message, but it does take MCMCTREE much longer to run than with v4.10, presumably because of the change to the way initial values are calculated.

Ziheng

unread,
Dec 30, 2020, 6:09:09 AM12/30/20
to PAML discussion group
-73124.022369 = -73124.018844?  Resetting lnL

i ran the program using your data and saw this.  this is apparently caused by mcmctree using a stringent criterion to check the likelihood calculation.  when the dataset is large, rounding errors can cause differences depending on different ways of calculating the likelihood.  you can fix the problem as follows.  open mcmctree.c in a text editor, find the following block, and delete the line with exit(-1); or comment it out.  In other words change

        if (fabs(lnL - lnpData(data.lnpDi)) > 0.001) {
            printf("\n%12.6f = %12.6f?  Resetting lnL\n", lnL, lnpData(data.lnpDi));
            lnL = lnpData(data.lnpDi);
            exit(-1);
         }

into 

        if (fabs(lnL - lnpData(data.lnpDi)) > 0.001) {
            printf("\n%12.6f = %12.6f?  Resetting lnL\n", lnL, lnpData(data.lnpDi));
            lnL = lnpData(data.lnpDi);
            /* exit(-1); */
         }

 then recompile.  
i'll fix my copy so that the change goes into the next update.
happy new year.
ziheng
Reply all
Reply to author
Forward
0 new messages